Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Power function

Status
Not open for further replies.

paubri

Programmer
Apr 25, 2005
21
ZA
Please can someone tell me how to get the power function to work. (The one that says power( x, y[, modulo]) in the help). Thanks.
 
First of all, you have to be running python 2.4 or higher.

Second or all, you need to be sure that the decimal package is actually required. The builtin math operators ( see pow() and ** ) would probably be sufficient for five nines of situations.

If you really want to use the General Decimal Arithmetic Specification, which the decimal module is an implementation of, then I'd start with the tutorial in the manual. If you can't figure out what you're doing after reading that, check back.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top