Names:

doubleextended, DE computes the nearest number with 64 bits of mantissa.

Description:

Example 1:

   > display=binary!;
   > DE(0.1);
   1.100110011001100110011001100110011001100110011001100110011001101_2 * 2^(-4)
   > round(0.1,64,RN);
   1.100110011001100110011001100110011001100110011001100110011001101_2 * 2^(-4)

Example 2:

   > D(2^(-2000));
   0
   > DE(2^(-2000));
   8.7098098162172166755761954947788722958591037427053e-603

Example 3:

   > verbosity=1!;
   > f = sin(DE(x));
   > f(pi);
   Warning: rounding has happened. The value displayed is a faithful rounding of the true result.
   -5.0165576126683320235573270803307570138315616702549e-20
   > g = sin(round(x,64,RN));
   Warning: at least one of the given expressions or a subexpression is not correctly typed
   or its evaluation has failed because of some error on a side-effect.
See also: roundcoefficients, single, double, doubledouble, tripledouble, round
Go back to the list of commands