On 02/10/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
But 0.125 and 0.375 are representable ACCURATELY on a computer, aren't they?
Vincent
Yes they can, so FPC still has a bug in Banker's Rounding.
What is really interresting is that I never really thought about
irrational number and how
Chris Cheney schreef:
Date sent: Mon, 2 Oct 2006 12:59:45 +0200
From: "Graeme Geldenhuys" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Subject: Re: [fpc-devel] Rounding inconsistent (critic
Date sent: Mon, 2 Oct 2006 12:59:45 +0200
From: "Graeme Geldenhuys" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Subject: Re: [fpc-devel] Rounding inconsistent (critical)
Send reply to
I also ran the exact example given on the Wikipedia site and I also got errors.
AssertEquals('Failing on 1', '3.02', FormatFloat('0.00', 3.016));
AssertEquals('Failing on 2', '3.01', FormatFloat('0.00', 3.013));
AssertEquals('Failing on 3', '3.02', FormatFloat('0.00', 3.015));
AssertEquals('F
On 02/10/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
> AssertEquals('Failing on 10', '0.44', FormatFloat('0.00', 0.445));
> AssertEquals('Failing on 11', '0.46', FormatFloat('0.00', 0.455));
Sorry, I shouldn't have used the work expected in my description, as
that does confuse things a bi
Graeme Geldenhuys schreef:
On 02/10/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
It is not a bug, it is using bankers rounding. See
http://lazarus-ccr.sourceforge.net/docs/rtl/system/round.html
Vincent
Exactly, but it is still wrong, except if I really don't know how
Banker's rounding work
Oh, I followed the rules as define for Banker's Rounding
(round-to-even) show on Wikipedia
http://en.wikipedia.org/wiki/Rounding
Use that to round 0.445 and 0.455. I gather that Delphi 7 defaults to
Common Rounding and not Banker's Rounding.
Should FPC follow the Delphi rules on this to stay c
On 02/10/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
It is not a bug, it is using bankers rounding. See
http://lazarus-ccr.sourceforge.net/docs/rtl/system/round.html
Vincent
Exactly, but it is still wrong, except if I really don't know how
Banker's rounding works and what they mean by Even
Graeme Geldenhuys schreef:
Hi,
I created the follow fpcUnit tests. For those that don't know
fpcUnit, the AssertEquals takes three parameters: Failing message,
Expected Value, Actual Value.
Now from the tests below, I am formatting all values to 2 decimal
values. I expected all tests to pass,
Hi,
I created the follow fpcUnit tests. For those that don't know
fpcUnit, the AssertEquals takes three parameters: Failing message,
Expected Value, Actual Value.
Now from the tests below, I am formatting all values to 2 decimal
values. I expected all tests to pass, but it doesn't. Test 9 fail
10 matches
Mail list logo