JuliaIntervals / TaylorModels.jl

Rigorous function approximation using Taylor models in Julia
Other
63 stars 15 forks source link

Fix some deprecations #15

Closed dpsanders closed 5 years ago

lbenet commented 6 years ago

I am unifying our efforts, as we discussed, and also bringing 0.7 compatibility. See the branch cleanup_unify. Let me know if you want me to cherry-pick some/all commits.

dpsanders commented 6 years ago

Thanks. What happened to taylor1_var?

dpsanders commented 6 years ago

In other words, how can I get a variable "t"?

lbenet commented 6 years ago

You can use get it from the constructor, e.g. TaylorModel1(5, 0..0, 1..2). All previous things are still in src/Taylor1/ and src/TaylorN/ directories, but I am not include-ing them explicitly.

lbenet commented 6 years ago

So far, things work properly in Julia 0.7 locally; but you have to be in the master branch of TaylorSeries.

dpsanders commented 6 years ago

When I try to plot(exp(t)), I get

UndefVarError: rpafp not defined
lbenet commented 6 years ago

I just pushed a commit that solves the issue. However, plot still don't work. I get the following error.


MethodError: no method matching Float64(::Interval{Float64})
Closest candidates are:
  Float64(::Real, !Matched::RoundingMode) where T<:AbstractFloat at rounding.jl:173
  Float64(::T<:Number) where T<:Number at boot.jl:725
  Float64(!Matched::Int8) at float.jl:60
  ...

Stacktrace:
 [1] Float64(::Interval{Float64}) at ./deprecated.jl:468
 [2] convert at ./number.jl:7 [inlined]
 [3] setproperty! at ./sysimg.jl:19 [inlined]
 [4] expand_extrema!(::Plots.Extrema, ::Interval{Float64}) at /Users/benet/.julia/packages/Plots/ex9On/src/axes.jl:331
 [5] expand_extrema!(::Plots.Axis, ::Array{Interval{Float64},1}) at /Users/benet/.julia/packages/Plots/ex9On/src/axes.jl:354
 [6] expand_extrema!(::Plots.Subplot{Plots.GRBackend}, ::Dict{Symbol,Any}) at /Users/benet/.julia/packages/Plots/ex9On/src/axes.jl:384
 [7] _expand_subplot_extrema(::Plots.Subplot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Symbol) at /Users/benet/.julia/packages/Plots/ex9On/src/pipeline.jl:366
 [8] _process_seriesrecipe(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}) at /Users/benet/.julia/packages/Plots/ex9On/src/pipeline.jl:402
 [9] macro expansion at ./logging.jl:320 [inlined]
 [10] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{TaylorModel1{Interval{Float64},Float64}}) at /Users/benet/.julia/packages/Plots/ex9On/src/plot.jl:171
 [11] #plot#136(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::TaylorModel1{Interval{Float64},Float64}) at /Users/benet/.julia/packages/Plots/ex9On/src/plot.jl:57
 [12] plot(::TaylorModel1{Interval{Float64},Float64}) at /Users/benet/.julia/packages/Plots/ex9On/src/plot.jl:51
 [13] top-level scope at In[32]:1```
lbenet commented 6 years ago

We should probably continue the discussion in #16...

dpsanders commented 5 years ago

Superseded by #16.