[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Fwded Post



There's a FixedPoint.py in
ftp://ftp.python.org/pub/python/contrib-09-Dec-1999/DataStructures .

With the method invocation overhead, I'm not sure it'd be faster than
floats.

Yes, I believe integers/fixed point tend to be lower precision (but
don't have to be really), and don't autoadjust their precision bits to
extremely large or small magnitude numbers the way floats do.

On Fri, Feb 08, 2002 at 12:36:31PM -0500, Rob Tandy wrote:
> There must be a downside to integer arithmetic aside from the complicated
> code, though, right?  If not, wouldn't Python just use integer arithmetic
> behind the scenes from floating point numbers?
> 
> Integer arithmetic must not keep as accurate precision, correct?
> 
> Disclaimer:  I must admit I didn't understand Guillaume or Pete's
> implementation of integer arithmetic, just the concept.
> 
> as a side note, on my Celeron 400Mhz:
> FLOAT TIME:    4.82999992371
> INT TIME:          2.36000001431
> 
> -- rob

-- 
Dan Stromberg                                               UCI/NACS/DCS

PGP signature