Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing BigFloat conversions #139

Closed
stevengj opened this issue Jul 14, 2020 · 0 comments · Fixed by #140
Closed

missing BigFloat conversions #139

stevengj opened this issue Jul 14, 2020 · 0 comments · Fixed by #140

Comments

@stevengj
Copy link
Member

stevengj commented Jul 14, 2020

This shows up when trying to use DecFP with DifferentialEquations.jl:

julia> using DifferentialEquations, DecFP
julia> f = (u,p,t) -> (p*u)
julia> prob_ode_decfplinear = ODEProblem(f,Dec128(1)/Dec128(2),(Dec128(0.0),Dec128(1.0)),Dec128(1.01))

julia> sol =solve(prob_ode_decfplinear,Tsit5())
ERROR: StackOverflowError:
Stacktrace:
 [1] Dec128(::BigFloat) at /Users/stevenj/.julia/dev/DecFP/src/DecFP.jl:117
 [2] convert(::Type{Dec128}, ::BigFloat) at ./number.jl:7
 ... (the last 2 lines are repeated 39990 more times)
 [79983] Dec128(::BigFloat) at /Users/stevenj/.julia/dev/DecFP/src/DecFP.jl:117

(Solving differential equations is probably a poor fit for decimal floating-point arithmetic, but it is a good test of genericity.)

Seems like we could do this conversion by going through strings first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant