From: ucaa2385@alpha1.csv.ica.uni-stuttgart.de (Peter Hermann)
Subject: Re: Higher precision and generics
Date: 15 Mar 1995 16:35:46 GMT
Date: 1995-03-15T16:35:46+00:00 [thread overview]
Message-ID: <3k7512$kln@info4.rus.uni-stuttgart.de> (raw)
In-Reply-To: Mats.Weber-1503951636430001@mlma11.matrix.ch
Mats Weber (Mats.Weber@matrix.ch) wrote:
: In article <3jsnbf$ido@nef.ens.fr>, sands@clipper.ens.fr (Duncan Sands) wrote:
: > I am writing a package of matrix routines (in Ada!) in which some
: intermediate results
: > should be calculated in higher precision than normal. The type for
: normal precision is
: > called Real and is a generic parameter of my package:
: > generic
: > type Real is digits <>;
: > package Matrix_Stuff is
[snip]
: generic
: type Real is digits <>;
: type Double_Real is digits <>;
: package Matrix_Stuff is
: ...
: end;
I do not favor Mats' solution.
We had the same situation about 20 years ago in a major finite element code:
people believed it to be useful to have Fortran code with mixed precision.
This turned out to become far too complex!
I would recommend to use the above (first) generic package in a
straightforward manner, i.e. once instantiated for a single precision type,
next time for a double precision type (in Fortran-speak).
That's what generic units are for.
--
Peter Hermann Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)
prev parent reply other threads:[~1995-03-15 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-11 17:41 Higher precision and generics Duncan Sands
1995-03-14 16:13 ` David Arno
1995-03-15 12:12 ` Duncan Sands
1995-03-17 8:36 ` Dan Kurfis
1995-03-17 12:37 ` Peter Hermann
1995-03-19 1:23 ` Robert Dewar
1995-03-20 16:33 ` Peter Hermann
1995-03-21 21:14 ` Robert Dewar
1995-03-18 1:45 ` Keith Thompson
1995-03-20 9:05 ` dkurfis
1995-03-15 15:36 ` Mats Weber
1995-03-15 16:35 ` Peter Hermann [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox