ULPSMH 3CW "25 November 2009" "mathcw-1.00"

Table of contents


NAME

ulpsmhf, ulpsmh, ulpsmhl, ulpsmhw, ulpsmhq, ulpsmhll, ulpsmhdf, ulpsmhd, ulpsmhdl, ulpsmhdll - Muller--Harrison ulp function

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float ulpsmhf (float approx, double exact);

extern double ulpsmh (double approx, long double exact);

extern long double ulpsmhl (long double approx, long_long_double exact);

extern __float80 ulpsmhw (__float80 approx, long_long_double exact);

extern __float128 ulpsmhq (__float128 approx, long_long_double exact);

extern long_long_double ulpsmhll (long_long_double approx, long_long_double exact);

extern decimal_float ulpsmhdf (decimal_float approx, decimal_double exact);

extern decimal_double ulpsmhd (decimal_double approx, decimal_long_double exact);

extern decimal_long_double ulpsmhdl (decimal_long_double approx,
                                    decimal_long_long_double exact);

extern decimal_long_long_double ulpsmhdll (decimal_long_long_double approx,
                                          decimal_long_long_double exact);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Return the error in Muller--Harrison ulps (units in the last place) of the first argument compared to the second, defined by |approx - exact| / ulpmh(exact).

Notice that the precision of the second argument is higher (when possible) than that of the first argument, in order to allow a sensible difference to be computed.


RETURN VALUES

If either argument is a NaN, return a NaN. Otherwise, return their absolute difference in ulps.

ERRORS

None.

SEE ALSO

ulpk(3CW), ulpsk(3CW), ulpmh(3CW).