Menu of Available Commands for the Eval function in the Long Number Complex Calculator
The "Eval" button will apply a javascript "eval" function to the text in the first box for variable "X". Output is not automatic for this button: You must use the "prt" function to add to the output results. Here is a list of functions you can use for the "Eval" option available in the complex number version of the javascript calculator: Note: All complex-valued functions except "toPolr" output results in rectangular coordinates. (Remember that this is a javascript function, so commands and variable names are case-sensitive. Also, be aware that some functions expect integer or single-argument real input, so unexpected results can occur if you feed those functions with non-integer or complex input.)Function | Meaning |
maxdigits(x) | Change the Max Digits setting to x |
prt(x) | Append x to the output that will appear in the results |
abs(x) | (absolute value of x(real), absolute value of x(imaginary)) |
neg(x) | -x |
a(x, y) | x + y |
s(x, y) | x - y |
m(x, y) | x * y |
d(x, y) | x / y |
toPolr(x) or toPolr(x, y) | Coerces x to the corresponding variable with polar coordinates, or sets the output to a complex number with radius x and angle y. |
toRect(x) or toRect(x, y) | Coerces x to the corresponding variable with rectangular coordinates, or sets the output to a complex number in rectangular coordinates with x-coordinate x and y-coordinate y. |
arg1(x) | If x is in rectangular format, output the x-coordinate. If x is in polar format, output the radius. |
arg2(x) | If x is in rectangular format, output the y-coordinate of x. If x is in polar format, output the angle. |
radius(x) | The radius coordinate of a complex number x. |
angle(x) | The angle coordinate of a complex number x. |
sqr(x) | x * x |
sqrt(x) | Square root of x |
pow(x, y) | x raised to y power |
root(x, y) | yth root of x |
doubleValue(x) | real-valued x converted to double |
dblln(x) | Natural Log of real-valued x converted to double |
dbllog2(x) | Base 2 Log of real-valued x converted to double |
dbllog10(x) | Decimal Log of x converted to double |
gcd(x, y) | Greatest Common Divisor of x and y |
lcm(x, y) | Least Common Multiple of x and y |
flr(x) | (x.real truncated to integer, x.imaginary truncated to integer) |
exp(x) | Natural Exponential function |
ln(x) | Natural Logarithmic function |
tenpow(x) | 10 raised to the x power |
log10(x) | Base 10 Logarithmic function |
fctrl(x) | x factorial |
comb(x, y) | Combinations x choose y |
perm(x, y) | Permutations x choose y |
gamma(x) | Gamma function |
sin(x) | Trigonometric sine |
cos(x) | Trigonometric cosine |
tan(x) | Trigonometric tangent |
asin(x) | Trigonometric Arcsine |
acos(x) | Trigonometric Arccosine |
atan(x) | Trigonometric Arctangent |
sinh(x) | Hyperbolic sine |
cosh(x) | Hyperbolic cosine |
tanh(x) | Hyperbolic tangent |
asinh(x) | Inverse hyperbolic sine |
acosh(x) | Inverse hyperbolic cosine |
atanh(x) | Inverse hyperbolic tangent |
am(x, y) | Arithmetic mean of x and y |
gm(x, y) | Geometric mean of x and y |
hm(x, y) | Harmonic mean of x and y |
agm(x, y) | Arithmetic-Geometric mean of x and y |
ghm(x, y) | Geometric-Harmonic mean of x and y |
ahm(x, y) | Arithmetic-Harmonic mean of x and y |
compareLog2To(x, y) | -1 or 1 as Base 2 Log of real-valued x is less than or greater than y (y is a double) |
compareTo(x, y) | -1, 0, or 1 as real-valued x is less than, equal to, or greater than real-valued y |
isprime(x) | 1 if x is prime, else 0 |
nextprime(x) | next prime after x |
prevprime(x) | previous prime to x |
pi() | Constant Pi |
em() | Constant Euler-Mascheroni |
ln2() | Constant natural log(2) |
ln10() | Constant natural log(10) |
bernoulli(x, y) | Bernoulli Function at x & y |
euler(x, y) | Euler Polynomial at x & y |
bsl1(x, y) | Bessel Function of the first type at x & y |