Back to index

glibc  2.9
Functions
ots_cvtxt.c File Reference
#include "local-soft-fp.h"
#include "double.h"

Go to the source code of this file.

Functions

double _OtsConvertFloatXT (long al, long ah, long _round)

Function Documentation

double _OtsConvertFloatXT ( long  al,
long  ah,
long  _round 
)

Definition at line 26 of file ots_cvtxt.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A);
  FP_DECL_D(R);
  double r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_Q(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
  FP_TRUNC(D,Q,2,4,R,A);
#else
  FP_TRUNC(D,Q,1,2,R,A);
#endif
  FP_PACK_SEMIRAW_D(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}