[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-0.0 versus 0.0

From: Dave Sworin
Subject: -0.0 versus 0.0
Date: Fri, 6 Feb 2009 14:55:51 -0800 (PST)

Sometimes a variable, after lots of calculations, is instantiated to a
float value of -0.0 in the gprolog interpreter.  When I compare the
variable to 0.0, as in X =:= 0.0, it succeeds.  X < 0.0 fails.  What
is the significance of the minus sign?  Is the return of -0.0 intentional?
I don't have a simple example as this usually occurs after some
matrix operations with lots of additions and multiplications.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]