This content has been marked as final. Show 3 replies
Hello,You mean Achilles heel? Apparently spelling isn't a strong suit, either.
I'm making an app which requires doing math on some
arbitrary large numbers. Since math is usually my
achilles heal, I have no idea how to do this.
Specifically, i have a byte number and I'm tryingWho told you that a byte array would be a good way to go?
to implement these two functions:
Ever thought about starting with arithmetic and working your way up?
What happened to abstraction? Shouldn't you create a class that hides the fact that you're using a byte array or something else?
byte root(byte number,int radix)Newton Raphson iteration is a good place to start for roots:
byte pow(byte base,int power)If it's really an integer power, just loop "power" times and multiply the number by itself each time. Not too difficult.