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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7a4c5d22669609bf X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s12g2000prg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: ObjectAda and Long_Long_Float Date: Wed, 5 Dec 2007 08:17:15 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1196871436 23408 127.0.0.1 (5 Dec 2007 16:17:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Dec 2007 16:17:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s12g2000prg.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18732 Date: 2007-12-05T08:17:15-08:00 List-Id: On Dec 5, 5:12 am, axtens wrote: > G'day everyone, > > In Dmitry Kazakov's Intervals package, he was a file, > Float_Intervals.ads which contains: > > with Intervals.Floats; > package Float_Intervals is new Intervals.Floats (Float); > > Today I put Long_Float in between the parentheses instead of Float, > tweaked a few things in my project and now I've got better precision. > If I want to increase the precision, what else can in put in there? > "digits 36"? That's going to depend on the processor. Generally, assuming that a processor supports floating-point instructions, then your Ada compiler will probably support whatever floating-point formats are natively supported by that processor---but no others. So if a processor has support for 32-bit and 64-bit IEEE-754 floats, most likely you'll be able to define floating-point types that will result in one of those two floating-point formats---but you won't be able to get a better- precision float just by asking for a whole bunch of "digits". (Maybe there are Ada compilers that support higher-precision floats than the processor supports. I don't know.) -- Adam