[chuck-users] negative zero
Stephen Sinclair
radarsat1 at gmail.com
Sun Mar 1 00:28:39 EST 2009
On Sat, Feb 28, 2009 at 4:10 PM, Robert Poor <rdpoor at gmail.com> wrote:
> I'm troubled by ChucK's handling of negative zero. A variable set to -0.0
> is indistinguishable from a variable set to 0.0, except in printing. This
> is not a problem in everyday practice, but it seems likely that it will
> cause trouble when you pass to an external program.
>
> [Why would you set a variable to -0.0 in the first place? Try this: (-3.0 %
> 1.0) => float bar;]
>
> Comments?
> ====================
> 0.0 => float foo;
> -0.0 => float bar;
It's weirdness, but I can't imagine a program in any language I know
of actually having trouble parsing -0.0.
Steve
More information about the chuck-users
mailing list