[Numpy-discussion] longdouble (float96) literals
Wed Aug 18 09:52:54 CDT 2010
On Wed, Aug 18, 2010 at 10:36 AM, Charles R Harris
> On Wed, Aug 18, 2010 at 8:25 AM, Colin Macdonald <email@example.com>
>> On 08/18/10 15:14, Charles R Harris wrote:
>> > However, the various constants supplied by numpy, pi and such, are
>> > full precision.
>> no, they are not. My example demonstrated that numpy.pi is only
>> double precision.
> Hmm, the full precision values are available internally but it looks like
> they aren't available to the public. I wonder what the easiest way to
> provide them would be? Maybe they should be long double types by default?
playing with some examples, I don't seem to be able to do anything
with longdouble on win32, py2.5
>>> np.array([3141592653589793238L], np.int64).astype(np.longdouble)
>>> np.array([3141592653589793238L], np.int64).astype(float)
>>> 1./np.array([np.pi],np.longdouble) - 1/np.pi
and it doesn't look like it's the print precision
type conversion and calculations seem to go through float
> NumPy-Discussion mailing list
More information about the NumPy-Discussion