comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol@pvv.org>
Subject: Re: fixed type (delta) in ada
Date: 1999/11/29
Date: 1999-11-29T16:28:53+00:00	[thread overview]
Message-ID: <m3aenxxnvv.fsf@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: slrn8458hv.18l.lutz@taranis.iks-jena.de

lutz@iks-jena.de (Lutz Donnerhacke) writes:

| * Al Christians wrote:
| >   F : Long_Float := 0.0300000000000000;  
| 
| First convertion. Might be 0.0300001244 afterwards.

It prints out as 3.00000000000000E-02 (if you use Ada.Long_Float_Text_IO (GNAT))
 
| >   Money_Io.Put(Money(F));                   -- GNAT 3.12p Puts 0.03
| 
| Second convertion.
| 
| >   Money_Io.Put(Money(0.0300000000000000));  -- GNAT 3.12p Puts 0.02 
| 
| A single convertion.

Even Money_Io.Put(Money(Long_Float(0.0300000000000000))); gives 0.02

| Of course. Playing near T'Small is hazardous.

I would guess so :-)
-- 
Preben Randhol -- [randhol@pvv.org] -- [http://www.pvv.org/~randhol/]     
         "Det eneste trygge stedet i verden er inne i en fortelling." 
                                                      -- Athol Fugard




      reply	other threads:[~1999-11-29  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-27  0:00 fixed type (delta) in ada Nap
1999-11-26  0:00 ` Al Christians
1999-11-27  0:00   ` fixed type (delta) in ada and GNAT bug David C. Hoos, Sr.
1999-11-28  0:00 ` fixed type (delta) in ada Nick Roberts
1999-11-30  0:00   ` Simon Wright
1999-11-28  0:00 ` Robert Dewar
1999-11-27  0:00   ` Al Christians
1999-11-28  0:00     ` Florian Weimer
1999-11-28  0:00       ` Al Christians
1999-11-29  0:00         ` Preben Randhol
1999-11-29  0:00           ` Al Christians
1999-11-29  0:00             ` Preben Randhol
1999-11-28  0:00     ` Preben Randhol
1999-11-29  0:00     ` Robert Dewar
1999-11-29  0:00       ` Al Christians
1999-11-29  0:00         ` Lutz Donnerhacke
1999-11-29  0:00           ` Preben Randhol [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