JuliaIntervals / TaylorModels.jl

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

Add interval(x0) in shortcut constructor #22

Closed mforets closed 5 years ago

mforets commented 5 years ago

Closes #21.

mforets commented 5 years ago

Hmm does it fail in windows 32bit because of the 0.0 in @test tv == TaylorModel1(5, 0.0, ii0)? I don't know if it makes a difference to use @test tv == TaylorModel1(5, Float64(0.0), ii0), but i could try.

mforets commented 5 years ago

I don't know if it makes a difference to use @test tv == TaylorModel1(5, Float64(0.0), ii0), but i could try.

No, it does not help with this problem. I dunno.

lbenet commented 5 years ago

What ever happens in widows x86 is beyond my understanding; a simple solution to get tests passing is to decide not to care about x86, and only care about x64.

dpsanders commented 5 years ago

(Floats are still Float64 even in 32-bit Windows.)

dpsanders commented 5 years ago

Note that you can (and should) use

git rebase master

to update a branch on top of current master.

dpsanders commented 5 years ago

Then you will need to force push the branch (git push -f).

mforets commented 5 years ago

Done, there is now only 1 commit in the history of this PR.

lbenet commented 5 years ago

Tests are not passing; do you understand why? I guess this may be related that your initial PR originated in a (now outdted) master. Perhaps, rebasing to current master is the way to go.

lbenet commented 5 years ago

I'll merge this, and if a change is needed, we can do it in another PR.

Thanks a lot @mforets !

mforets commented 5 years ago

It just occurred to me that we could make this method a bit more general, e.g., to return a TaylorModel with Float64 polynomial coefficients.

OK, i see. What do you think about allowing both versions? Like:

julia> TaylorModel1(2, 5.0, Interval(4.0, 6.0))
 5.0 + 1.0 t + [0, 0]

julia> TaylorModel1(2, Interval(5.0), Interval(4.0, 6.0)) 
[5, 5] + [1, 1] t + [0, 0]
lbenet commented 5 years ago

Yes, but I am not sure if this extends to several variables. In any case, this is merged, and if posible, we should have this in a new PR. Thanks a lot for the contribution!