ONC+ Developer's Guide

Floating-Point Filters

The XDR library also provides primitive routines for C floating-point types.

bool_t xdr_float(xdrs, fp)
  	XDR *xdrs;
  	float *fp;
bool_t xdr_double(xdrs, dp)
  	XDR *xdrs;
  	double *dp;

The first parameter, xdrs, is an XDR stream handle. The second parameter is the address of the floating-point number that provides data to the stream or receives data from it. Both routines return TRUE if they complete successfully, and FALSE otherwise.


Note –

Because the numbers are represented in IEEE floating point, routines might fail when decoding a valid IEEE representation into a machine-specific representation, or the reverse.