Message166478
> - I can't find any reason in using math.pow if I can get errors like the one explained.
The reason is your intention to get the error.
>>> pow(-1, 0.5)
(6.123031769111886e-17+1j)
>>> math.pow(-1, 0.5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: math domain error
> - I've used math.h in my C++ code without having experienced any problem in that pow operation.
What you get in C++ as result of pow(43, 10)?
Technically, in C++ you should use <cmath> header, not <math.h>. |
|
Date |
User |
Action |
Args |
2012-07-26 12:53:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, mark.dickinson, pitrou, ezio.melotti, r.david.murray, skrah, Ramchandra Apte, andrea.bergamini |
2012-07-26 12:53:00 | serhiy.storchaka | set | messageid: <1343307180.15.0.591899442854.issue15438@psf.upfronthosting.co.za> |
2012-07-26 12:52:59 | serhiy.storchaka | link | issue15438 messages |
2012-07-26 12:52:59 | serhiy.storchaka | create | |
|