jremington:
Explain what you mean by "the code cuts out".
Uhh, it stops haha, I don't know how to explain it better than it completely goes to a halt, i.e. stopping/quitting/ not running/executing, etc. As the output shows here: https://i.imgur.com/g61OeAJ.png
jremington:
Well, you are doing something wrong. But you forgot to post all the code, so it is anyone's guess what that might be.
Study this tutorial. You will note that the author uses a custom function to print a BigNumber.
Obviously. Alas, that is why I am here, perhaps someone has encountered the same problem.
If you would actually look, at the page you are referencing, you would realize that the author updated the library to support the builtin serial output....
"[...] This means that you can now print big numbers from any class derived from Stream (eg. Serial, Serial1, etc.)."
As I understand C++, this will create a new local variable x each time through the loop (on the stack?) and not delete them until they "go out of scope" (ie the loop is done.) That means that you're trying to put 107 bignums into memory, and there probably isn't room (~1 byte per digit, and you're using 50+ digit numbers!) You've overwritten access to the older variable "handles" ("x"), so you can't access the older versions of the variable, but they're still there - if they're on the stack as I expect, they can be successfully deleted automatically IFF the device had enough memory (ie, this would probably run OK on a desktop PC.)
Try something more like:
BigNumber me = 183;
BigNumber x = 0;
for(int i = 1; i<= 107;i++){
Serial.print ("183^");
Serial.print (i);
Serial.print (" = ");
x = me.pow(i);
Serial.println(x);
}
That's still not likely to be GOOD; the loop will have to keep re-allocating a slightly bigger bignum, but it should be better...