From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ceeb88b2127ef295 X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Ada Versions of A.5 (Numerics Packages) Date: 1999/10/12 Message-ID: <3803AF84.955FF88F@mitre.org>#1/1 X-Deja-AN: 535986045 Content-Transfer-Encoding: 7bit References: <3801A242.AEC13B07@cs.york.ac.uk> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 939765335 9515 129.83.41.77 (12 Oct 1999 21:55:35 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 12 Oct 1999 21:55:35 GMT Newsgroups: comp.lang.ada Date: 1999-10-12T21:55:35+00:00 List-Id: "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...