9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] 5c ulong/vlong -> float64 bug
Date: Tue, 26 Oct 2010 22:26:11 -0400	[thread overview]
Message-ID: <8be5d1c88a9674013546b111628b414e@plug.quanstro.net> (raw)
In-Reply-To: <AANLkTikJ0+EWJFKui1=_cB5kOq8EeBCjY00nSV7cb5cV@mail.gmail.com>

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



      reply	other threads:[~2010-10-27  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27  2:12 Russ Cox
2010-10-27  2:26 ` erik quanstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8be5d1c88a9674013546b111628b414e@plug.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).