[Tutor] hi
Oscar Benjamin
oscar.j.benjamin at gmail.com
Sat Aug 10 18:33:36 CEST 2013
On 10 August 2013 16:10, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
>
> We can probably get the error down to say 1e-27 by using a step-size
> of 1e-6. However it would take an hour or two to run that on my
> computer (there's probably not much scope for optimisation since
> profiling identifies the exp() function as the culprit).
Actually I was wrong about that. There is a Decimal.exp method that is
about 10x faster:
>>> from decimal import Decimal as D
>>> D(1).exp()
Decimal('2.718281828459045235360287471')
Oscar
More information about the Tutor
mailing list