[racket-dev] .1 evaluates to 0.0 [was Re: plot doesn't plot (inexact->exact: no exact representation for +nan.0)]

From: Marijn (hkBst at gentoo.org)
Date: Thu Dec 29 03:46:15 EST 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28-12-11 17:08, Neil Toronto wrote:
> On 12/28/2011 05:18 AM, Matthew Flatt wrote:
>> Thanks for all the new info! I don't think that it's a bytcode
>> problem. I start to wonder if it's in number parsing...
>> 
>> On line 1102 of "src/racket/src/numstr.c", there's a call to
>> STRTOD(). Does it change anything if you wrap that call with
>> calls to scheme_push_c_numeric_locale() and
>> scheme_pop_c_numeric_locale(loc)?: ...
> 
> Locales? Then maybe I wasn't crazy for thinking the bug might 
> discriminate against people whose first language isn't English?
> Laurent speaks French and I think Marijn speaks Dutch.

Locales are a beautiful thing, but they also cause many many weird
issues... but it is ever so annoying to see a numeric date and have to
wonder which is months and which is days (for exmaple in Thunderbird),
so I configured my locale to be a wonderful mix of nl_NL and en_US...

> (Beautiful country, BTW, Marijn. I was at Avifauna for a
> conference.)

Thanks!

> I had an email about this ready, but then I tried switching
> DrRacket's language to French and Dutch to see if I could duplicate
> it. I couldn't, so I deleted the email.

I think to switch the locale you would have to do some more work, like
set an environment variable.

Marijn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk78KNcACgkQp/VmCx0OL2yOJgCfVmeUIb7/KyJFfkRXGNoNXb8p
fksAnRFYz2ez3HpQgEN3AXxK7iFCZ5vP
=Nrgv
-----END PGP SIGNATURE-----


Posted on the dev mailing list.