Estimated hours taken: 0.5
Branches: main
Rename rational.inverse/1 to rational.reciprocal/1. Export rational.reciprocal
from the rational module. This is a little cleaner than having to take the
reciprocal of a number by dividing one by it.
NEWS:
Mention this change.
library/rational.m:
Rename rational.inverse/1 to rational.reciprocal/1.
Export this predicate from the rational module.
tests/hard_coded/rational_test.m:
Perform this test using the reciprocal function from the library.
Delete the definition of inverse that was here.
Estimated hours taken: 1.5
Branches: main
Add some functions to the integer and rational modules.
Clean up the code in these modules so it adheres more closely to
our current coding standards.
NEWS:
Mention these changes.
library/integer.m:
Shift the constant functions integer.zero/0 and integer.one/0
back into the interface. According to the log they were deleted
because they were not sufficiently useful. In my view they
the symbolic names are preferable to writing them as integer(1)
and integer(0).
Add a function version of integer.pow/3.
Shift a large comment that concerns implementation details and
possible improvements to the module from the interface into the
implementation.
(This avoids it being included in the library reference manual).
Various code cleanups, in particular fix spacing and
indentation throughout.
library/rational.m:
Add function rational/1 that converts an int to a rational and
function from_integer/1 that does the same with an integer.
For consistency with the above add a function from_integers/2 and
deprecate the version rational_from_integers/2.
Remove the functions izero and ione from the implementation and
just call integer.zero/0 and integer.one/0 now that they are
exported from the integer module again.
Various code cleanups.
Estimated hours taken: 0.2
Branches: main, release
library/mer_std.m:
library/rational.m:
library/integer.m:
These modules were unintentionally licensed under the
GPL rather than the LGPL.
Estimated hours taken: 0.1
library/rational.m:
I accidentally checked in a slightly earlier version of this
file which didn't compile. 8^(
This is the correct version.
Estimated hours taken: 13
library/integer.m:
Implementation of an arbitrary precision integer type and
operations on it.
library/rational.m:
Implementation of arbitrary precision rational numbers.
library/library.m:
Necessary changes for adding the above two modules.
NEWS:
Noted the addition of the above two modules.