From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Tue, 26 Oct 2010 22:26:11 -0400 To: 9fans@9fans.net Message-ID: <8be5d1c88a9674013546b111628b414e@plug.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 5c ulong/vlong -> float64 bug Topicbox-Message-UUID: 6e787fd8-ead6-11e9-9d60-3106f5b1d025 On Tue Oct 26 22:13:45 EDT 2010, rsc@swtch.com wrote: > For those people using 5c, I found a bug recently in the > conversion of ulong to float64. The bug is that it's not > implemented at all; instead 5c uses the long to float64 code, > so converting 0x80000000 produces -2^31 not 2^31. > This matters in _v2d, which uses it to convert vlong to float64. > If the low 32 bits of the vlong have the high bit set, > the conversion ends up off by 2^32. > > http://codereview.appspot.com/2726041 has a > straightforward but perhaps inefficient fix. already reported here with fix: http://9fans.net/archive/2010/09/334 - erik