You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue came up for a small number of the students in my class. I admit it took me awhile to figure out what their error was, because I couldn't recreate it on my own computer. I don't actually know how many (or which) of the unit definitions in UnitfulUS lead to this error, but here is an example of what happens when one defines a US gallon:
julia> @unit gal "gal" USGallon 231Unitful.inch^3 false
I'm sure this error is exceedingly rare: it is still unclear why students in my class are using 32-bit versions of Julia. Might be old architectures, but might also be their mistake.
The text was updated successfully, but these errors were encountered:
This issue came up for a small number of the students in my class. I admit it took me awhile to figure out what their error was, because I couldn't recreate it on my own computer. I don't actually know how many (or which) of the unit definitions in UnitfulUS lead to this error, but here is an example of what happens when one defines a US gallon:
julia> @unit gal "gal" USGallon 231Unitful.inch^3 false
ERROR: LoadError: LoadError: OverflowError: 5000 * 25000000 overflowed for type Int32
Stacktrace:
[1] throw_overflowerr_binaryop(op::Symbol, x::Int32, y::Int32)
@ Base.Checked .\checked.jl:154
[2] checked_mul
@ .\checked.jl:288 [inlined]
[3] *(x::Rational{Int32}, y::Rational{Int32})
@ Base .\rational.jl:311
[4] power_by_squaring(x_::Rational{Int32}, p::Int32)
@ Base .\intfuncs.jl:279
[5] ^
@ .\rational.jl:453 [inlined]
[6] dpow
@ ~.julia\packages\Unitful\PcVKX\src\units.jl:205 [inlined]
[7] basefactor(inex::Float64, ex::Rational{Int32}, eq::Int32, tens::Int32, p::Rational{Int32})
@ Unitful ~.julia\packages\Unitful\PcVKX\src\units.jl:234
[8] basefactor
@ ~.julia\packages\Unitful\PcVKX\src\units.jl:258 [inlined]
[9] map
@ .\tuple.jl:213 [inlined]
[10] basefactor(x::Unitful.FreeUnits{(inch^3,), 𝐋^3, nothing} )
@ Unitful ~.julia\packages\Unitful\PcVKX\src\units.jl:261
[11] top-level scope
@ ~.julia\packages\Unitful\PcVKX\src\user.jl:220
[12] include(mod::Module, _path::String)
@ Base .\Base.jl:386
[13] include(x::String)
I'm sure this error is exceedingly rare: it is still unclear why students in my class are using 32-bit versions of Julia. Might be old architectures, but might also be their mistake.
The text was updated successfully, but these errors were encountered: