-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Generated Julia code is (at lest on my machine, Julia 1.6.0) written as
coeff1=0.00383407335032704596164376098882956709489410248615638010744708335697776575140132556149544440996986827984
However, decimal literals are converted to Float64 when parsed. Hence,
julia> coeff1=0.00383407335032704596164376098882956709489410248615638010744708335697776575140132556149544440996986827984
0.003834073350327046
julia> typeof(coeff1)
Float64
To be parsed as a BigFloat
it should be written as
julia> coeff1=big"0.00383407335032704596164376098882956709489410248615638010744708335697776575140132556149544440996986827984"
0.00383407335032704596164376098882956709489410248615638010744708335697776575140132556149544440996986827984
julia> typeof(coeff1)
BigFloat
I suggest adding a code-snippet like this
coeff_i_code = (big(T)==T) ?
(split(coeff_i_code,"=")[1]*"=big\""*split(coeff_i_code,"=")[2]*"\"") :
(coeff_i_code)
after line 227 in gen_julia_code.jl
.
Thoughts? The code generation is not my specialty...
Metadata
Metadata
Assignees
Labels
No labels