mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] PrintFloat: fix bufferSizeForFloatsWithPrecision (worst case
is -1.234567E-201 for 7 significative digits)
This commit is contained in:
@@ -10,8 +10,8 @@ class Integer;
|
||||
|
||||
namespace PrintFloat {
|
||||
constexpr static int bufferSizeForFloatsWithPrecision(int numberOfSignificantDigits) {
|
||||
// The wors case is -1.234E-38
|
||||
return numberOfSignificantDigits + 7;
|
||||
// The wors case is -1.234E-328
|
||||
return numberOfSignificantDigits + 8;
|
||||
}
|
||||
/* This function prints the integer i in the buffer with a '.' at the position
|
||||
* specified by the decimalMarkerPosition. It starts printing at the end of the
|
||||
|
||||
Reference in New Issue
Block a user