Re: NAN in libgnomeui



>>>>> Tom Tromey writes:

    Tristan> Someone checked in some code for gnome-calculator.c which
    Tristan> assigns the constant NAN to some variables.

    Tristan> Under Solaris 2.5, such a constant does not exist. There
    Tristan> are only some defines which return true if a value is a
    Tristan> NAN.

    Tristan> I don't know how to replace NAN with a portable
    Tristan> equivalent.

    Tom> I was under the impression that computing `1.0 / 0' would
    Tom> yield a NaN.  I haven't looked at floating point in several
    Tom> years, however, so my memory is suspect.  You could easily
    Tom> write a test program, though.  If it works, you could send in
    Tom> a patch to fix this...

HUGE_VAL might be a good way.

Andrew

--
Andrew Veliath
andrewtv@usa.net, veliaa@rpi.edu



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