## Names:

tripledouble, TD represents a number as the sum of three IEEE doubles.

## Library names:

sollya_obj_t sollya_lib_triple_double(sollya_obj_t) sollya_obj_t sollya_lib_triple_double_obj() int sollya_lib_is_triple_double_obj(sollya_obj_t) sollya_obj_t sollya_lib_build_function_triple_double(sollya_obj_t) #define SOLLYA_TD(x) sollya_lib_build_function_triple_double(x)

## Description:

• 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.

## Example 1:

> verbosity=1!;
> a = 1+ 2^(-55)+2^(-115);
> TD(a);
Warning: For at least 1 of the constants displayed in decimal, rounding has happened.
1.00000000000000002775557561562891353466491600711096
> prec=110!;
> TD(a);
1.0000000000000000277555756156289135346649160071109559756997242823115914817262706026923524404992349445819854736328125
Go back to the list of commands