emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#13757: closed (Problems with Guile's number printe


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13757: closed (Problems with Guile's number printer)
Date: Mon, 18 Mar 2013 01:32:02 +0000

Your message dated Sun, 17 Mar 2013 21:29:39 -0400
with message-id <address@hidden>
and subject line Re: Problems with Guile's number printer
has caused the debbugs.gnu.org bug report #13757,
regarding Problems with Guile's number printer
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
13757: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13757
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Problems with Guile's number printer Date: Tue, 19 Feb 2013 09:18:07 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
Hi,

I'm redirecting the number printing conversation to bug-guile, so that
we can track it.  Thanks for the debugging!

On Tue 19 Feb 2013 00:12, Mark H Weaver <address@hidden> writes:

> Andy Wingo <address@hidden> writes:
>
>> On Wed 23 Jan 2013 13:20, Daniel Llorens <address@hidden> writes:
>>
>>> scheme@(guile-user)> (f64vector-ref #s64(1 2 3) 0)
>>> $1 = #.#
>>
>> Here you are interpreting an int64 as a double, which should work, but
>> this printed result is really bizarre and looks like a bug in our number
>> printer.  Mark? :)
>
> Yes, our number printer is seriously flawed and needs a rewrite.  It
> prints subnormal[1] floats as "#.#", and even in typical cases often
> fails to print enough digits to get the same number back when you read
> it back in.
>
> Note that this also affects compiled code involving numbers, because the
> compiler serializes numbers using 'number->string'.  For example,
> (* 1e-155 1e-155) returns #f at the REPL, because peval turns this into
> a constant which happens to be a subnormal.  During assembly it serializes
> this to "#.#", and then 'string->number' returns #f.
>
> Also, 3.14159265358979323846264338327950288419716939937510582097494, if
> compiled, fails to produce the float closest to pi.  (acos -1) works
> properly, but only because this expression is not currently folded to a
> constant by the compiler.
>
> I've already started work on this (based on "Printing Floating-Point
> Numbers Quickly and Accurately" by Burger and Dybvig) but got
> distracted.
>
>      Mark
>
> [1] http://en.wikipedia.org/wiki/Subnormal_number

-- 
http://wingolog.org/



--- End Message ---
--- Begin Message --- Subject: Re: Problems with Guile's number printer Date: Sun, 17 Mar 2013 21:29:39 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
I've pushed 1ea37620c2c1794f7685b312d2530676a078ada7 to stable-2.0,
which fixes our number printer.  Closing this bug.

   Thanks,
     Mark



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]