comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@gecm.com>
Subject: Re: Why no new posts ?
Date: 2000/11/15
Date: 2000-11-15T00:00:00+00:00	[thread overview]
Message-ID: <3a125206$1@pull.gecm.com> (raw)
In-Reply-To: 002001c04ec8$27db8ee0$b0375140@Fudge

Your 'mod' theory, although fitting the evidence, is incorrect.

Your implementation probably defines Float as 'digits 6' meaning
that it will guarantee up to the first 6 significant digits to be correct.
If you require better than this try Long_Float (and Ada.
Long_Float_Text_Io) which will probably be 'digits 15' (though I
can't be sure as you haven't told us what environment you are using).
Look in the specification of package Standard. If Long_Float is also
'digits 6' then try defining your own floating point type with an
appropriate number of digits (e.g. digits 9).

N.B. this is a _minimum_ guarantee, the actual machine
representation may be better.

If you come from a 'C' background think of
Float as 'float'
Long_Float as 'double'
Integer as 'int'
Long_Integer as 'long int'.

I'm sure this is probably heresy to some, but if it helps... :-)


JF Harrison <madscientist@colulus.net> wrote in message
news:002001c04ec8$27db8ee0$b0375140@Fudge...
> Want some posts?
> How about some beginner level questions from my end.
>
> One in this post and another following.
>
> First off:
> I got a Very strange error in dividing real numbers.  I divided 12345670.0
> by 100.0 and got 123456.70313 as the answer!  I have certainly able to
have
> flawless divisions but also isolated some code that will repeatably
> demonstrate this.  I still dont know what is wrong with the code; perhaps
> you can tell me.







  parent reply	other threads:[~2000-11-15  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-14  0:00 Why no new posts ? William J. Thomas
2000-11-14  0:00 ` Vincent Marciante
2000-11-15  7:33   ` Chris Miller
     [not found] ` <002001c04ec8$27db8ee0$b0375140@Fudge>
2000-11-15  0:00   ` Martin Dowie [this message]
2000-11-15  0:00   ` Why no new posts ? Float accuracy Nicolas Brunot
2000-11-15  0:00     ` Jean-Pierre Rosen
2000-11-15  0:00   ` Why no new posts ? David Starner
     [not found] ` <002a01c04eca$dbaecc00$b0375140@Fudge>
2000-11-15  7:24   ` tmoran
2000-11-15  7:38   ` tmoran
2000-11-16  2:44   ` DuckE
replies disabled

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