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

Bug #1672829 reported by Brett van de Sande on 2017-03-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
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).

Stas Boukarev (stassats) wrote :

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

Changed in sbcl:
status: New → Invalid
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  Edit
Everyone can see this information.

Other bug subscribers