Commit Graph

7 Commits

Author SHA1 Message Date
Julien Fischer
fbc662cb70 Rename rational.inverse/1 to rational.reciprocal/1. Export rational.reciprocal
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.
2004-01-12 12:46:40 +00:00
Julien Fischer
90d2b4f1d2 Add some functions to the integer and rational modules.
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.
2003-12-18 07:48:19 +00:00
Zoltan Somogyi
6554ef7daa Replace "is" with "=".
Estimated hours taken: 2
Branches: main

Replace "is" with "=".
Add field names where relevant.
Replace integers with counters where relevant.
2003-05-26 09:01:46 +00:00
Simon Taylor
d325ed1f4c These modules were unintentionally licensed under the
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.
2002-08-29 10:09:07 +00:00
Bert Thompson
e1c06160e5 <overview or general description of changes>
Estimated hours taken: _____

<overview or general description of changes>

<directory>/<file>:
	<detailed description of changes>
1998-04-16 12:13:42 +00:00
Bert Thompson
ec111abeb0 I accidentally checked in a slightly earlier version of this
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.
1998-04-15 09:20:50 +00:00
Bert Thompson
33662abbb8 Implementation of an arbitrary precision integer type and
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.
1998-04-15 06:50:14 +00:00