Paradox Community

Items in pnews.paradox-development

Subject:Re: The difference between currency and number is..
Date:Mon, 11 Jun 2018 09:47:06 +1000
From:Bernie van't Hof <berniev@bje.com.au>
Newsgroups:pnews.paradox-development
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


Copyright © 2004 thedbcommunity.com