Back to index

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

Go to the source code of this file.

Functions

SFtype __trunctfsf2 (TFtype a)

Function Documentation

SFtype __trunctfsf2 ( TFtype  a)

Definition at line 36 of file trunctfsf2.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A);
  FP_DECL_S(R);
  SFtype 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;
}