(original) (raw)

RE: \[Python-Dev\] calculator module

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.