[m-rev.] for review: do not allow std_util.pow/3 with negative values

Julien Fischer jfischer at opturion.com
Wed Jan 11 16:11:28 AEDT 2023


On Wed, 11 Jan 2023, Peter Wang wrote:

> On Wed, 11 Jan 2023 16:03:54 +1100 Julien Fischer <jfischer at opturion.com> wrote:
>>
>> For review by anyone.
>>
>> ----------------------
>>
>> 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.
>
> That's fine.
>
> Has pow ever been useful?

Not for me, I can't speak for anyone else.
(The only reason I noticed the problem was after the discussion
about the module dependency graph late last year, I was wondering
why std_util imported the int module.)

Julien.


More information about the reviews mailing list