From: Russ Cox <rsc@swtch.com>
To: 9fans <9fans@9fans.net>, inferno-list@vitanuova.com
Subject: 5c ulong/vlong -> float64 bug
Date: Tue, 26 Oct 2010 19:12:14 -0700 [thread overview]
Message-ID: <AANLkTikJ0+EWJFKui1=_cB5kOq8EeBCjY00nSV7cb5cV@mail.gmail.com> (raw)
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.
Russ
next reply other threads:[~2010-10-27 2:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 2:12 Russ Cox [this message]
2010-10-27 2:26 ` [9fans] " erik quanstrom
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='AANLkTikJ0+EWJFKui1=_cB5kOq8EeBCjY00nSV7cb5cV@mail.gmail.com' \
--to=rsc@swtch.com \
--cc=9fans@9fans.net \
--cc=inferno-list@vitanuova.com \
/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).