double rounding in xtime_diff()?
Antoine Leca
Antoine.Leca at renault.fr
Tue Oct 13 15:15:37 UTC 1998
Markus Kuhn wrote:
>
> A somewhat related question: Given a floating-point value X,
> is there in C9X a portable way to get the next smaller and the
> next larger floating point value?
Yes. Seek for nextafter() or nextafterx() in C9X draft.
7.12.11.3 The nextafter functions
Synopsis
#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
Description
[#2] The nextafter functions determine the next
representable value, in the type of the function, after x in
the direction of y, where x and y are first converted to the
type of the function.
Antoine
More information about the tz
mailing list