From root at common-lisp.net Mon Dec 11 07:01:36 2006
From: root at common-lisp.net (root)
Date: Mon, 11 Dec 2006 02:01:36 -0500 (EST)
Subject: [Ieee-floats-devel] Auto-nag: ieee-floats please update your webpage
Message-ID: <20061211070136.976BE7C017@common-lisp.net>
You are being nagged on because you have not created a
sensible default webpage for your project. Please do so or you will
be nagged again next week. All we ask is that you type in something
about the project and perhaps some links to mailinglists etc. See
common-lisp.net/project/clo/sp/index.html for a reasonable template.
Some projects host their webpages somewhere else (eg.
http://common-lisp.net/project/cl-ppcre) and if you're in the same
situation you may put the following in your index.shtml:
Any questions? You can reach the author of this cronjob at
clo-devel at common-lisp.net
Thanks!
From alexey.goldin at gmail.com Thu Dec 14 14:02:00 2006
From: alexey.goldin at gmail.com (Alexey Goldin)
Date: Thu, 14 Dec 2006 08:02:00 -0600
Subject: [Ieee-floats-devel] underflows, overflows
Message-ID:
I was quite excited to see your project --- recently I needed something like
this and even wrote similar utils. Unfortunately I believe your code suffers
from incorrectly interpreting underflows and overflows.
For example:
(format t "~b" (parse-integer "47" :radix 16))
1000111
NIL
CL-USER>
IEEE-FLOATS> (encode-float32 9.9492191e-44)
; Evaluation aborted
IEEE-FLOATS> (decode-float32 #b1000111)
5.0446745e-44
IEEE-FLOATS>
According to http://babbage.cs.qc.edu/IEEE-754/
this binary pattern is more like
9.9492191e-44
Attached is my code with tests. It is uglier then yours and does not handle
nan, infinity, etc.
May be you can incorporate changes, I then should be able to wipe mine code
and just use yours. If not, I'll be able to send you patches in few days.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binary-io-utils.tar.gz
Type: application/x-gzip
Size: 2065 bytes
Desc: not available
URL:
From marijnh at gmail.com Thu Dec 14 18:38:04 2006
From: marijnh at gmail.com (Marijn Haverbeke)
Date: Thu, 14 Dec 2006 19:38:04 +0100
Subject: [Ieee-floats-devel] Re: underflows, overflows
In-Reply-To:
References:
Message-ID:
Hey,
If you download the code again you should find your problem gone. I hadn't
realized exponents of 0 are not just used for encoding 0, but also for small
numbers. I removed the underflow test and just return 0 for really tiny
numbers -- not sure if this is always proper, but it seems to be a common
approach.
Regards,
Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: