Decimal arithmatic, was Re: Python GUI app to impress the bos s?
sismex01 at hebmex.com
sismex01 at hebmex.com
Mon Sep 30 13:59:03 EDT 2002
>
> Steve Holden wrote:
>
> ><sismex01 at hebmex.com> wrote...
> >
> >
> >[ ... ]
> >OK, so don't use whole pennies (or smallest currency) as your
> >base, use 10,000ths of a penny, but still use integer arithmetic
> >for your calculations.
> >
> Normal Integers aren't big enough. 2^31 / 10K == 215K.
>
> --jb
>
> --
> James J. Besemer 503-280-0838 voice
> 2727 NE Skidmore St. 503-280-0375 fax
> Portland, Oregon 97211-6557 mailto:jb at cascade-sys.com
> http://cascade-sys.com
>
"Integer arithmetic" != "32-bit integer arithmetic". The first
may be based on the second but they are definitely not the
same thing. Python longs are memory-limited, yet they
are also based on machine integers. Does that make them
unsuitable?
-gustavo
Advertencia:
La informacion contenida en este mensaje es confidencial y restringida y
esta destinada unicamente para el uso de la persona arriba indicada, Esta
comunicacion representa la opinion personal del remitente y no refleja
necesariamente la opinion de la Compañia. Se le notifica que esta
estrictamente prohibida cualquier difusion, distribucion o copia de este
mensaje. Si ha recibido esta comunicacion o copia de este mensaje por error,
o si hay problemas en la transmision, favor de comunicarse con el remitente.
Todo el correo electrónico enviado para o desde esta dirección será
procesado por el sistema de correo corporativo de HEB. Tal correo
electrónico esta sujeto a ser almacenado y puede ser revisado por alguien
ajeno al recipiente autorizado con el propósito de monitorear que se cumplan
las normas de seguridad de la empresa.
More information about the Python-list
mailing list