round() function strange behaviour

Peter Hansen peter at engcorp.com
Mon Mar 11 23:32:05 EST 2002


Tim Peters wrote:
> 
> The VB Currency type is a 64-bit signed integer under the covers, implicitly
> scaled by 10,000.  That's similar to a FixedPoint(4) if you use my
> FixedPoint.py class, although a FixedPoint(4) has no restriction on the
> magnitude, while a VB Currency value is restricted to the range
> 
>     -922,337,203,685,477.5808 <= Currency <= 922,337,203,685,477.5807

Which, coincidentally or not, is exactly the value you get if you 
project the annual increase in Bill Gates net worth until the point
at which he says he will retire, in US dollars for that same year.

Remarkable, really, but I guess he's not the senior architect at
Microsoft for nothing.

-Peter



More information about the Python-list mailing list