aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/UnitTests/2004-02-02-NegativeZero.c
blob: 36a4cd9127537db05b1345805d31db485188d1ec (plain)
1
2
3
4
5
6
7
8
9
10
extern int printf(const char *str, ...);
void test(double X) {
  printf("%f %f\n", -0.0 - X, -X);
}
int main() {
  test(+0.0);
  test(-0.0);
  printf("negzero = %f  poszero = %f\n", -0.0, +0.0);
  return 0;
}