gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] REAL precision


From: Waldek Hebisch
Subject: Re: [Gm2] REAL precision
Date: Fri, 26 Jun 2009 00:41:17 +0200 (CEST)

Gaius Mulley wrote:
> 
> Hi Andreas and Scott,
> 
> thanks for the feedback on REAL/LONGREAL.  I've been looking into some
> of the possibilities of changing gm2:
> 
> 
>   (v)    How about introducing more short library modules, so we have
> 

<snip>

>          Finally provide a LegacyMath.def which contains the
>          declaration
> 
>          DEFINITION MODULE LegacyMath ;
>          TYPE
>             REAL = SHORTREAL ;
>          END LegacyMath.
>
>          after which a user module only needs to have its imports
>          changed to access the appropriate floating point routines
>          and an additional FROM LegacyMath IMPORT REAL ;
>

This is essentially what GNU Pascal is doing to be compatible
with legacy code.  I think that this approach works quite well.

I would say that reducing precision of REAL at this time would
be bad, because there is nontrivial set of programs which would be
broken by lower precision.  While this set of programs may be
smaller than set of programs which run too slow or require too
much storage due to higher precision I think that possibility of
breaking programs is much more seriouos than performance problems.

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]