[Python-Dev] calculator module (original) (raw)

Batista, Facundo FBatista at uniFON.com.ar
Wed Mar 10 11:46:09 EST 2004


Gareth McCaughan wrote:

#- Decimal doesn't currently support the functions (cos, exp, log, ...) #- currently in the "math" module. Making Raymond's proposal work #- with Decimal objects would require implementing all those things #- for Decimals. That's appreciably more work than implementing just #- the new functions for doubles.

You're right. And the specification of Cowlishaw doesn't tell us how to make a cos of a Decimal, for example.

#- Further, I'd argue that since Decimal can work with numbers #- of arbitrary precision, an implementation of (say) exp that #- works on Decimals ought to work with something like full #- precision, unless it's only intended for casual use. Writing #- implementations of all these things would be a considerable #- amount of work.

You always can change the context precision before the operation. But it's not very normal to the user that comes from using a "hand calculator".

#- To my mind, the loss isn't worth the gain.

I think that make the calculations with Decimal, now isn't worth it.

But when Decimal and the calculator will be implemented, we should reconsider this again.

. Facundo

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADVERTENCIA

La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley.

Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo.

Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada.

Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje.

Muchas Gracias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20040310/f34de2a8/attachment.html



More information about the Python-Dev mailing list