Back to index

glibc  2.9
mpn2flt.c File Reference
#include "gmp.h"
#include "gmp-impl.h"
#include <ieee754.h>
#include <float.h>

Go to the source code of this file.


float __mpn_construct_float (mp_srcptr frac_ptr, int expt, int sign)

Function Documentation

float __mpn_construct_float ( mp_srcptr  frac_ptr,
int  expt,
int  sign 

Definition at line 29 of file mpn2flt.c.

  union ieee754_float u; = sign; = expt + IEEE754_FLOAT_BIAS;
#if BITS_PER_MP_LIMB > FLT_MANT_DIG = frac_ptr[0] & (((mp_limb_t) 1 << FLT_MANT_DIG) - 1);
  #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"

  return u.f;