- tripledouble is both a function and a constant.
- As a function, it rounds its argument to the nearest number that can be written as the sum of three double precision numbers.
- The algorithm used to compute tripledouble(x) is the following: let xh = double(x), let xm = double(x - xh) and let xl = double(x - xh - xm). Return the number xh + xm + xl. Note that if the current precision is not sufficient to represent exactly xh + xm + xl, a rounding will occur and the result of tripledouble(x) will be useless.
- As a constant, it symbolizes the triple-double precision format. It is used in contexts when a precision format is necessary, e.g. in the commands roundcoefficients and implementpoly. See the corresponding help pages for examples.

> a = 1+ 2^(-55)+2^(-115);

> TD(a);

1.00000000000000002775557561562891353466491600711096

> prec=110!;

> TD(a);

Warning: double rounding occurred on invoking the triple-double rounding operator.

Try to increase the working precision.

1.000000000000000027755575615628913

See also: halfprecision, single, double, doubleextended, doubledouble, quad, roundcoefficients, implementpoly, fpminimax, printexpansion

Go back to the list of commands