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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: smize@news.imagin.net (Samuel Mize) Subject: Re: precise floats Date: 1998/08/06 Message-ID: <6qcoh0$3ump$1@prime.imagin.net>#1/1 X-Deja-AN: 378574382 References: Organization: ImagiNet Communications Ltd, Arlington, Texas Reply-To: smize@imagin.net (Samuel Mize) Newsgroups: comp.lang.ada Date: 1998-08-06T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >C Green said > 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; Assuming you want the greatest possible accuracy, perhaps best would be type my_very_precise_type is System.Max_Digits; subtype Fail_If_Not_Precise_Enough is my_very_precise_type digits ; So your variables will have the max precision available, and the compiler will warn you if it can't give you at least N digits. Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam