Open GoogleCodeExporter opened 9 years ago
This happens because mpi() rounds integers to the nearest pair of floating point
numbers whereas a direct function application attempts not to perform any
rounding.
Note that this works:
>>> mp.dps = 1000
>>> a = mpi(10**100)
>>> mp.dps = 15
>>> sin(a)
[-0.37237612366127670338, -0.37237612366127664787]
Original comment by fredrik....@gmail.com
on 4 Oct 2008 at 1:27
So this is not an issue and should be closed?
Original comment by Vinzent.Steinberg@gmail.com
on 4 Oct 2008 at 1:29
Do you think it should be done differently?
I've thought about having the constructors mpf, mpc and mpi not perform any
rounding
(unless necessary, when given e.g. strings). It would simplify some things.
Original comment by fredrik....@gmail.com
on 4 Oct 2008 at 1:37
It's currently not straightforward to track errors using mpi for
sin(mpi(10**100))),
but this is not a real life example however.
What's the point in performing such rounding (when not necessary)?
Original comment by Vinzent.Steinberg@gmail.com
on 4 Oct 2008 at 2:01
The point is that if one creates an instance at a given precision, it will
correspond
uniquely to its repr at that precision.
The same can be accomplished with the + operator, though.
Original comment by fredrik....@gmail.com
on 4 Oct 2008 at 2:09
Original issue reported on code.google.com by
Vinzent.Steinberg@gmail.com
on 4 Oct 2008 at 1:21