**Table of Content**

**Search clouds**

**Licenses**

**Author's resources**

You are a guest. Restricted access. Read more.

Command disabled: recent

The basic arithmetic operations are marked with the usual symbols (+ - * / ) . Exponention is performed with the accent character (^). Multiplication and division precede addition and subtraction; any order of evaluation can be forced by parenthesis.

>> 3.23*(14-2^5)/(15-(3^3-2^3)) ans = 14.535 >> 4.5e-23/0.0000013 ans = 3.4615E-17 >> 17.4^((3-2.13^1.2)^0.16) ans = 13.125 >> 17.23e4/(1.12-17.23e4/(1.12-17.23e4/1.12)) ans = 76919

In addition to these arithmetic operators Jasymca provides operators for comparing numbers

< > >= <= == ~=

and for boolean functions

& | ~

. Logical true is the number 1, false is 0.

>> 1+eps>1 ans = 1 >> 1+eps/2>1 % defines eps ans = 0 >> A=1;B=1;C=1; % semicolon suppresses output. >> !(A&B)|(B&C) == (C~=A) ans = 1

The most common implemented functions are the squareroot (sqrt(x)), the trigonometric functions (sin(x), cos(x), tan(x)) and inverses (atan(x), atan2(y,x)), and the hyperbolic functions (exp(x), log(x)). A large number of additional functions are available, see the list in chapter 4. Some functions are specific to integers, and also work with arbitrary large numbers: primes(Z) expands Z into primefactors, factorial(Z) calculates the factorial function. Modular division is provided by divide and treated later in the context of polynomials.

>> log(sqrt(854)) % natural logarithm ans = 3.375 >> 0.5*log(854) ans = 3.375 >> float(sin(pi/2)) % argument in radian ans = 1 >> gammaln(1234) % log( gamma( x ) ) ans = 7547 >> primes(1000000000000000001) ans = [ 101 9901 999999000001 ] >> factorial(35) ans = 1.0333E40 >> factorial(rat(35)) % to make it exact. ans = 10333147966386144929666651337523200000000

Name(Arguments) | Function | Mod |
---|---|---|

float() | as floating point number | M,O |

rat() | as exact number | M,O |

realpart() | realpart of | M,O |

imagpart() | imaginary part of | M,O |

abs() | absolute value of | M,O |

sign() | sign of | M,O |

conj() | conjugate complex | M,O |

angle() | angle of | M,O |

cfs() []) | continued fraction expansion of with accuracy | M,O |

primes(VAR) | VAR decomposed into primes | M,O |

Name(Arguments) | Function | Mod |
---|---|---|

sqrt() | squareroot | M,O |

exp() | exponential | M,O |

log() | natural logarithm | M,O |

sinh() | hyperbolic sine | O |

cosh() | hyperbolic cosine | O |

asinh() | hyperbolic areasine | O |

acosh() | hyperbolic areacosine | O |

sech() | hyperbolic secans | O |

csch() | hyperbolic cosecans | O |

asech() | hyperbolic areasecans | O |

acsch() | hyperbolic areacosecans | O |

sin() | sine (radian) | M,O |

cos() | cosine (radian) | M,O |

tan() | tangens (radian) | M,O |

asin() | arcsine (radian) | M,O |

acos() | arccosine (radian) | M,O |

atan() | arctangens (radian) | M,O |

atan2(, ) | arctangens (radian) | M,O |

sec() | secans (radian) | O |

csc() | cosecans (radian) | O |

asec() | arcsecans (radian) | O |

acsc() | arccosecans (radian) | O |

factorial(N) | factorial | M,O |

nchoosek(N,K) | binomial coefficient | O |

gamma() | gammafunction | M,O |

gammaln() | logarithm of gammafunction | M,O |