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

number->string fails in base 36 on large numbers #820

Open
WillClinger opened this issue Dec 1, 2017 · 0 comments
Open

number->string fails in base 36 on large numbers #820

WillClinger opened this issue Dec 1, 2017 · 0 comments

Comments

@WillClinger
Copy link
Member

> (number->string (expt 2 48) 36)
Error: string-ref: illegal second argument: 28  is not a valid index into string

> (number->string (expt 2 32) 36)
Error: string-ref: illegal second argument: 35  is not a valid index into string

> (number->string (expt 2 26) 36)
"13ydj4"

I don't think any of the standards require number->string to work in base 36, but this is clearly a bug.

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

No branches or pull requests

1 participant