bugGuile - Bugs: bug #13600, faulty output of +Infinity from...

 
 

bug #13600: faulty output of +Infinity from format

Submitter:  None
Submitted:  Fri 01 Jul 2005 04:52:26 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  In Progress
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 Jul 2005 09:47:09 PM UTC, comment #1: 

The guile 1.6 series doesn't really support inf and nan, and the ice-9 format isn't setup to recognise them.  The upcoming guile 1.8 will have this.

Kevin Ryde <kryde>
Group Member
Fri 01 Jul 2005 04:52:26 PM UTC, original submission:  

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-07-23 kryde Open/ClosedOpen Closed
2005-07-23 kryde StatusNone In Progress

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code