-
- Downloads
py: Implement mp_format_float for doubles and use where appropriate
This allows using (almost) the same code for printing floats everywhere, removes the dependency on sprintf and uses just snprintf and applies an msvc-specific fix for snprintf in a single place so nan/inf are now printed correctly.
Showing
- py/formatfloat.c 79 additions, 11 deletionspy/formatfloat.c
- py/formatfloat.h 5 additions, 1 deletionpy/formatfloat.h
- py/mpprint.c 2 additions, 23 deletionspy/mpprint.c
- py/objcomplex.c 6 additions, 19 deletionspy/objcomplex.c
- py/objfloat.c 4 additions, 11 deletionspy/objfloat.c
- tests/float/float1.py 1 addition, 0 deletionstests/float/float1.py
- windows/mpconfigport.h 0 additions, 3 deletionswindows/mpconfigport.h
- windows/msvc/snprintf.c 0 additions, 44 deletionswindows/msvc/snprintf.c
Loading
Please register or sign in to comment