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
{{ message }}
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
I'm trying Julia out (and have been using a lot of Python lately), so I like the idea of having Python-like formatting in Julia. But I found a but in your Formatting.jl package. Try
using Formatting
fe = FormatExpr("{1:8.2e}\n")
x::Float64 = 0.0
for i::Integer in 1:20
x += 0.05
printfmt(fe, x)
end
You should see
1.00e-01
2.00e-01
3.00e-01
4.00e-01
5.00e-01
6.00e-01
7.00e-01
8.00e-01
9.00e-01
1.00e-00
Instead the output is
1.00e-01
2.00e-01
3.00e-01
4.00e-01
5.00e-01
5.100e-01
6.100e-01
7.100e-01
8.100e-01
9.100e-01
I'm not sure if the error has to do with rounding or something else entirely. But I thought I'd let you know something was up.
The text was updated successfully, but these errors were encountered:
I'm trying Julia out (and have been using a lot of Python lately), so I like the idea of having Python-like formatting in Julia. But I found a but in your Formatting.jl package. Try
You should see
1.00e-01
2.00e-01
3.00e-01
4.00e-01
5.00e-01
6.00e-01
7.00e-01
8.00e-01
9.00e-01
1.00e-00
Instead the output is
1.00e-01
2.00e-01
3.00e-01
4.00e-01
5.00e-01
5.100e-01
6.100e-01
7.100e-01
8.100e-01
9.100e-01
I'm not sure if the error has to do with rounding or something else entirely. But I thought I'd let you know something was up.
The text was updated successfully, but these errors were encountered: