math.sqrt

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: trent shipley via PLUG-discuss
Date:  
To: Main PLUG discussion list
CC: trent shipley
Subject: 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