This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Ramchandra Apte, andrea.bergamini, ezio.melotti, mark.dickinson, pitrou, r.david.murray, rhettinger, serhiy.storchaka, skrah
Date 2012-07-26.12:52:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343307180.15.0.591899442854.issue15438@psf.upfronthosting.co.za>
In-reply-to
Content
> - 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>.
History
Date User Action Args
2012-07-26 12:53:00serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, pitrou, ezio.melotti, r.david.murray, skrah, Ramchandra Apte, andrea.bergamini
2012-07-26 12:53:00serhiy.storchakasetmessageid: <1343307180.15.0.591899442854.issue15438@psf.upfronthosting.co.za>
2012-07-26 12:52:59serhiy.storchakalinkissue15438 messages
2012-07-26 12:52:59serhiy.storchakacreate