Comments (5)
Thanks for reporting.
from fastnumbers.
It appears _Py_dg_stdnan is no longer present (actually, dtoa.h is gone entirely).
The following program can reproduce this easily:
#include <Python.h>
int main()
{
printf("%f\n", _Py_dg_stdnan(0));
return 0;
}
It outputs nan
in Python 3.8 and 0.000000
with 3.9 (with a GCC warning: implicit declaration of function '_Py_dg_stdnan' [-Wimplicit-function-declaration]
.
An easy workaround is to include internal/pycore_dtoa.h
instead:
#define Py_BUILD_CORE 1
#include <internal/pycore_dtoa.h>
#undef Py_BUILD_CORE
This passes all tests here with Python 3.9.
from fastnumbers.
@felixonmars Thanks for the debug of how to find the new dtoa.h
. Though, I probably should stop depending on internal, non-public functionality, so I'll try to make a more robust fix.
from fastnumbers.
FYI - this was fixed as part of fastnumbers 3.1.0
from fastnumbers.
Thanks! I've updated to 3.1.0 in the repos as well :)
from fastnumbers.
Related Issues (20)
- Unit test numeric issues on 32bit arm CPU HOT 3
- Speed not better than Python's int/float HOT 6
- Make most options keyword-only
- Rename "key" option to "on_fail"
- [BUG] FastNumbers can crash with a SystemError due to returning NULL without setting an exception HOT 5
- Fastest way to check is and object is int or float in one pass HOT 14
- Proposal: change behavior of isfloat with respect to treatment of float("nan") HOT 19
- Proposal: change behavior of isfloat function with respect to treatment of strings containing integers HOT 3
- Proposal: Do not raise an exception on None HOT 5
- Re-write using C++ and pybind11
- Add support to release Linux aarch64 wheels HOT 1
- Broken 3.2.0 installation
- Missing -lm breaks build on armv7hl
- Error: <built-in function isint/isfloat> returned NULL without setting an error HOT 2
- Use fast C++ methods like std::from_chars or fast_float HOT 1
- Improve performance with METH_FASTCALL
- Add support for operating on iterables
- Add numpy support? HOT 2
- Big numbers handling: silencing arbitrary digits beyond least significant bit HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastnumbers.