up previous next
Dec

Pretty Printing of Objects.
Syntax
          
Dec(X:Object, Digits:INT):Object

          

Description
This function prints (rational) numbers within the object X as a floating point number up to Digits Digits. The floating point numbers are represented as strings.

Example
Use P::=Q[x,y,z];

Dec(1,4);
1
-------------------------------
Dec(1/2,4);
0.5
-------------------------------
A:=Mat([[17/13, 6/11], [5/3, 1/9]]);
Dec(A,4);
Mat([
  ["1.3076", "0.5454"],
  ["1.6666", "0.1111"]
])
-------------------------------


See Also