You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sure there was a good reason for doing this, since there was commit that just added a special %to-json implementation for floats that used (format nil "~$" number). But it is difficult to work around if you want more than 1/100th in accuracy in your json. And it is inconsistant with ratios:
(jonathan:to-lisp 1/3) => "0.33333334"
I don't know what the reason behind using "~$" to output the number was, but at the very least the number of digits should be configurable.
The text was updated successfully, but these errors were encountered:
If you encode a float with to-json, only two digits after the decimal are kept, and scientifc notation is never used for very large numbers. Ex:
I'm sure there was a good reason for doing this, since there was commit that just added a special
%to-json
implementation for floats that used(format nil "~$" number)
. But it is difficult to work around if you want more than 1/100th in accuracy in your json. And it is inconsistant with ratios:I don't know what the reason behind using "~$" to output the number was, but at the very least the number of digits should be configurable.
The text was updated successfully, but these errors were encountered: