Sorry for the little descriptive title, I really don’t know how to summarize this stuff which is driving me crazy.
While testing Measurements.jl
on Julia master I ran into an issue. This is a minimal code reproducing the issue:
using Measurements
function test(x, a)
T = Measurements.gettype(a)
println(T)
println(typeof(x))
println(T(x))
println(typeof(T(x)))
end
a = big"3.00000001" ± big"1e-17"
b = 3 ± 0.1
test(a.val, (a, b))
The output of this script is:
BigFloat
BigFloat
3.00000001
Float64
Thus, inside the test
function x
is a BigFloat
, T
is BigFloat
, but T(x)
is a Float64
. Does anyone have a clue of what’s going on here? No problem in Julia 0.6. Also, no problem if I replace the call to Measurements.gettype
with a hard-coded BigFloat
.