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,38064b40418e66c2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!news.astraweb.com!newsrouter-eu.astraweb.com!multikabel.net!newsfeed10.multikabel.net!feeder3.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Question about Float References: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Date: Mon, 03 Dec 2007 11:18:46 +0100 Message-ID: <87hcj0xerd.fsf@ludovic-brenta.org> Cancel-Lock: sha1:MGbjBk0J19jFBVe9Milt2SYLtAI= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=IQZZF>A?]:_?4kLUh]FI3[6`Y6aWje^YZi=o0`YNHk_[fR5FZ8SDefZFjM0[9@E=^YS7[:UFD@^R] Xref: g2news1.google.com comp.lang.ada:18701 Date: 2007-12-03T11:18:46+01:00 List-Id: axtens writes: > G'day everyone, > > What is the size/precision of a Float in Ada? Under GNAT/GCC it > appears to be equivalent to a VB6 Single. Under ObjectAda is appears > to be a full 8 byter, similar to VB6's Double. But is it? > > I'm confused. The range and precision of Float are implementation-defined and change between e.g. 32-bit, 64-bit platforms and Intel platforms where there is a 80-bit floating-point type and PowerPC that has a 128-bit floating-point type. Therefore you should not use Float. Define your own floating-point type such that its representation matches that of Visual Basic. -- Ludovic Brenta.