How to use

 Index
Keisan Online Calculator service aims to achieve the high precision of calculation by applying Arithmetic Operation System with variable number of digits developed by Casio.
 Feature of Keisan Online Calculator Service
1. The digit number can be specified.
 digit 6     √5 =sqrt(5) =2.23607
 digit 14     √5 =sqrt(5) =2.2360679774998

2. All operations are carried out in the decimal system.
 keisan     (0.9-0.3*3) =0
 Excel     (0.9-0.3*3) =1.11022E-16

3. The number of correct digits in the operation result is automatically judged and the precise operation result is returned.
 digit  6     1-0.999876 =1.24000E-4
 digit 10     gamma(3.5) =3.323350970

4. Complex number, probability function, special function, and repeated calculation can be handled.
   [digit 6]
 Complex number  (1+i)^(1+i) =0.273957+0.583701i
 Error function  x=0.1    erf(x) =0.112463
 Repeated calculation  x=2,1,5   sqrt(x) =
x sqrt(x)  
2 1.41421
3 1.73205
4 2
5 2.23607
6 2.44949

5. The library of expressions can be utilized.
Ex) Area of triangle  s=(a+b+c)/2; a=3; b=4; c=5;
 sqrt(s*(s-a)*(s-b)*(s-c))

Reference.
 Patent:   USA Patent No.7716267(May 5, 2010)
Japan Patent No.4483491(April 2, 2010)
 Technical material: Development of an Arithmetic Operation System of a variable digit number type

Description rule of expression
1. Numerical values
The numerical value is displayed with combination of
0,1,2,3,4,5,6,7,8,9, .(decimal point), E(exponent), i (imaginary number),+ and -
Example Explanation
12340.56789 1.234056789E4
E2 100
1.23E+4 12300      Note: + after E is the sign of exponent
1.23E-4 0.000123  Note: - after E is the sign of exponent
i 0+1i
E+2i 0+100i
1.23+4.56i Note: In order to handle the expression as complex number, put it in the parenthesis
1.23E3+4.56E2i 1230+456i
1.23E-3-4.56E+2i 0.00123-456i
Note: A capital letter E is used for an exponent. (A small letter e is used for Napier's constant.)

2. Variables
The variable begins with an English letter and is composed of letters, words and/or numbers.
However, it is not possible to use the same variable identifier as special sign and reserved word.
Valid  a, sinx, a3, interest_rate and the like
Invalid  reserved word such as e, i, inf, sin
 #abc, 3abc

3. Functions
The function consists of the reserved word, and the one or more of arguments which are surrounded by the parenthesis.
if there are more than two arguments, they have to be divided by comma.
The numerical value, variable, function and expression can be described as the argument.
Ex)   sin(x)
        normalcd(x,,2)
        normalcd(x+y,ln(12),)
The parenthesis is not required for constant. 
Ex)   pi   inf   e

4. Operators
The operators (+, -, *, /, ^, ! and = ) execute operations between each element of numerical value, variable and function.
Example Explanation
Element 1 + Element 2 Add Element 1 to Element 2.
Element 1 - Element 2 Subtract Element 2 from Element 1.
Element 1 * Element 2 Multiply Element 1 by Element 2.
(* it is possible also to abbreviate)
Element 1 / Element 2 Divide Element 1 by Element 2.
Element 1 ^ Element 2 Calculate Element 1 to the power of Element 2.
Element 1 ! Factorial of Element 1.
(Note that the factorial operation is performed only for one element.)
Element 1 = Element 2 Substitute the operation result of Element 2 into Element 1.
Therefore Element 1 must be variable.

5. Expressions
The expression is composed of numerical value, variable and function, each element of which is connected by the operator. Further, the expressions can be connected by the operator as one element.
The operational order between each element follows "the operational order of expressions".
Ex) element1 + element2 - element3 * element4 / element5 ^ element6 ! +

6. Miscellaneous
Minus "-", excluding the exponential part of expression, is regarded as a binary operator.
Minus "-" at the beginning of the expression or immediately after the open parenthesis or immediately after the semicolon, is considered as that the beginning of zero is abbreviated.
Ex)  -a+b   →  (0-a)+b
   -a^b   →  0-(a^b)
   a^-b   →  Error
   a^(-b)   →  a^(0-b)
   a*b;-a*b   →  a*b;0-(a*b)
   a*-b   →  Error
In order to make expression easy to see, insert the space between words.

Order of operations in expression
1. The expression is operated in the higher priority order of the operator.
2. The operation is performed from the left side if there is more than one operator of the same priority.
3. The operation inside the parenthesis is performed with high priority.
4. Further, the parenthesis can be described inside the parenthesis. In that case, the priority is given to the inside parenthesis.

Type and priority of operator
Priority Operator Meaning
high




low
Function Intrinsic function
!!, !, ^ Double factorial, Factorial and Power
*, / Multiplication and Division
+, - Addition and Subtraction
= Substitution

Mistakable description example of expression.
1. The order of operations without parenthesis..
2+3*4 2+(3*4) The multiplication is calculated first than the addition.
3*4^5 3*(4^5) The power is calculated first than the multiplication.
sin(2)^3 (sin(2))^3 The function is calculated first than the power.
1/2i 1/(2i) The imaginary number sign takes precedence. 
3!!! (3!!)! The double factorial takes precedence from the factorial.

2. The expression without multiplication sign.
3a    It is calculated as 3*a.
a3    a3 is handled as variable identifier.
a(b+c)    It is not calculated as a* (b+c). "a" is handled as user defined function.
(a+b)(b+c)    It is calculated as (a+b)*(b+c).

Numerical values, operators and constants
Functional name Reserved word
Numerical values
   Number 1234567890 0 ~9
Decimal point 0.123 .
Sign -123, +456 +,-
Exponent 1.23E-45 E
Imaginary number 2+3i i
Operators
  Addition x+y +
Subtraction x-y -
Multiplication x*y *
Division x/y /
Power x^y ^
Factorial n! !
Double factorial n!! !!
Substitution a=123 =
Multiple expressions
  Expression separator a=2+3; b=4/7 ;
Constants
  Napier's constant e= 2.71828 e
Infinity inf
Pi π = 3.14159...pi
Euler's constant γ= 0.5772...euler
Logical value true = 1
false = 0
true
false

Elementary functions
Functional name Reserved word
Logarithm and Exponential functions
Square root sqrt(x)
Common logarithm log log(x)
Natural logarithm ln ln(x)
Exponential ex e^x
Power xy x^y
Trigonometric functions
  Sine sin sin(x)
Cosine cos cos(x)
Tangent tan tan(x)
Invese sine sin-1 asin(x)
Invese cosine cos-1 acos(x)
Invese tangent tan-1 atan(x)
Hyperbolic functions
  Hyperbolic sine sinh sinh(x)
Hyperbolic cosine cosh cosh(x)
Hyperbolic tangent tanh tanh(x)
Invese hyperbolic sine sinh-1 asinh(x)
Invese hyperbolic cosine cosh-1 acosh(x)
Invese hyperbolic tangent tanh-1 atanh(x)
Combination and Permutation
  Combination nCr combination(n,r)
Permutation nPr permutation(n,r)
Factorial x! x!
Double factorial x!! x!!
Numerical functions (real number)
  Floor function int(4.2) =4
int(-4.2) =-5
int(x)
Ceiling function ceiling(4.2) =5
ceiling(-4.2) =-4
ceiling(x)
Integer part IP(4.2) =4
IP(-4.2) =-4
IP(x)
Fractional part FP(4.2) =0.2
FP(-4.2) =-0.2
FP(x)
Remainder on division of x by y mod(9,5) =4
mod(-9,5) =1
mod(x, y)
y*FP(x/y) remainder(9,5)=4
remainder(-9,5)=-4
remainder(x, y)
Rounding x to n decimal place(s)
round(2.35,1)=2.4
round(-2.35,1)=-2.4
round(x, n)
Round down x to n decimal place(s) rounddown(2.34,1) =2.3
rounddown(-2.34,1) =-2.4
rounddown(x, n)
Round up x to n decimal place(s) roundup(2.34,1) =2.4
roundup(-2.34,1) =-2.3
roundup(x, n)
IP(x*10n)/10n truncate(2.34,1) =2.3
truncate(-2.34,1) =-2.3
truncate(x, n)
Numerical functions (complex number)
  Sign sign(z) =1,0,-1 sign(z)
Complex conjugate number x+iyconjugate(z)
Real part x+iyRe(z)
Imaginary part x+iylm(z)
Absolute value |z| =|re| =r abs(z)
Complex argument reargument(z)
Cartesian coordinate conversion recartesian(z)
Cartesian coordinate conversion (r,θ)cartesian(r,θ)
Polar coordinate conversion x+iypolar(z)
Polar coordinate conversion (x, y)polar(x,y)

 Probability functions
Continuous distribution functions
Functional name Reserved word
Q: Upper cumulative distribution
 f: Probability density
 x: Percentage point
 : Non centrality
Standard normal distribution Q: normalcd(x)
 f: normalpd(x)
 x: normalicd(Q)
Normal distribution Q: normalcd(x,,)
 f: normalpd(x,,)
 x: normalicd(Q,,)
Logarithmic normal distribution Q: lognormalcd(x,,)
 f: lognormalpd(x,,)
 x: lognormalicd(Q,,)
Chi-square distribution Q: chi2cd(x,)
 f: chi2pd(x,)
 x: chi2icd(Q,)
t-distribution of student Q: tcd(x,)
 f: tpd(x,)
 x: ticd(Q,)
F-distribution Q: fcd(x,1,2)
 f: fpd(x,1,2)
 x: ficd(Q,1,2)
Noncentral chi-square distribution Q: ncchi2cd(x,,)
 f: ncchi2pd(x,,)
 x: ncchi2icd(Q,,)
 : ncchi2il(P,x,)
Noncentral t-distribution Q: nctcd(x,,)
 f: nctpd(x,,)
 x: ncticd(Q,,)
 : nctil(Q,x,)
Noncentral F-distribution Q: ncfcd(x,1,2,)
 f: ncfpd(x,1,2,)
 x: ncficd(Q,1,2,)
 : ncfil(Q,x,1,2)
Uniform distribution Q: uniformcd(x,a,b)
 f: uniformpd(x,a,b)
 x: uniformicd(Q,a,b)
Exponential distribution Q: exponentialcd(x,b)
 f: exponentialpd(x,b)
 x: exponentialicd(Q,b)
Weibull distribution Q: weibullcd(x,a,b)
 f: weibullpd(x,a,b)
 x: weibullicd(Q,a,b)
Gamma distribution Q: gammacd(x,a,b)
 f: gammapd(x,a,b)
 x: gammaicd(Q,a,b)
Beta distribution Q: betacd(x,a,b)
 f: betapd(x,a,b)
 x: betaicd(Q,a,b)
Laplace distribution Q: laplacecd(x,a,b)
 f: laplacepd(x,a,b)
 x: laplaceicd(Q,a,b)
Cauchy distribution Q: cauchycd(x,a,b)
 f: cauchypd(x,a,b)
 x: cauchyicd(Q,a,b)
Logistic distribution Q: logisticcd(x,,)
 f: logisticpd(x,,)
 x: logisticicd(Q,,)
< Note >
 For the reserved word which uses lower cumulative probability P, add "lower" to the above-mentioned each reserved word end.
 Ex)  P=poissoncdlower (x,), x=poissonicdlower (P,), =poissonillower (P, x)

Discrete distribution functions
Functional name Reserved word
Q: Upper cumulative distribution
 f: Probability density
 x: Percentage point
 : Non centrality
Poisson distribution Q: poissoncd(x,)
 f: poissonpd(x,)
 x: poissonicd(Q,)
 : poissonil(Q,x)
Binomial distribution Q: binomialcd(x,n,p)
 f: binomialpd(x,n,p)
 x: binomialicd(Q,n,p)
Negative binomial distribution Q: negbinomialcd(x,k,p)
 f: negbinomialpd(x,k,p)
 x: negbinomialicd(Q,k,p)
Geometric distribution Q: geometriccd(x,p)
 f: geometricpd(x,p)
 x: geometricicd(Q,p)
Hypergeometric distribution Q: hypgeometriccd(x,n,M,N)
 f: hypgeometricpd(x,n,M,N)
< Note >
 For the reserved word which uses lower cumulative probability P, add "lower" to the above-mentioned each reserved word end.
 Ex)  P=poissoncdlower (x,), x=poissonicdlower (P,), =poissonillower (P, x)

 Bessel functions
Bessel functions
Functional name Reserved word
f (x)
f '(x)
f-1 (0), s=1,2...
f '-1 (0), s=1,2...
Bessel function of the 1st kind J(x) besselj(,x)
besseljdf(,x)
besseljzeros(,s)
besseljdfzeros(,s)
Bessel function of the 2nd kind Y(x) bessely(,x)
besselydf(,x)
besselyzeros(,s)
besselydfseros(,s)
Modified bessel function of the 1st kind I(x) besseli(,x)
besselidf(,x)
Modified bessel function of the 2nd kind K(x) besselk(,x)
besselkdf(,x)
Hankel function of the 1st kind H(1)(x) hankelH1(,x)
hankelH1df(,x)
Hankel function of the 2nd kind H(2)(x) hankelH2(,x)
hankelH2df(,x)

Spherical Bessel functions
Functional name Reserved word
f (x)
f '(x)
f-1 (0), s=1,2...
f '-1 (0), s=1,2...
Spherical bessel function of the 1st kind j(x) sphericalbesselj(,x)
sphericalbesseljdf(,x)
sphericalbesseljzeros(,s)
sphericalbesseljdfzeros(,s)
Spherical bessel function of the 2nd kind y(x) sphericalbessely(,x)
sphericalbesselydf(,x)
sphericalbesselyzeros(,s)
sphericalbesselydfzeros(,s)
Modified spherical bessel function of the 1st kind i(x) sphericalbesseli(,x)
sphericalbesselidf(,x)
Modified spherical bessel function of the 2nd kind k(x) sphericalbesselk(,x)
sphericalbesselkdf(,x)
Spherical hankel function of the 1st kind h(1)(x) sphericalhankelH1(,x)
sphericalhankelH1df(,x)
Spherical hankel function of the 2nd kind h(2)(x) sphericalhankelH2(,x)
sphericalhankelH2df(,x)

Airy functions
Functional name Reserved word
f (x)
f '(x)
f-1 (0), s=1,2...
f '-1 (0), s=1,2...
Airy function Ai(x) airyai(x)
airyaidf(x)
airyaizeros(s)
airyaidfzeros(s)
Airy function Bi(x) airybi(x)
airybidf(x)
airybizeros(s)
airybidfzeros(s)

Kelvin functions
Functional name Reserved word
f (x)
f '(x)
Kelvin function of the 1st kind ber(x) ber(,x)
berdf(,x)
Kelvin function of the 1st kind bei(x) bei(,x)
beidf(,x)
Kelvin function of the 2nd kind ker(x) ker(,x)
kerdf(,x)
Kelvin function of the 2nd kind kei(x) kei(,x)
keidf(,x)
Kelvin function of the 3rd kind her(x) her(,x)
herdf(,x)
Kelvin function of the 3rd kind hei(x) hei(,x)
heidf(,x)

 Special functions
Gamma functions
Functional name Reserved word
Gamma function (a) gamma(a)
Lower
incomplete gamma function
(a,x) igamma1(a,x)
Upper
incomplete gamma function
(a,x) igamma2(a,x)
gamma(a,x)
Lower regularized
incomplete gamma function
(a,x)/(a) gammap(a,x)
Upper regularized
incomplete gamma function
(a,x)/(a) gammaq(a,x)
Logarithm of gamma function ln(a) lngamma(a)
Digamma function Ψ(a) polygamma(a)
Polygamma function Ψ(n)(a) polygamma(n,a)
Double factorial x!! x!!
Pochhammer function (x)n pochhammer(x,n)

Beta functions
Functional name Reserved word
Beta function B(a,b) beta(a,b)
Regularized
incomplete beta function
Ix(a,b) y: ibeta(x,a,b)
x: ibetaix(y,a,b)
Regularized
incomplete beta function
I1-x(a,b) y: ibetac(x,a,b)
x: ibetacix(y,a,b)

Error functions
Functional name Reserved word
Error function erf(x) y: erf(x)
x: erfix(y)
Complementary error function erfc(x) y: erfc(x)
x: erfcix(y)
Imaginary error function erfi(x) y: erfi(x)

Elementary function integrals and Fresnel integrals
Functional name Reserved word
Exponential integral Ei(x) Ei(x)
Exponential integral En(x) Ei(n,x)
Logarithmic integral li(x) li(x)
Sine integral Si(x) Si(x)
Cosine integral Ci(x) Ci(x)
Hyperbolic sine integral Shi(x) Shi(x)
Hyperbolic cosine integral Chi(x) Chi(x)
Fresnel sine integral S(x) fresnelS(x)
Fresnel cosine integral C(x) fresnelC(x)

Elliptic integrals and Elliptic functions
Functional name Reserved word
Complete elliptic integral of the 1st kind K(k) ellipticK(k)
Complete elliptic integral of the 2nd kind E(k) ellipticE(k)
Complete elliptic integral of the 3rd kind (n,k)ellipticPi(n,k)
Incomplete elliptic integral of the 1st kind F(x,k) ellipticF(x,k)
Incomplete elliptic integral of the 2nd kind E(x,k) ellipticE(x,k)
Incomplete elliptic integral of the 3rd kind (x,n,k)ellipticPi(x,n,k)
Jacobi elliptic function sn sn(u) jacobiSN(u,k)
Jacobi elliptic function cn cn(u) jacobiCN(u,k)
Jacobi elliptic function dn dn(u) jacobiDN(u,k)
Jacobi amplitude function am(u) jacobiAM(u,k)

Orthogonal polynomials
Functional name Reserved word
Hermite polynomial Hn(x) hermiteH(n,x)
Chebyshev polynomial of the 1st kind Tn(x) chebyshevT(n,x)
Chebyshev polynomial of the 2nd kind Un(x) chebyshevU(n,x)
Legendre polynomial Pn(x) legendreP(n,x)
Associated Legendre polynomial Pnm(x) legendreP(n,,x)
Laguerre polynomial Ln(x) laguerreL(n,x)
Associated Laguerre polynomial Ln(x) laguerreL(n,,x)
Gegenbauer polynomial Cn(x) gegenbauerC(n,,x)
Jacobi polynomial Pn,(x) jacobiP(n,,,x)
Spherical harmonics Ynm(,) sphericalharmonicY(n, m,,)

Other functions
Functional name Reserved word
Confluent hypergeometric function of the 1st kind 1F1(a;b;x) F11(a,b,x)
Confluent hypergeometric function of the 2nd kind U(a;b;x) FU11(a,b,x)
Gauss hypergeometric function 2F1(a,b;c;x) F21(a,b,c,x)
Bernoulli number Bn bernoulli(n)
Riemann zeta function (x) zeta(x)


Programming
This programming language is a "C-language-like" simple one and specialized for numerical computation.

Reserved word Quick instruction
if(expression) {statement;...} elseif(expression) {statement;...} else{statement;...} If the conditional expression of "if" is true, the statement is executed.
If false, the statement is executed by the conditional expression of "elseif".
The if statement ends after the execution of one of statements.
while(expression) {statement;...} If the conditional expression is true, the statement is executed.
The statement is repeatedly executed and ends when the conditional expression becomes false.
do{statement;...} while(expression); After the statement is unconditionally executed,
if the conditional expression is true, the statement is again executed.
If false, the statement ends.
for(initialize; check; update) {statement;...} At first the variable is initialized, and if the conditional expression is true, the statement is executed.
After the execution of the statement, the variable is incremented, the conditional expression is again evaluated,
and then the same procedure described above is repeatedly executed.
When the conditional expression becomes false, the statement ends.
break It escapes from a loop unconditionally.
continue It returns to the beginning of a loop unconditionally.

Display controls and Comment
Reserved word Quick instruction
print(expression1,expression2,...) The value of expression is outputted.
println(expression1,expression2,...) After outputting the value of expression, a new line is started.
/*comment*/ It participates in neither expression nor control.

Logical operators and Logical values
 If a conditional expression is truth, the value is true. If not, the value is false.
Classification Reserved word Quick instruction
Logical operators
not Priority order: not > and > or
and
or
== The left expression is equal to the right expression. =
<> The left expression is not equal to the right expression. !=
=<, <= The left expression is less than or equal to the right expression. <=
=>, >= The left expression is greater than or equal to the right expression. >=
< The left expression is less than the right expression. <
> The left expression is greater than the right expression. >
Logical values
true true=1 (!=0)
false false=0