mxtlrr / treng

Hyperoperation engine with it's own homebrew big number library.
1 stars 0 forks source link

`Number::toInt()` fails if number is greater than `18446744073709551615` #2

Closed mxtlrr closed 2 months ago

mxtlrr commented 2 months ago

Number::toInt() looks like this:

long long unsigned int Number::toInt(){
  return std::stoull(this->toString());
}

This function fails once long long unsigned int reaches it's maximum value, which is 18,446,744,073,709,551,615. For stuff like $2\uparrow\uparrow6$, this is unacceptable!

What can we do to fix this?

Rewrite toInt to support huge numbers (maybe a vector?)

mxtlrr commented 2 months ago

Exception from GDB:

image