Skip to content

Large intervals multiplication non-intuitive behavior #86

@ebelnikola

Description

@ebelnikola

Hi!

First of all, thank you for this package!

I've noticed that multiplication of large intervals may give non-intuitive (though correct) answers. I am not sure though if this is a bug or intended behavior. Here is an example:

using ArbNumerics
setextrabits(24);
setworkingprecision(ArbReal, 64);


a = setinterval(0.1, 0.2)
println(interval(a)) 
println(interval(a*a)) 

The output is

(0.099999999895226218682, 0.20000000010477379797)
(0.0049999998672865356152, 0.040000000132713469381)

While the upper bound for $a^2$ makes sense, $\approx 0.005$ for the lower bound is two times smaller than expected $0.01$.


UPD:

Another issue with multiplication --- negative numbers don't square to positive numbers. Here is an example

a=setinterval(-1e-10,1e-10)
a^2 |> interval

returns

(-1.0000000036064910928e-20, 1.0000000036064910928e-20)

Instead of

(0, 1.0000000036064910928e-20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions