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,8d7393f07c06c5e9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!novia!transit4.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail Date: Sun, 29 Aug 2010 07:23:56 -0400 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Another question about fixed point types. References: <4c7991c8$0$2375$4d3efbfe@news.sover.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <4c7a4390$0$2390$4d3efbfe@news.sover.net> Organization: SoVerNet (sover.net) NNTP-Posting-Host: 5bc58871.news.sover.net X-Trace: DXC=8_m5W4g537DjcS8e6Z385KK6_LM2JZB_ClXHJXGi>>6I:WUUlR<856OgJk=U_]>;bHXk_dgNnbB]@ X-Complaints-To: abuse@sover.net Xref: g2news1.google.com comp.lang.ada:13799 Date: 2010-08-29T07:23:56-04:00 List-Id: On 2010-08-29 02:32, Yannick DuchĂȘne (Hibou57) wrote: > If it is symmetric around zero, that should explain your observations, > as I would be very surprised if there would be provision for a hole > somewhere. If it is symmetric around zero, and there is no two disjoint > range, then this is include zero. > > A tiny test program which would write first and last of the base type > may tell more. You're right. Thanks for pointing that out. Here is the range of Julian_Day'Base that I obtained using a test program: -9007199254740992.000 .. 9007199254740991.999 So my understanding was that for integral types the compiler is allowed to allocate only the number of bits necessary to hold the range. For example: type Example_Type is range 1000 .. 1001; The compiler is permitted (not required) to represent objects of type Example_Type using only a single bit. But I guess this is a separate issue. The base type, in which computations are done, might be wide even if the compiler chooses to store the objects in a much small space. So in my case as Phil explained computations on Julian Day are being done, most likely, with a 64 bit type. Yet despite that, storage could (perhaps) be using a smaller space since 64 bits is not needed to represent the full range of Julian_Day at my specified resolution. I understand that these details are compiler specific. However, it does seem like my code, at least, should be portable in its effect. Peter