Files
mercury/tests/hard_coded/func_exp.exp
Julien Fischer 97735d9630 Do not allow std_util.pow/3 with negative values.
library/std_util.m:
    Make std_util.pow/3 throw an exception if it is called with a negative
    integer as its second argument.

tests/hard_coded/Mmakefile:
tests/hard_coded/func_exp.{m,exp}:
    Add a test of pow/3.

NEWS:
    Announce the above change.
2023-01-11 17:10:00 +11:00

5 lines
151 B
Plaintext

pow(double, -1, 1) = software_error("function `std_util.pow\'/3: N is negative")
pow(double, 0, 1) = 1
pow(double, 1, 1) = 2
pow(double, 10, 1) = 1024