Skip to content

Bug fix in cl-format#1

Open
bwanab wants to merge 1 commit into
tomfaulhaber:masterfrom
bwanab:master
Open

Bug fix in cl-format#1
bwanab wants to merge 1 commit into
tomfaulhaber:masterfrom
bwanab:master

Conversation

@bwanab

@bwanab bwanab commented Jan 28, 2012

Copy link
Copy Markdown

Hi Tom, I hope I'm doing this right :)

I was using cl-format on some big numbers (financial software) and found a strange bug:

(cl-format nil "~12,3F" 22222222.6674)
"22222222.667"
user> (cl-format nil "~12,3F" 22222222.6675)
; Evaluation aborted....

It turns out that when the numbers are big enough, when it tries to do the conversion using Integer/valueOf, the values are too large. In my fix, I just changed it to Long/valueOf and it fixes it.

Best regards and thanks for contributing this nice package.

Bill Allen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant