Back to index

glibc  2.9
Functions
q_qtos.c File Reference
#include "soft-fp.h"
#include "single.h"
#include "quad.h"

Go to the source code of this file.

Functions

float _q_qtos (const long double a)

Function Documentation

float _q_qtos ( const long double  a)

Definition at line 27 of file q_qtos.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A);
  FP_DECL_S(R);
  float r;

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

  return r;
}