math.sqrt

Página Principal
Anexos:
Mensagem como email
+ (text/plain)
+ (text/html)
+ (text/plain)
Apagar esta mensagem
Responder a esta mensagem
Autor: trent shipley via PLUG-discuss
Data:  
Para: Main PLUG discussion list
CC: trent shipley
Assunto: math.sqrt
I'm on the bench at work, so I spend my days following along with examples
in Python books. Whenever there is a choice to use x**0.5 or math.sqrt(x)
the books opt for the square root option instead of the equivalent
representation as a fractional power. Is the implementation of math.sqrt()
more efficient than x**0.5? Is there a numerical shortcut to the value of
sqrt(x) that will make the sqrt symbol more efficient than the power
equivalent (x^0.5) in every programming language?

I have a math degree, and sometimes it is irksome since x**(1/2) or x^(1/2)
is symbolically more elegant in the formula.
---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss