
CLOUT("Testing specification component ...").

PRAGMA(GENPARSE).

 
(*Arithmetic units. *)

VAR i, j : INT.

i:="111111111111111111111111111111111111111111111111111111111111".

j:=i^2.

j:=j^0-i*i+j.

j:=j+ "333333333333333333": INT -j.



VAR r, s: RAT.

r:="2222222222.777777777777777".

s:=r/r.

s:=r^0+s- "1": RAT.



VAR m, n: MI "7".

m:="11111111111111111111111111".

n:=m/m.

n:=m^0+n- "8": MI "7".



VAR f, g: FLOAT.

f:="2222.3E10".

g:=f^3.

g:=f/g.

g:=g*f*f.



(*Term units. *)

x:=one().

x:=add(x,x).

y:=prod(x,x).

(*

(*Polynomial unit. *)

(*Example from Trinks 6/7. *)
(*Syntax: "<variable list> <term order>" *)

VAR p, q: dirl "(B,S,T,Z,P,W) L".  

(*Syntax: "<polynomial list>" *)

p:="(
    ( 45 P + 35 S - 165 B - 36 ),
    ( 35 P + 40 Z + 25 T - 27 S ),
    ( 15 W + 25 S P + 30 Z - 18 T - 165 B**2 ),
    ( - 9 W + 15 T P + 20 S Z ),
    ( P W + 2 T Z - 11 B**3 ),
    ( 99 W - 11 B S + 3 B**2 )
    ( B**2 + 33/50 B + 2673/10000 )
    )".

 
q:=GB(p).

*)

PRAGMA(GENPARSE).

CLOUT("...finished.").
