Back to index

glibc  2.9
Functions
extenddftf2.c File Reference
#include "soft-fp.h"
#include "double.h"
#include "quad.h"

Go to the source code of this file.

Functions

TFtype __extenddftf2 (DFtype a)

Function Documentation

TFtype __extenddftf2 ( DFtype  a)

Definition at line 36 of file extenddftf2.c.

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

  FP_INIT_ROUNDMODE;
  FP_UNPACK_RAW_D(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
  FP_EXTEND(Q,D,4,2,R,A);
#else
  FP_EXTEND(Q,D,2,1,R,A);
#endif
  FP_PACK_RAW_Q(r, R);
  FP_HANDLE_EXCEPTIONS;

  return r;
}