This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Fix NEAREST constant folder
Steve Kargl wrote:
> On Tue, Apr 12, 2005 at 10:27:22PM +0200, Tobias Schl?ter wrote:
>>Apart from the specific question how NEAREST is defined, compile time
>>arithmetic should yield the same results as target arithmetic. Which in this
(I meant "in the general case")
>>case either means disabling subnormals in compiled binaries -- which I'm not
>>even sure is possible --, or supporting them in the compiler. I think people
>>would kill us, if we did the former :-)
>>
>
> I suspect we will need to rip MPFR out of gfortran, and
> use gcc/real.c.
Ok. So who's going to implement the standard mathematical functions on top of
real.c? The currently supported list is this:
---------------------
/* Return floor log2(R). */
extern int real_exponent (const REAL_VALUE_TYPE *);
/* R = A * 2**EXP. */
extern void real_ldexp (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int);
/* Calculate R as the square root of X in the given machine mode. */
extern bool real_sqrt (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
/* Calculate R as X raised to the integer exponent N in mode MODE. */
extern bool real_powi (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *, HOST_WIDE_INT);
/* Standard round to integer value functions. */
extern void real_trunc (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
extern void real_floor (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
extern void real_ceil (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
extern void real_round (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
/* Set the sign of R to the sign of X. */
extern void real_copysign (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
-------------------------
There's been talk about multiple precision libraries and gcc in the past, but
nothing has come out of this, AFAICT.
- Tobi