[poincare] Increase the limit of Integer to 1E308

This commit is contained in:
Émilie Feral
2018-08-03 11:36:38 +02:00
parent 5de11b122b
commit 9ddf1d2c33
2 changed files with 7 additions and 8 deletions

View File

@@ -5,12 +5,11 @@
namespace Poincare {
/* Float reprensents an approximated number. This class is use when:
* - a rational overflows
* - to avoid turning float/double into Decimal back and forth because
* performances are dramatically affected when doing so. For instance, when
* plotting a graph, we need to set a float/double value for a symbol and
* approximate an expression containing the symbol for each dot displayed).
/* Float reprensents an approximated number. This class is use to avoid turning
* float/double into Decimal back and forth because performances are
* dramatically affected when doing so. For instance, when plotting a graph, we
* need to set a float/double value for a symbol and approximate an expression
* containing the symbol for each dot displayed).
* We thus use the Float class that hold a float/double.
* Float can only be approximated ; Float is an INTERNAL node only. Indeed,
* they are always turned back into Decimal when beautifying. Thus, the usual

View File

@@ -56,9 +56,9 @@ public:
static IntegerReference upow(const NaturalIntegerAbstract * a, const NaturalIntegerAbstract * b);
static IntegerReference ufact(const NaturalIntegerAbstract * a);
constexpr static int k_maxNumberOfDigits = 11;
constexpr static int k_maxNumberOfDigits = 32;
protected:
constexpr static int k_maxNumberOfDigitsBase10 = 105; // (2^32)^k_maxNumberOfDigits-1 ~ 10^105
constexpr static int k_maxNumberOfDigitsBase10 = 308; // (2^32)^k_maxNumberOfDigits ~ 1E308
NaturalIntegerAbstract(size_t numberOfDigits = 0) :
m_numberOfDigits(numberOfDigits)
{