<< DD_QD (MuPAT) DD_QD (MuPAT) Overloads >>

DD_QD (MuPAT) >> DD_QD (MuPAT) > Display

Display

Display of DD and QD numbers

Illustration

Scalar DD and QD numbers are displayed with all their digits, without respect to format().

Otherwise, arrays are displayed in a compact way.

The default display in the console is also the one output with disp(…).

Example for DD numbers:

--> exp(dd(1))
 ans  =
   2.718281828459045235360287471352E0


--> d = ddrand(2,3)
 d  =
[d1]
   0.5465335   0.7395657   0.5900573
   0.9885408   0.0037173   0.3096467

[d2] 10^-17 *
   2.817203   -1.2288763   5.1060442
   2.5962902   0.0088383   1.0787568

Example for QD numbers:

--> q = exp(qd(1))
 q  =
   2.71828182845904523536028747135266249775724709369995957496696763E0


--> dd2qd(d)
 ans  =
[d1]
   0.7444457   0.6836931   0.5053017
   0.2269504   0.9365073   0.2524815

[d2] 10^-17 *
   5.4052066   2.0205118  -1.540086
   0.9062805   5.2122164   1.931117

[d3] zeros(2,3)
[d4] zeros(2,3)


--> qdrand(1,3)*1e6
 ans  =
[d1] 10^5 *
   0.3401932   2.3805456   9.4920116

[d2] 10^-12 *
   0.000135   4.2883451   16.447086

[d3] 10^-29 *
   0.0006044   16.970184  -23.363434

[d4] 10^-46 *
   0.0025863  -59.536291  -118.0642

Report an issue
<< DD_QD (MuPAT) DD_QD (MuPAT) Overloads >>