Back to index

glibc  2.9
Functions
truncdfsf2.c File Reference
#include "soft-fp.h"
#include "single.h"
#include "double.h"

Go to the source code of this file.

Functions

SFtype __truncdfsf2 (DFtype a)

Function Documentation

SFtype __truncdfsf2 ( DFtype  a)

Definition at line 36 of file truncdfsf2.c.

{
  FP_DECL_EX;
  FP_DECL_D(A);
  FP_DECL_S(R);
  SFtype r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_D(A, a);
#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
  FP_TRUNC(S,D,1,2,R,A);
#else
  FP_TRUNC(S,D,1,1,R,A);
#endif
  FP_PACK_SEMIRAW_S(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}