E
Elliot Marks
Under what circumstances would a C program, containing nothing
that is not standard C, prefix a zero result of a calculation
with doubles with a minus sign? I have written a program that
does operations on matrices. Some, but not all, of the zeroes in
the result matrices are displayed by printf as -0.0. (I know that
floating point arithmetic algorithms use positive and negative
zero but this is the first time I've seen negative zeroes in
program output.)
that is not standard C, prefix a zero result of a calculation
with doubles with a minus sign? I have written a program that
does operations on matrices. Some, but not all, of the zeroes in
the result matrices are displayed by printf as -0.0. (I know that
floating point arithmetic algorithms use positive and negative
zero but this is the first time I've seen negative zeroes in
program output.)