From ba91d65da984ba19dff664422ca48b2a179ea4b9 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 28 Jul 2010 08:21:13 +0000 Subject: * algebra/integer.spad.pamphlet (Integer): Use builtin functions %irem and %iquo. * algebra/si.spad.pamphlet (SingleInteger): Likewise. --- src/algebra/integer.spad.pamphlet | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/algebra/integer.spad.pamphlet') diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet index 9685c43d..1b67fd0e 100644 --- a/src/algebra/integer.spad.pamphlet +++ b/src/algebra/integer.spad.pamphlet @@ -91,6 +91,8 @@ Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with import %iadd: (%,%) -> % from Foreign Builtin import %isub: (%,%) -> % from Foreign Builtin import %imul: (%,%) -> % from Foreign Builtin + import %irem: (%,%) -> % from Foreign Builtin + import %iquo: (%,%) -> % from Foreign Builtin import %imax: (%,%) -> % from Foreign Builtin import %imin: (%,%) -> % from Foreign Builtin import %igcd: (%,%) -> % from Foreign Builtin @@ -210,8 +212,8 @@ Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with max(x,y) == %imax(x,y) min(x,y) == %imin(x,y) divide(x,y) == DIVIDE2(x,y)$Lisp - x quo y == QUOTIENT2(x,y)$Lisp - x rem y == REMAINDER2(x,y)$Lisp + x quo y == %iquo(x,y) + x rem y == %irem(x,y) shift(x, y) == ASH(x,y)$Lisp recip(x) == if one? x or x=-1 then x else "failed" gcd(x,y) == %igcd(x,y) -- cgit v1.2.3