Closed GoogleCodeExporter closed 9 years ago
Also, exp('1e1000') is not accurate. I think it needs about mag/log(2) extra
prec.
Original comment by fredrik....@gmail.com
on 19 Jan 2009 at 2:46
Committed fix to avoid infinite recursion in exp_newton with large arguments.
I do not think that more precision is needed:
>>> from mpmath import *
>>> a = mpf('1e1000')
>>> r = exp(a)
>>> extra = 10000
>>> mp.dps +=extra
>>> r1 = exp(a)
>>> mp.dps -= extra
>>> assert r == +r1
>>>
'1e1000' is converted to different mpf's at different precisions, so I think
that
it cannot be avoided that exp('1e1000') gives incompatible results at different
precisions
Original comment by mario.pe...@gmail.com
on 19 Jan 2009 at 12:01
Thanks for the fix.
> '1e1000' is converted to different mpf's at different precisions, so I think
that
> it cannot be avoided that exp('1e1000') gives incompatible results at
different
> precisions
Right, but results should be consistent when one fixes the argument beforehand.
I forgot to say, I'm referring only to the case "prec > 600 and exp >= 0". It
can be
seen like this:
mp.prec = 600
a = mpf('1e1000')
exp(a)
mp.prec = 800
exp(a)
Easy fix committed in r843.
Original comment by fredrik....@gmail.com
on 19 Jan 2009 at 12:28
What's left to resolve this?
Original comment by Vinzent.Steinberg@gmail.com
on 17 Feb 2009 at 12:49
Nothing.
Original comment by fredrik....@gmail.com
on 17 Feb 2009 at 6:41
Original issue reported on code.google.com by
fredrik....@gmail.com
on 16 Jan 2009 at 8:05