*read-default-float-format* affects writing to string

Bug #1672829 reported by Brett van de Sande
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

When I write a number to a string, the format is affected by *read-default-float-format*.
Example:

* (let ((*read-default-float-format* 'double-float))(write-to-string 3.0))

"3.0f0"
* (write-to-string 3.0)

"3.0"

SBCL 1.3.15 (Linux), I also see this bug in version 1.2.2 (OS X), but do not see the bug
in version 1.0.29 (Ubuntu Linux).

Revision history for this message
Stas Boukarev (stassats) wrote :

That's what *read-default-float-format* does.

Changed in sbcl:
status: New → Invalid
Revision history for this message
Brett van de Sande (bvds) wrote :

Indeed, the previous behavior of SBCL was, in fact, a bug:
http://clhs.lisp.se/Body/v_rd_def.htm#STread-default-float-formatST

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.