[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #13600] faulty output of +Infinity from format
From: |
anonymous |
Subject: |
[bug #13600] faulty output of +Infinity from format |
Date: |
Fri, 1 Jul 2005 16:52:28 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13600>
Summary: faulty output of +Infinity from format
Project: Guile
Submitted by: None
Submitted on: Fri 07/01/2005 at 16:52
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
It appears that the format function produces seemingly incorrect output for
+Infinity in fixed and exponential output format; it outputs "0.\0" (i.e.,
(string #\0 #\. #\nul)) for a positive infinity created by evaluating (/ 1.0
0.0). I'm not clear what
the right output should be, I guess that's under debate.
I examined the problem on three Linux systems (Opteron, Pentium III, Pentium
4) and guile versions 1.6.4 and 1.6.7. One of those was a Red Hat package,
the others Debian. I believe this behavior occurs in both the ice-9 and slib
versions.
The following illustrates the problem:
guile> (version)
"1.6.7"
guile> (use-modules (ice-9 format))
guile> (/ 1.0 0.0)
+#.#
guile> (format #t "~s~%" (/ 1.0 0.0))
+#.#
#t
guile> (format #t "~F~%" (/ 1.0 0.0))
0.^@
#t
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13600>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #13600] faulty output of +Infinity from format,
anonymous <=