From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: IEEE arithmetic
Date: Fri, 13 Sep 2002 15:59:24 GMT
Date: 2002-09-13T15:59:24+00:00 [thread overview]
Message-ID: <wccelbx284j.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: mailman.1031902862.4685.comp.lang.ada@ada.eu.org
Duncan Sands <duncan.sands@math.u-psud.fr> writes:
> Note: the GNU C library has a routine for doing this, but the constants
> you feed it to choose the rounding mode seem to have architecture
> dependent values (macros are used to give these values common names).
> One solution would be to have a way to get hold of the values given by the
> macros inside of the Ada program, but I don't know how to do this.
If you use the version SofCheck's AdaMagic that generates C,
you can call C macros from Ada using pragma Import.
Most compilers don't allow that, however.
Another way to call a macro is to write a C function that calls the
macro. Then use pragma Import to call the C function from Ada. That's
kind of annoying if the reason it's a macro is to get inline code. But
that's probably not your case -- you probably don't want to set the mode
repeatedly in a tight loop.
- Bob
next prev parent reply other threads:[~2002-09-13 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 7:40 IEEE arithmetic Duncan Sands
2002-09-13 13:03 ` Georg Bauhaus
2002-09-13 13:19 ` Duncan Sands
2002-09-13 15:59 ` Robert A Duff [this message]
2002-09-13 16:06 ` Duncan Sands
2002-09-14 0:46 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox