comp.lang.ada
 help / color / mirror / Atom feed
From: FGD <presbeis@look.ca>
Subject: Re: Math Libraries (was Re: Ada2005)
Date: Thu, 20 Dec 2001 15:14:04 -0500
Date: 2001-12-20T15:14:04-05:00	[thread overview]
Message-ID: <3C22468C.30901@look.ca> (raw)
In-Reply-To: 9vt3vi$dmd$1@nh.pace.co.uk

Marin David Condic wrote:

> We have in Ada a useful package: Ada.Numerics.Generic_Elementary_Functions
> that works fine for floating point types.
> 
> Is there any reason not to include in Ada200x similar packages for generic
> fixed and decimal types? It seems we ought to be able to compute logarithms,
> square roots, etc. for numeric types other than floating point types, eh?


There is a range issue here, most of these functions will map out of the 
range of the original type or will have unsatisfactory precision within 
the original type--such extensions are generally useless. Converting to 
float and using the float result is usually the best solution. For most 
of the remaining cases converting back from float to the original type 
is the most efficient way to compute the desired result. For the very 
few remaining cases, the programer should be able to supply efficient 
algorithms.

I think all of this was considered when designing Ada95.


> Would there be any reason not to expand the math functions beyond what is
> already there? Math is pretty cheap to implement when compared to some of
> the other suggested extensions to the language and it would definitely be
> attractive to a given audience that might currently still be relying on
> Fortran. (See also the discussion elsewhere about standard libraries...)

 >

> What math functions (or math branches) would be most desirable to add to the
> language by way of some packages under Ada.Numerics?

One thing I like about Ada.Numerics is that, with the exception of 
random numbers, it contains only functions which are commonly 
implemented directly in hardware or nearly so. I like this RIS 
approach---and I would like future extensions to adhere to this 
philosophy. (Although the use of the word "Elementary" could be used to 
distinguish extensions which do.)

Should the numerics annex be extended to include more complex functions 
and types. I would like to see more discrete arithmetic types. I would 
love to see, in order of preference:
(1) Binary Galois fields.
(2) Crypto-secure random numbers.
(3) More modular operations. (e.g. multiplicative inverses & efficient 
exponentiation.)
(4) Built-in multiprecision types.
These have in common that highly efficient but hopelessly target 
dependent algorithms are known for computing these.

Most of the stuff I do now is discrete, so I really have no idea what 
would be best for continuous types. But I guess that operations that 
could take advantage of SIMD extensions of some processors would be 
useful. Well anything that would likely speed up a Fourier Transform 
would be a bonus. For example like Fortran, built-in point to point 
multiplication of arrays would be good.

On the abstraction side, the fact that arrays and functions are 
addressed with the same syntax is a fun thing in Ada. Perhaps this could 
be taken further?

-- Frank




  reply	other threads:[~2001-12-20 20:14 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-11  9:33 Ada2005 Peter Hermann
2001-12-11 11:05 ` Ada2005 M. A. Alves
2001-12-11 11:55   ` Ada2005 Aaro Koskinen
2001-12-11 14:49     ` Ada2005 Wes Groleau
2001-12-11 14:58     ` Ada2005 Marin David Condic
2001-12-11 15:18       ` Ada2005 Ted Dennison
2001-12-12  8:37       ` Ada2005 Alfred Hilscher
2001-12-11 11:23 ` Ada2005 Martin Dowie
2001-12-11 11:54 ` Ada2005 Preben Randhol
2001-12-11 12:06 ` Ada2005 Larry Kilgallen
2001-12-11 14:39 ` Ada2005 Ted Dennison
2001-12-12  4:39   ` Ada2005 Jeffrey Carter
2001-12-13 18:39   ` Ada2005 Randy Brukardt
2001-12-12 11:29 ` Ada2005 Peter Hermann
2001-12-12 12:42   ` Ada2005 Larry Kilgallen
2001-12-12 12:51   ` Ada2005 Martin Dowie
2001-12-12 12:59   ` Ada2005 Carsten Freining
2001-12-12 14:40     ` Ada2005 Peter Hermann
2001-12-12 15:16       ` Ada2005 Ted Dennison
2001-12-12 15:37         ` Ada2005 Larry Kilgallen
2001-12-12 17:49           ` Ada2005 Ted Dennison
2001-12-12 18:02         ` Ada2005 tmoran
2001-12-12 18:17           ` Ada2005 Ted Dennison
2001-12-12 18:31             ` Ada2005 Sergey Koshcheyev
2001-12-12 19:08               ` Ada2005 Ted Dennison
2001-12-12 18:14         ` Ada2005 Mark Lundquist
2001-12-12 18:40           ` Ada2005 Ted Dennison
2001-12-12 19:12             ` Ada2005 Mark Lundquist
2001-12-12 19:41               ` Ada2005 Ted Dennison
2001-12-13 20:07         ` Ada2005 Ted Dennison
2001-12-14  4:40       ` Ada2005 Patrick Hohmeyer
2001-12-14  9:55         ` Ada2005 Lutz Donnerhacke
2001-12-14 10:36         ` Ada2005 Dmitry A. Kazakov
2001-12-17 18:40         ` Ada2005 Matthew Heaney
2001-12-12 18:04     ` Ada2005 Mark Lundquist
2001-12-12 21:25       ` Ada2005 Mark Lundquist
2001-12-13 18:40         ` Ada2005 Stephen Leake
2001-12-13 19:01           ` Ada2005 Mark Lundquist
2001-12-14 17:17             ` Ada2005 Stephen Leake
2001-12-13  9:11       ` Ada2005 Dmitry A. Kazakov
2001-12-17 17:50         ` Ada2005 Ray Blaak
2001-12-18 11:55           ` Ada2005 Dmitry A. Kazakov
2001-12-18 19:51             ` Ada2005 Ray Blaak
2001-12-19  8:34               ` Ada2005 Dmitry A. Kazakov
2001-12-19 13:30                 ` Ada2005 Mark Lundquist
2001-12-19 18:23                 ` Ada2005 Ray Blaak
2001-12-19 18:20           ` Ada2005 Mark Lundquist
2001-12-19 19:19             ` Ada2005 Ray Blaak
2001-12-20 14:17             ` Ada2005 Dmitry A. Kazakov
2001-12-20 11:24       ` Ada2005 Carsten Freining
2001-12-20 14:27         ` Ada2005 Mark Lundquist
2001-12-20 15:01         ` Ada2005 Matthew Woodcraft
2001-12-20 15:45         ` Ada2005 Mark Lundquist
2001-12-20 16:20           ` Ada2005 Mark Lundquist
2001-12-13 18:13     ` Ada2005 Georg Bauhaus
2001-12-20 16:34 ` Math Libraries (was Re: Ada2005) Marin David Condic
2001-12-20 20:14   ` FGD [this message]
2001-12-20 20:34     ` Marin David Condic
2001-12-21 17:21       ` FGD
2001-12-21 18:08         ` Marin David Condic
2001-12-21 19:40           ` tmoran
2001-12-21 19:45             ` Marin David Condic
2001-12-21 20:35             ` Dan Nagle
2001-12-21 20:31           ` Eric Merritt
2001-12-22 16:56           ` Math Update for Ada 2005 Steven Deller
2001-12-23 15:13             ` Robert Dewar
2001-12-23 22:43               ` Brian Rogoff
2001-12-22 21:48           ` Math Libraries (was Re: Ada2005) FGD
2002-01-02 14:20         ` Jacob Sparre Andersen
2001-12-20 23:20   ` Robert C. Leif, Ph.D.
2001-12-21 14:49     ` Marin David Condic
replies disabled

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