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,544e7f5698c48b7c X-Google-Attributes: gid103376,public From: "Corey Ashford" Subject: Re: precise floats Date: 1998/08/06 Message-ID: <6qco9b$eoj$1@usenet.rational.com>#1/1 X-Deja-AN: 378569276 References: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Rational Software Newsgroups: comp.lang.ada Date: 1998-08-06T00:00:00+00:00 List-Id: Robert Dewar wrote in message ... >C Green said ><< > In article <6q7vtb$jk$1@heliodor.xara.net>, > Bob Fletcher wrote: > What is the best way to define a float type that has greater precision, > (like a lot greater), than the default one? Is there a simple way to do > this? > > type my_very_precise_type is digits ; > > where is the number of digits of precision you need. Be aware, however, > that few compilers support float types of precision greater than 15 digits. >>> > >Surely better advice is > > type my_very_precise_type is System.Max_Digits; [snip] I think this is bad advice. You want to find out at compile time whether or not the compiler supports the precision you need, not at runtime where the system may start behaving in mysterious ways because of inadequate precision. I suppose it's another story if you just want the maximum precision that the hardware allows. I think that'd be a rare case though. - Corey