-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
BigFloat prints differently from Float(32|64) in scientific notation #56941
Labels
bignums
BigInt and BigFloat
display and printing
Aesthetics and correctness of printed representations of objects.
Comments
There is also a discrepancy with julia> @printf "%a" 4.5
0x1.2p+2
julia> @printf "%a" big(4.5)
0x4.8p+0 It would be nicer if bigfloat normalized the same as regular floats, i.e. always starting with a leading |
Do we do our own printing for |
Ah, it looks like it is MPFR doing the formatting julia/stdlib/Printf/src/Printf.jl Lines 490 to 521 in ac79b9f
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bignums
BigInt and BigFloat
display and printing
Aesthetics and correctness of printed representations of objects.
BigFloat
s always include the+
for the exponent and leading0
s but e.g.Float64
does not:Noticed by @pjaap in fredrikekre/Runic.jl#13 (comment).
The text was updated successfully, but these errors were encountered: