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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e749bdf6fe4253aa X-Google-Attributes: gid103376,public From: "Martin Dowie" Subject: Re: Why no new posts ? Date: 2000/11/15 Message-ID: <3a125206$1@pull.gecm.com>#1/1 X-Deja-AN: 693824277 References: <002001c04ec8$27db8ee0$b0375140@Fudge> X-Trace: 15 Nov 2000 09:06:14 GMT, superted.dsge.edinbr.gmav.gecm.com X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Date: 2000-11-15T00:00:00+00:00 List-Id: 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 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.