comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada Versions of A.5 (Numerics Packages)
       [not found] <3801A242.AEC13B07@cs.york.ac.uk>
  1999-10-12  0:00 ` Ada Versions of A.5 (Numerics Packages) Robert I. Eachus
@ 1999-10-12  0:00 ` Nick Roberts
  1999-10-12  0:00   ` David Starner
                     ` (2 more replies)
       [not found] ` <38025722.C4BAEB01@averstar.com>
  2 siblings, 3 replies; 8+ messages in thread
From: Nick Roberts @ 1999-10-12  0:00 UTC (permalink / raw)


"Dr. Neil C. Audsley" wrote:
> 
> Most compilers (certainly GNAT) have implementations of the Numerics
> packages that are effectively interfaces to the C libraries.
> Has anyone seen / written / know of numerics written entirely in Ada?

I will be writing the numerics packages for my upcoming compiler in Ada
and assembly, initially targeted at the IA. However, most of these
functions will have a rather trivial implementation, many as a single
NDP instruction! I'll be happy to share experiences. I'd be really,
really grateful for any help with the random package.

-- 
Nick Roberts
Computer Consultant (UK)
http://www.callnetuk.com/home/nickroberts
http://www.adapower.com/lab/adaos




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
  1999-10-12  0:00 ` Nick Roberts
@ 1999-10-12  0:00   ` David Starner
  1999-10-18  0:00     ` Robert Dewar
  1999-10-18  0:00   ` Robert Dewar
  1999-10-18  0:00   ` Robert Dewar
  2 siblings, 1 reply; 8+ messages in thread
From: David Starner @ 1999-10-12  0:00 UTC (permalink / raw)


In article <3802BB25.286D2E71@callnetuk.com>, Nick Roberts wrote:
>"Dr. Neil C. Audsley" wrote:
>> 
>> Most compilers (certainly GNAT) have implementations of the Numerics
>> packages that are effectively interfaces to the C libraries.
>> Has anyone seen / written / know of numerics written entirely in Ada?
>
>I will be writing the numerics packages for my upcoming compiler in Ada
>and assembly, initially targeted at the IA. However, most of these
>functions will have a rather trivial implementation, many as a single
>NDP instruction! I'll be happy to share experiences. I'd be really,
>really grateful for any help with the random package.

You might want to check out Mats Weber's Component package -
lglwww.epfl.ch/Team/MW/mw_components.html. It has a nice random package
in there in pure Ada, and licensed under the GNAT-modified GPL.

David Starner - dstarner98@aasaa.ofe.org
ftp, web - x8b4e53cd.dhcp.okstate.edu




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
       [not found] <3801A242.AEC13B07@cs.york.ac.uk>
@ 1999-10-12  0:00 ` Robert I. Eachus
  1999-10-12  0:00 ` Nick Roberts
       [not found] ` <38025722.C4BAEB01@averstar.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Robert I. Eachus @ 1999-10-12  0:00 UTC (permalink / raw)


"Dr. Neil C. Audsley" wrote:
> 
> Most compilers (certainly GNAT) have implementations of the Numerics
> packages that are effectively interfaces to the C libraries.
> Has anyone seen / written / know of numerics written entirely in Ada?

    Two answers.  First, what you are looking for is probably not an
implementation of A.5, but of Annex G, in particular the strict mode of
G.2.  I know that the implementation of the random number part of A.5 in
GNAT is implemented in Ada, and developers are encouraged to 'bind to
the metal' for the relaxed mode.  If the chip being used supports IEEE
arithmetic, then often the relaxed and strict modes will be identical,
and use directly or indirectly hardware operations for the exponential,
trig, and hyperbolic functions.

    However, for Ada 83 there were several (four total) standards
developed for simple (and complex) floating point operations.  One of
the members of the NRG which developed the standards worked at the Naval
Research Laboratory (NRL) did develop and release an implementation of
most of these operations entirely in Ada 83.  I can probably find you a
copy if you want, but I think it is available on the Walnut Creek CDs. 
However, the only use I can see for it now is to verify that the
built-ins meet the strict mode requirements, which is actually what I
use it for...

    Incidently, the NRG, originally the NumWG, did a huge amount of work
developing better algorithms for computing many of these functions.  The
Fall 1991 issue of Ada Letters (Volume XI, Number 7), is a good source
papers on that work, but don't trust any of the URLs to be up to date.   

   
-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
       [not found] ` <38025722.C4BAEB01@averstar.com>
@ 1999-10-13  0:00   ` Laurent Guerby
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Guerby @ 1999-10-13  0:00 UTC (permalink / raw)


Tucker Taft <stt@averstar.com> writes:
> We have an implementation of Ada.Numerics.Generic_Elementary_Functions
> in Ada, based on work done by Peter Chang at Argonne National Laboratory.
> Let me know if you are interested in seeing some or all of it.

Unless there are copyright/licensing issues on this code, it would be
great to have it on the web somewhere (may be adapower?).

--LG




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
  1999-10-12  0:00 ` Nick Roberts
  1999-10-12  0:00   ` David Starner
  1999-10-18  0:00   ` Robert Dewar
@ 1999-10-18  0:00   ` Robert Dewar
  2 siblings, 0 replies; 8+ messages in thread
From: Robert Dewar @ 1999-10-18  0:00 UTC (permalink / raw)


In article <3802BB25.286D2E71@callnetuk.com>,
  Nick Roberts <nickroberts@callnetuk.com> wrote:
> I will be writing the numerics packages for my upcoming
> compiler in Ada
> and assembly, initially targeted at the IA.

IA  = IA32? IA64?

> However, most of
> these
> functions will have a rather trivial implementation, many as a
single
> NDP instruction!

No they won't, I think you will be needing a bit of help on
these functions as well :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
  1999-10-12  0:00 ` Nick Roberts
  1999-10-12  0:00   ` David Starner
@ 1999-10-18  0:00   ` Robert Dewar
  1999-10-18  0:00   ` Robert Dewar
  2 siblings, 0 replies; 8+ messages in thread
From: Robert Dewar @ 1999-10-18  0:00 UTC (permalink / raw)


In article <3802BB25.286D2E71@callnetuk.com>,
  Nick Roberts <nickroberts@callnetuk.com> wrote:
> I'd be really,
> really grateful for any help with the random package.

Why not just take the GNAT packages, I see no point in
you reinventing the wheel. Reuse code when you can (this
way your project will only be unrealistic by a factor of
10 instead of 20 :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
  1999-10-12  0:00   ` David Starner
@ 1999-10-18  0:00     ` Robert Dewar
  1999-10-19  0:00       ` Robert I. Eachus
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Dewar @ 1999-10-18  0:00 UTC (permalink / raw)


In article <7tvp2i$9aa1@news.cis.okstate.edu>,
  dvdeug@x8b4e53cd. (David Starner) wrote:
> You might want to check out Mats Weber's Component package -
> lglwww.epfl.ch/Team/MW/mw_components.html. It has a nice
random package
> in there in pure Ada, and licensed under the GNAT-modified
GPL.


Note that the standard GNAT random package is pretty close
to standard Ada, the only notable exception is the unrstricted
access to modify the parameter, but this is easily replaced
with the access trick discussed on the newsgroup recently
(no point in doing this replacement for GNAT itself, since
it would add overhead in time and space for no gain).


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ada Versions of A.5 (Numerics Packages)
  1999-10-18  0:00     ` Robert Dewar
@ 1999-10-19  0:00       ` Robert I. Eachus
  0 siblings, 0 replies; 8+ messages in thread
From: Robert I. Eachus @ 1999-10-19  0:00 UTC (permalink / raw)


In article <7tvp2i$9aa1@news.cis.okstate.edu>, dvdeug@x8b4e53cd. (David
Starner) wrote:
> You might want to check out Mats Weber's Component package -
> lglwww.epfl.ch/Team/MW/mw_components.html. It has a nice random package
> in there in pure Ada, and licensed under the GNAT-modified
> GPL.

    I checked this out, and it is a "standard" LCG that is about what I
(and the original authors) consider a minimally acceptable generator. 
There are better generators available in Ada, including the one in GNAT.
;-)

-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-10-19  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3801A242.AEC13B07@cs.york.ac.uk>
1999-10-12  0:00 ` Ada Versions of A.5 (Numerics Packages) Robert I. Eachus
1999-10-12  0:00 ` Nick Roberts
1999-10-12  0:00   ` David Starner
1999-10-18  0:00     ` Robert Dewar
1999-10-19  0:00       ` Robert I. Eachus
1999-10-18  0:00   ` Robert Dewar
1999-10-18  0:00   ` Robert Dewar
     [not found] ` <38025722.C4BAEB01@averstar.com>
1999-10-13  0:00   ` Laurent Guerby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox