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

Float formatting #838

Closed
wants to merge 3 commits into from
Closed

Conversation

codeZeilen
Copy link

Proposal to fix #779. Float#to_s should create the closest string representation of the float which itself creates the float again. The RPython float to string mode "r" allows this and only needed some polishing to match the formatting of Ruby 1.9.3

… includes tests for floats < 0 which are also formatted incorrectly
…he fact, that rpyton Float formatting mode 'r' rounds as Ruby 1.9.3 does
@timfel
Copy link
Member

timfel commented Aug 12, 2014

Of there is a rubyspec for this, can you make sure it runs? (untagging it should work)

@timfel
Copy link
Member

timfel commented Aug 12, 2014

s/Of/If

@codeZeilen
Copy link
Author

Sure I'll have a look

@codeZeilen
Copy link
Author

Turns out the Float#to_s specs include all the information I was manually assembling before -.-'. Thus my changes don't implement everything yet, so I'm closing the pull request for now and reopen it when I've also implemented the rest of the Float#to_s spec.

@codeZeilen codeZeilen closed this Aug 12, 2014
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.

floats are formatted incorrectly
2 participants