Change by Ganesh Kathiresan :
--
components: C API
nosy: ganesh3597
priority: normal
severity: normal
status: open
title: Should PyLong_AsLongAndOverflow raise exception on overflow?
type: behavior
versions: Python 3.10
___
Python tracker
<ht
Ganesh Kathiresan added the comment:
Hi All, thanks for the input. Yeah, the current behavior makes sense, if
overflow exception is needed, we can use PyLong_AsLong. I guess my confusion
was from the doc:
> set *overflow to 1 or -1, respectively, and return -1;
> Returns -1 on erro
New submission from Ganesh Kathiresan :
I wanted to know if there is a way to parse and store c `long double`. I only
found `PyFloat_FromDouble` and in the same page, `PyFloat_GetMax` returns:
> Return the maximum representable finite float DBL_MAX as C double.
Meaning, there is no scope
Ganesh Kathiresan added the comment:
Ohh ok, thanks for the info Mark. Any plans to add it in the future?
My bad, sorry, will change to C-API.
--
components: +C API -ctypes
versions: +Python 3.7 -Python 3.10
___
Python tracker
<ht
Ganesh Kathiresan added the comment:
Oh I see. Yeah my ask is particularly around support for long double precision
in python. What I am trying to do is essentially attempt to speed up the
comparison of NumPy scalars: https://github.com/numpy/numpy/pull/17970.
We have support for float128
Ganesh Kathiresan added the comment:
Oh apologies for changing the version, makes sense for 3.10. I had it opened
before the change and sort of conflicted into taking my old preset 3.7 on the
page
--
___
Python tracker
<https://bugs.python.