[Numpy-discussion] longdouble (float96) literals

Colin Macdonald macdonald at maths.ox.ac.uk
Wed Aug 18 09:37:14 EDT 2010


On 08/18/10 13:43, Charles R Harris wrote:
>
>
> On Wed, Aug 18, 2010 at 3:46 AM, Colin Macdonald
> <macdonald at maths.ox.ac.uk <mailto:macdonald at maths.ox.ac.uk>> wrote:
>
>     How can I enter longdouble (float96) literals into my python/numpy
>     programs?  In C, I would postfix such numbers with 'L', but this gives
>     a SyntaxError in python.
>
> I don't know how to do this without using strings and having numpy do
> it's own string conversions. IIRC, we currently rely on Python for
> this and Python doesn't support long doubles. You might open a ticket
> with a request for an enhancement as we should fix this at some point.

I'd be at least partially satisfied with doing a string conversion ;-)
How would I do that?  Is there something like strtolongdouble()?  Or a 
sscanf function?

I will try to remember to open a ticket for the issue.

Perhaps the issue that numpy.longdouble("0.4") doesn't work properly a 
slightly separate bug...



More information about the NumPy-Discussion mailing list