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

printf type field e fails for large numbers if both width and precision fields are defined #29662

Closed
jaakkor2 opened this issue Oct 16, 2018 · 0 comments

Comments

@jaakkor2
Copy link
Contributor

On v0.6.4 printf works as expected

julia> @printf "%e" pi
3.141593e+00
julia> @printf "%e" pi*1e100
3.141593e+100
julia> @printf "%12.3e" pi
   3.142e+00
julia> @printf "%12.3e" pi*1e100
  3.142e+100

On v1.0.1 printf fails if both width and precision fields are defined and the number is large (>1e100)

julia> using Printf
julia> @printf "%e" pi
3.141593e+00
julia> @printf "%e" pi*1e100
3.141593e+100
julia> @printf "%12e" pi*1e100
3.141593e+100
julia> @printf "%.3e" pi*1e100
3.142e+100
julia> @printf "%12.3e" pi*1e100
ERROR: UndefVarError: SmallNumber not defined
Stacktrace:
 [1] top-level scope at .\printf.jl:477 [inlined]
 [2] top-level scope at .\none:0
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

No branches or pull requests

1 participant