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

Parse number without scientific notation #32

Closed
jakewilliami opened this issue Jan 18, 2021 · 0 comments · Fixed by #33
Closed

Parse number without scientific notation #32

jakewilliami opened this issue Jan 18, 2021 · 0 comments · Fixed by #33

Comments

@jakewilliami
Copy link
Owner

julia> spelled_out(2^log2(3390000))
ERROR: KeyError: key 'e' not found
Stacktrace:
 [1] getindex at ./dict.jl:467 [inlined]
 [2] decimal_convert_en(::Dec64; british::Bool, dict::Symbol) at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/en.jl:65
 [3] spelled_out_en(::Float64; british::Bool, dict::Symbol) at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/en.jl:139
 [4] #spelled_out#7 at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/SpelledOut.jl:36 [inlined]
 [5] spelled_out(::Float64) at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/SpelledOut.jl:35
 [6] top-level scope at REPL[72]:1
caused by [exception 1]
InexactError: BigInt(3.3899999999999986e6)
Stacktrace:
 [1] BigInt at ./gmp.jl:298 [inlined]
 [2] spelled_out_en(::Float64; british::Bool, dict::Symbol) at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/en.jl:137
 [3] #spelled_out#7 at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/SpelledOut.jl:36 [inlined]
 [4] spelled_out(::Float64) at /Users/jakeireland/.julia/packages/SpelledOut/mOgRg/src/SpelledOut.jl:35
 [5] top-level scope at REPL[72]:1
jakewilliami added a commit that referenced this issue Jan 27, 2021
Fix was to parse floats as strings ASAP.  Similar to fix for #32.  Addresses #37.
jakewilliami added a commit that referenced this issue Mar 29, 2023
Fix was to parse floats as strings ASAP.  Similar to fix for #32.  Addresses #37.
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 a pull request may close this issue.

1 participant