Operator | Description | Mode |
---|---|---|
^ | Exponential Power | Only works while in Operator Mode: Math* |
! | Factorial | |
@ | converts base10 to base2-36, (5@2=101) | |
# | converts base2-36 to base10 (AB#16=171) | |
° | converts degree to radian (180°=pi) | |
°° | converts radian to degree (2*pi°°=360) | |
^^ | Bitwise XOR | |
!! | Logical NOT | |
^ | Bitwise XOR | Only works while in Operator Mode: JavaScript* |
! | Logical NOT | |
+, -, *, / | Add, Subtract, Multiply, Dived | Works in both modes |
% | Modulus, returns integer remainder from division | |
~, &, | | Bitwise NOT, AND, OR | |
<<, >>, >>> | Bitwise left shift, right shift, zero-fill right shift | |
&&, || | Logical AND, OR | |
++, -- | Incremnet, Decrement | |
?: | if-else (boolean?true:false) |
Name | Description |
---|---|
calc(string) | runs TPC on the string |
quad(a,b,c) | factors of quadric equation. |
quad1(a,b,c) | (-b+sqrt(b^2-4*a*c))/(2a) |
quad2(a,b,c) | (-b-sqrt(b^2-4*a*c))/(2a) |
factors(n) | factors of integer n |
sumOfFactors(n) | some of unique factors |
fib(n) | fibonacci number n |
isPrime(i) | true if n is prime |
factorial(n) | factorial of n |
fromBase10(value,base) | converts to base(2-36) |
toBase10(string,base) | convert from base(2-36) |
log(base,value) | log of value in the base |
gcd(a,b) | Greatest common divisor |
lcm(a,b) | Least common multiple |
roundOffError(value,SignifanctDigits) | roundOffError(_n,_p) |
frac(value[,accuracy]) | convert number to a fraction, if it's a rational number |
(Also user defined functions) |
Operator | Description |
---|---|
pi | 3.141592653589793 |
e | 2.718281828459045 |
Phi | (sqrt(5)+1)/2 (Golden Ratio) |
phi | 1/Phi = (sqrt(5)-1)/2 |
_DIGITS | "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
Method | Description |
---|---|
abs(n) | Absolute value |
sin(n), cos(n), tan(n) | Standard trigonometric functions; argument in radians |
acos(n), asin(n), atan(n) | Inverse trigonometric functions; return values in radians |
exp(n), log(n) | Exponential and natural logarithm, base e |
ceil(n) | Returns least integer greater than or equal to argumen |
floor(n) | Returns greatest integer less than or equal to argument |
min(n,...), max(n,...) | Returns greater or lesser (respectively) of two arguments |
pow(base,n) | Exponential; first argument is base, second is exponent |
round(n) | Rounds argument to nearest integer |
sqrt(n) | Square root |
random() | a random number between 0 <= n < 1 |
Method | Description |
---|---|
MAX_VALUE | The largest representable number |
MIN_VALUE | The smallest representable number |
NaN | Special "not a number" value |
NEGATIVE_INFINITY | Special infinite value; returned on overflow |
POSITIVE_INFINITY | Special negative infinite value; returned on overflow |
? | 454324.125@16 |
= | 6EEB4.2 |
? | ABF3D.2A#16 |
= | 704317.1640625 |
? | factors(32) |
= | 32,16,2,8,4,1 |
? | cos(pi/4) |
= | 0.7071067811865476 |
? | function myMethod(a,b) { return a*b; } myMethod(3,4); |
= | 12 |
? | function myMethod(a,b) { for (i=0;i<b;i++) { a+=b; } return a; } myMethod(6,7); |
= | 55 |
? | function listprimes(start,end) { t=""; for (i=start; i<=end; i++) if (isPrime(i)) t=t+""+i+","; return t; } listprimes(1,25); |
= | 1,3,5,7,11,13,17,19,23, |
? | 2^4 |
= | 16 *in Math Mode |
= | 6 *in JavaScript Mode |