mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 23:00:45 +01:00
[poincare] Increase the limit of Integer to 1E308
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user