From: sb463ba@l1-hrz.uni-duisburg.de (Georg Bauhaus)
Subject: Re: Positive Floating Range?
Date: Tue, 1 May 2001 20:40:05 +0000 (UTC)
Date: 2001-05-01T20:40:05+00:00 [thread overview]
Message-ID: <9cn6v5$f7q$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: 817E6.2056$DW1.94361@iad-read.news.verio.net
Dr Nancy's Sweetie (kilroy@copland.rowan.edu) wrote:
: Put(Float'succ(0.0));
: gave me:
: 0.00000E+00
: ...
: So it looks like I get what I want with:
: subtype Foo is Float range Float'Succ(0.0)..Float'Last;
I've tried this:
with ada.text_IO; use Ada.Text_IO;
procedure floats is
subtype Pos_Float is Float range Float'Succ(0.0) .. float'last;
package pfloat is new Ada.text_IO.Float_IO(pos_float);
f: pos_float;
begin
pfloat.put(Pos_Float'First); new_line;
pfloat.get(f);
end floats;
teppich:~$ ./floats
1.40130E-45
0.0
raised ADA.IO_EXCEPTIONS.DATA_ERROR : a-tiflio.adb:70 instantiated at floats.adb:5
teppich:~$
Hm... That's all of my 2c.
There has been some talk about one compiler using
80 hardware bits where available, so you should at
least get long floats. Nothing in the compiler docs?
Georg
prev parent reply other threads:[~2001-05-01 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-21 3:21 Positive Floating Range? Dr Nancy's Sweetie
2001-04-21 7:25 ` tmoran
2001-04-21 14:57 ` Samuel T. Harris
2001-04-22 1:14 ` Jeffrey Carter
2001-04-23 14:13 ` Marin David Condic
2001-05-01 20:40 ` Georg Bauhaus [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox