Formatting.jl icon indicating copy to clipboard operation
Formatting.jl copied to clipboard

32 bit

Open jmkuhn opened this issue 5 years ago • 1 comments

julia> Sys.WORD_SIZE
32

julia> fmt("f", 1234567890123456.0)
ERROR: InexactError: trunc(Int32, 1.234567890123456e15)
Stacktrace:
 [1] trunc at ./float.jl:682 [inlined]
 [2] trunc at ./float.jl:359 [inlined]
 [3] _pfmt_f(::Base.GenericIOBuffer{Array{UInt8,1}}, ::FormatSpec, ::Float64) at /root/.julia/packages/Formatting/njXsn/src/fmtcore.jl:176
 [4] printfmt(::Base.GenericIOBuffer{Array{UInt8,1}}, ::FormatSpec, ::Float64) at /root/.julia/packages/Formatting/njXsn/src/fmtspec.jl:190
 [5] sprint(::Function, ::FormatSpec, ::Vararg{Any,N} where N; context::Nothing, sizehint::Int32) at ./strings/io.jl:105
 [6] sprint at ./strings/io.jl:101 [inlined]
 [7] fmt at /root/.julia/packages/Formatting/njXsn/src/fmtspec.jl:205 [inlined]
 [8] fmt(::String, ::Float64) at /root/.julia/packages/Formatting/njXsn/src/fmtspec.jl:206
 [9] top-level scope at REPL[8]:1

jmkuhn avatar Aug 25 '20 11:08 jmkuhn

I believe this is now fixed in JuliaString/Format.jl

ScottPJones avatar Feb 20 '24 17:02 ScottPJones