GCC Middle and Back End API Reference
realmpfr.h File Reference
#include <mpfr.h>
#include <mpc.h>
#include "real.h"
Include dependency graph for realmpfr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

tree do_mpc_arg2 (tree, tree, tree, int, int(*)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t))
void real_from_mpfr (REAL_VALUE_TYPE *, mpfr_srcptr, tree, mp_rnd_t)
void mpfr_from_real (mpfr_ptr, const REAL_VALUE_TYPE *, mp_rnd_t)

Function Documentation

tree do_mpc_arg2 ( tree  arg0,
tree  arg1,
tree  type,
int  do_nonfinite,
int(*)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t)  func 
)

Definitions of floating-point conversion from compiler internal format to MPFR. Copyright (C) 2010-2013 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. In builtins.c.

If arguments ARG0 and ARG1 are a COMPLEX_CST, call the two-argument mpc function FUNC on it and return the resulting value as a tree with type TYPE. The mpfr precision is set to the precision of TYPE. We assume that function FUNC returns zero if the result could be calculated exactly within the requested precision. If DO_NONFINITE is true, then fold expressions containing Inf or NaN in the arguments and/or results.

To proceed, MPFR must exactly represent the target floating point format, which only happens when the target base equals two.

Referenced by fold_builtin_classify().

void mpfr_from_real ( mpfr_ptr  ,
const REAL_VALUE_TYPE ,
mp_rnd_t   
)
void real_from_mpfr ( REAL_VALUE_TYPE ,
mpfr_srcptr  ,
tree  ,
mp_rnd_t   
)

Convert between MPFR and REAL_VALUE_TYPE. The caller is responsible for initializing and clearing the MPFR parameter.