Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread ben rudgers
Thanks Norman. Sorry for not being as clear as I might wish. I was trying to provide an example suggesting significance divided by difficulty often influences the design of programming languages and libraries. For me the critique of the standard is context for the last sentence. The interesting

Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread Norman Gray
Greetings. On 6 Feb 2018, at 13:00, ben.rudgers wrote: "The library [math.h] doesn't try to distinguish +0 from -0. IEEE 754 worries quite a bit about this distinction. All the architectures I mentioned above can represent both flavors of zero. But I have trouble accepting (or even

Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread David Storrs
Huh. Okay, thanks. On Mon, Feb 5, 2018 at 6:46 PM, Ben Greenman wrote: > Looks like its for the same reason that (number->string -0) yields "0". > > +nan.0 is special, but -nan.0 is the same as (- +nan.0) > > http://docs.racket-lang.org/reference/numbers.html > >

RE: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread Jos Koot
:42 To: Racket Users Subject: [racket-users] (number->string -nan.0) == "+nan.0" ? I noticed that (number->string -nan.0) yields "+nan.0" instead of "-nan.0" as I would have expected. It's not an issue for me, but I was wondering why this is? -- You received

Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread Laurent
Not sure there should be a -nan.0 to start with. NaN is an absorbing value that shouldn't have a sign. I suspect it's because the + is a convenience to trigger the number reader, and then an appeal to symmetry and analogy to +inf.0 led to -nan.0? On Mon, Feb 5, 2018 at 11:46 PM, Ben Greenman

Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-05 Thread Ben Greenman
Looks like its for the same reason that (number->string -0) yields "0". +nan.0 is special, but -nan.0 is the same as (- +nan.0) http://docs.racket-lang.org/reference/numbers.html On Mon, Feb 5, 2018 at 6:41 PM, David Storrs wrote: > I noticed that (number->string

[racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-05 Thread David Storrs
I noticed that (number->string -nan.0) yields "+nan.0" instead of "-nan.0" as I would have expected. It's not an issue for me, but I was wondering why this is? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and