Operations with big integers
All operations are made with strings, you do not need do create any objects.Where argument type is String, it also works with Number
There 14 functions:
add(String a, String b): returns String a+b, you can also call String.add(b) and it will return a+b without changing the original String
sub(String a, String b): returns String a-b, or String.sub(b), as above
mul(String a, String b): returns String a*b, or String.mul(b), as above
div(String a, String b): returns String Euclidean division, or String.div(b), as above
mod(String a, String b): returns String Euclidean division remainder, or String.mod(b), as above
pow(String a, Number b): returns String a^b, or String.pow(b), as above
sign(String n): returns Number (1, 0 ot -1), or String.sign(), as above
abs(String n): returns String abs(n), or String.abs(), as above
min(String a, String b): returns String which is less than another
max(String a, String b): returns String which is bigger than another
isbigger(String a, String b): returns Boolean is a>=b or not
sqr(String n): returns String a^2, or String.sqr(), as above
fibo(Number n): returns String n-th Fibonacci number
fact(Number n): returns String factorial of n
Usage examples
add(25, 30); //returns '55'
sub('36', 11); //returns '25'
"45".add(7); //returns '52'
let n = '16';
n.pow(3).add('10'); //returns '4106', 16^3 + 10
Input is not an integer!
Input is not an integer!