flintlib / arb

Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
http://arblib.org/
GNU Lesser General Public License v2.1
457 stars 137 forks source link

Should positive * pos_inf be pos_inf instead of zero_pm_inf? #408

Open postmath opened 2 years ago

postmath commented 2 years ago

I've seen your comments that you feel that the various non-number values in arb are not well enough defined, but I think this should be a case where there is a reasonable mathematically correct interpretation.

In arb_mul (and arb_mul_arf), if you multiply an arb_t (or an arf_t) representing a signed infinity by a non-exact finite arb_t, then the result's radius is infinite. It seems like it would be mathematically sound to test whether the finite arb_t is either all positive or all negative, and if so, set the result's radius to be finite instead -- correct? That would give answers that users might expect more, even though of course the current result is also correct. I would be happy to prepare a patch.

fredrik-johansson commented 2 years ago

Yes, this seems reasonable.