[ create a new paste ] login | about

Link: http://codepad.org/g9LzZWPd    [ raw code | output | fork ]

C, pasted on Apr 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>

int main() {

  double a = -0.0;
  double b = 0.0;

  printf("a = %+.2lf\n", a);
  printf("b = %+.2lf\n", b);
  printf("a - b = %+.2lf\n", a - b);
  printf("b - a = %+.2lf\n", b - a);

  return 0;
}


Output:
1
2
3
4
a = -0.00
b = +0.00
a - b = -0.00
b - a = +0.00


Create a new paste based on this one


Comments: