Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix format ~f and update tests (3rd) #4

Merged
merged 1 commit into from
Oct 30, 2017
Merged

Conversation

Hamayama
Copy link
Contributor

I found following error cases.

(a) (format "~1,0F" 1.5)       -> "1."
(b) (format "~1,0F" (/. 1 0))  -> "+inf."
(c) (format "~1,0F" (/. -1 0)) -> "-inf."
(d) (format "~1,0F" (/. 0 0))  -> "+nan."

For (a), (format "~1,0F" 1.5) must return "2."
because 'round' of Scheme uses banker's rounding.

The reason of (a) is that integer part and fractional part
were processed separately.

For (b)-(d), it is necessary to check +inf.0, -inf.0, +nan.0, -nan.0.

I fixed these cases and updated tests.

@arthurgleckler arthurgleckler merged commit 5574465 into scheme-requests-for-implementation:master Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants