Data types

a=45

b=3.66

z=3+5i        mag(z),  imag(z),  conj(z), arg(z), polar(z)

text= »bonjour »

1=true.    0=false

v=(1,2,3)                    

v=(0,1,2,3,0,0,0,0)                  v=e1+2e2+3e3

v=(3,0,2,0,1,0,0,0)                  v=3e0+2e2+e12       

array=((1,4,0),(3,3,1),(0,1,0))

pi,  e,  i

Operators

+    –    *    /   ^

gp(a,b), inp(a,b), outp(a,b),inverse(a)

not   and.  or

<    <=    ==    >=   >

variables, expressions, functions naming

vitesse=20

x=15^2+7/2-5*vitesse

y=sin(3.2)+sqrt(5)-exp(pi/4)

f(x,y)=x+sin(y)

control instructions

do(expression1, expession2, …, , expressionk)

do(x=sqrt(6), y=exp(x/2), x+y)

test(predicate, block1, block2)

test(a>b, »a grater than b », « a not greater than b »)

test(predicate1, block1, predicate2, block2, …)

range(u,a,b)=test(or(u<=a,u>=b),0,and(u>a,u<b),1)

test(a>b, print(a),b>5,print(b),print(a+b))

check(predicate)

check(a>b).       

number(x)          integer(x)

for (i, min, max, do (…))

for (i, 1, 100, print( i^2))

for (i, 1, 10, for(j, 1, 5, A[i,j] = i+2j))

product(i, min, max, f)

sum(i, min, max, f)

s=sum(i,1,100, 1+1/i)

approximate pi

a(n)=test(n==0,0,sqrt(2+a(n-1)))

Pi=float(2*product(k,1,9,2/a(k)))

defining functions

f(arg1, arg2, …, argk) = expression

f(arg1, arg2, …, argk) = do(expression1, expression2, …, expressionk)

f(x,y)=sin(x)^2+cos(y)^2

g(x,y)=do( check(x>2), check(y>0), x^3+3/y)

abs(x)=test(x<0, -x, x)

power(x,n)=do( check(n>0), p=1, for(i, 1, n, p=p*x), p)

fib(n)=do( check(n>0), test(n==1, 1, fib(n-1)+fib(n-2) )))

fact(n)=do( check(n>0), test( n==1, 1,n* fact(n-1)))

even(n)=test(n==0, 1, odd(n-1)))     odd(n)=dtest(n==0, 0, even(n-1))) 

x(n)=test(n==0, 1, x(n-1) +y(n-1).               y(n)=test(n==0, 2, y(n-1) *x(n-1)

_

integer

real

complex

string

boolean

vector

Clifford vector.            Cl(3)

Clifford multivector.     Cl(3)

array

predefined

_

arithmetic operators

Evalgebra operators

logical operators

relational operators

_

_

_

_

_

_

Do block : sequence of expressions. Unnecessary if one.

return  last expression in block

if predicate True block1 else block2

_

if predicate1 True, block1, if predicate2 True, block2 etc ..

Misc. commands

_

disp()

dsp()

Print()

rnd0(), rnd1(), rnd2(), rnd3(), rnd4(), rnd5(), rnd6()

clear

_

_

display multivector  by grade

display multivector

general display

round multi vector (0,1, …,6 decimals)

clear all symbols