[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why do some math functions return -0
- From: Miles Bader <miles@...>
- Date: Mon, 20 Sep 2010 12:29:56 +0900
HyperHacker <hyperhacker@gmail.com> writes:
> While it's true that not all systems *will* display -0 for (or only
> for) a rounded negative value, this *is* the intended meaning.
Incidentally, I happened to notice yesterday that some numbers printed
to std::cout (using g++) were written as "0", but the same data
transferred to Lua (via SWIG, but that probably only does a
float->double conversion), ended up being printed as "-0" by Lua.
-Miles
--
80% of success is just showing up. --Woody Allen