Re: Is it time to legitimise REAL*8 etc?



robin wrote:
Greg Lindahl wrote:

And this was a known flaw -- PL/1 suffered from it.

PL/I didn't not "suffer" from it.
PL/I provides a default precision (like REAL in Fortran)
with the use of the keyword FLOAT --
that gives what is generally known as single precision.

But that doesn't help for double precision. Also, FIXED
point would seem to have more problem with this. It is
find when you do know the needed precision, but namny times
you don't.

-- glen


When a declaration gives an actual precision, the hardware data type
actually used is one that exactly matches that precision, or (if there is
not one that exactly matches it) the minimum precision that exceeds that
precision is used, just as Fortran does.

In particular, if single-byte integers are requred, PL/I will give it.

If you want exactly 3-decimal digit computations, PL/I will give it.

In general, the precision can be given in terms of the number of
decimal digits desired for the calculation, e.g.,
declare x float decimal (10);
This has some convenient properties, in that when you print the
value of X using free-format, you get exactly 10 decimal digits printed.



.



Relevant Pages

  • Re: PL/I and some new Fortran features
    ... %DCL KP FIXED; ... PL/I does such typing at a higher level. ... Even more, single precision on ... If you want to specify the precision of a constant, ...
    (comp.lang.pl1)
  • Re: What I can to do with old PL/I code?
    ... I do not know, what lq-10 means? ... 1q-10 gives 18-digit precision. ... PL/I for OS/2. ... Solved by first initializing to zero, ...
    (comp.lang.pl1)
  • Re: Common Fortran error -- setting double precision variable to a single precision constant
    ... precision kind value for your application and compiler. ... Fortran pitfall. ... PL/I has had such flexibility that since 1966. ...
    (comp.lang.fortran)
  • Re: PL/I and some new Fortran features
    ... As I see PL/I have no analog to SELECTED_REAL_KIND builtin. ... to a standard floating point format. ... some machines was close to double precision on others. ... I don't know if PL/I now has something closer to Fortran PARAMETER. ...
    (comp.lang.pl1)
  • Re: Usage of complex numbers?
    ... (snip, previously snipped question about complex numbers) ... >>corresponding to each real kind. ... >>support other kinds such as quad precision. ... PL/I also included FLOAT COMPLEX with the same precision as ...
    (comp.lang.fortran)