File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1299,7 +1299,10 @@ are always available. They are listed here in alphabetical order.
1299
1299
operands, the result has the same type as the operands (after coercion)
1300
1300
unless the second argument is negative; in that case, all arguments are
1301
1301
converted to float and a float result is delivered. For example, ``pow(10, 2) ``
1302
- returns ``100 ``, but ``pow(10, -2) `` returns ``0.01 ``.
1302
+ returns ``100 ``, but ``pow(10, -2) `` returns ``0.01 ``. For a negative base of
1303
+ type :class: `int ` or :class: `float ` and a non-integral exponent, a complex
1304
+ result is delivered. For example, ``pow(-9, 0.5) `` returns a value close
1305
+ to ``3j ``.
1303
1306
1304
1307
For :class: `int ` operands *base * and *exp *, if *mod * is present, *mod * must
1305
1308
also be of integer type and *mod * must be nonzero. If *mod * is present and
You can’t perform that action at this time.
0 commit comments