File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
quaddtype/numpy_quaddtype/src Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,22 @@ extern "C" {
3030#include " constants.hpp"
3131
3232#define NUM_CASTS 40 // 18 to_casts + 18 from_casts + 1 quad_to_quad + 1 void_to_quad
33- #define QUAD_STR_WIDTH 50 // 42 is enough for scientific notation float128, just keeping some buffer
33+
34+ /*
35+ For quad precision scientific notation, we need at most:
36+
37+ 1 character for sign
38+ 1 character for leading digit
39+ 1 character for decimal point
40+ 36 significant digits
41+ 1 character for e
42+ 1 character for exponent sign
43+ 4 characters for exponent (max is 4932)
44+ 1 null terminator
45+
46+ Total: 46 characters, using 50 as a safe buffer
47+ */
48+ #define QUAD_STR_WIDTH 50
3449
3550// forward declarations
3651static inline const char *
You can’t perform that action at this time.
0 commit comments