Subject: | Re: The difference between currency and number is..
| Date: | Mon, 11 Jun 2018 08:07:11 -0400
| From: | "Steven Green" <greens@diamondsg.com>
| Newsgroups: | pnews.paradox-development
|
paradox DOS used "banker's rounding".. round to the even side.. 5.5 rounds
up to 6, but 4.5 rounds down to 4.. in theory, with large groups of numbers,
that's more accurate, but it's not "normal"
from the beginning, paradox WIN used "banker's rounding, too, but I don't
remember where it stopped.. only 16 bit BDE ??
--
Steven Green
Myrtle Beach, South Carolina, USA
http://www.OasisTradingPost.com
Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
"Bernie van't Hof" wrote in message
news:5b1db87c$1@pnews.thedbcommunity.com...
Careful which rounding you use, and when:
5.5 + 7.5 + 6.5 + 9.5 = 29
After rounding: 6 + 8 + 7 + 10 = 31
9*42.45 = 292.905000000000000 (floating point)
Does x.round(292.905) become 292.90, or 292.91?
Exactly what are the rounding rules of p7/9.
Do currency and data type use different rule?
And finally..
A farmer counted 87 cows in the field, but when he rounded them up he had
90.
- Bernie
On 9/6/18 3:39 am, Steven Green wrote:
> correct.. welcome to wonderful world of paradox rounding inconsistencies
> (sigh)
>
>
> --
>
> Steven Green
> Myrtle Beach, South Carolina, USA
>
> http://www.OasisTradingPost.com
>
> Collectibles and Memorabilia
> Vintage Lego Sets and Parts
> - and Paradox support, too
> "Günter" wrote in message news:5b1a9953$1@pnews.thedbcommunity.com...
>
> Try it out, best with Watches,
>
> var
> n number
> c currency
> endvar
> c=6.9*42.45
> c=c.round(2)
> n=6.9*42.45
> n=n.round(2)
> n=n-c
> view(n)
>
>
> Seems that currency emulate a old Dek-Table-Add-Maschine, with only 2
> decimal places
|