comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Question about Float
Date: Mon, 03 Dec 2007 11:18:46 +0100
Date: 2007-12-03T11:18:46+01:00	[thread overview]
Message-ID: <87hcj0xerd.fsf@ludovic-brenta.org> (raw)
In-Reply-To: f3c0fcc4-3ed2-45aa-8810-2223cbc50dd5@s36g2000prg.googlegroups.com

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.



  reply	other threads:[~2007-12-03 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 10:03 Question about Float axtens
2007-12-03 10:18 ` Ludovic Brenta [this message]
2007-12-03 11:23   ` Martin
2007-12-04  9:31     ` Georg Bauhaus
2007-12-05  5:47       ` axtens
2007-12-07 10:38         ` amado.alves
2007-12-03 12:53 ` anon
2007-12-04  3:22   ` axtens
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox