¿Que hace lo siguiente:?
x = 0.1
0.1
Guarda en x
el valor ya redondeado (convertido a un flotante cercano), segun el modo actual de redondeo.
get_rounding(Float64)
Base.Rounding.RoundingMode{:Nearest}()
bits(x)
"0011111110111001100110011001100110011001100110011001100110011010"
set_rounding(Float64, RoundDown)
0
0.1
0.09999999999999999
float("0.1")
0.09999999999999999
set_rounding(Float64, RoundNearest)
0
0.1
0.1
big(0.1)
1.000000000000000055511151231257827021181583404541015625e-01 with 256 bits of precision
bits(0.1*1.25)
"0011111111000000000000000000000000000000000000000000000000000000"
set_rounding(Float64)
0.1*1.25
0.12499999999999999
bits(ans)
"0011111110111111111111111111111111111111111111111111111111111111"
versioninfo()
Julia Version 0.4.0-dev+3472 Commit 8c87a32* (2015-02-20 05:10 UTC) Platform Info: System: Darwin (x86_64-apple-darwin13.4.0) CPU: Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM) LAPACK: libopenblas LIBM: libopenlibm LLVM: libLLVM-3.3