aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/gaussian.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-08-10 02:33:46 +0000
committerdos-reis <gdr@axiomatics.org>2011-08-10 02:33:46 +0000
commit0a0661e0c50e9c3e160d54b8e0a5b891d419e2bc (patch)
tree42ef806af61677a355623104e7ef3d35ecbbaedb /src/algebra/gaussian.spad.pamphlet
parentf1a4ca4eb786bfb440fd537d06a25264b0596369 (diff)
downloadopen-axiom-0a0661e0c50e9c3e160d54b8e0a5b891d419e2bc.tar.gz
* interp/setvart.boot: Remoe OpenMath description.
* interp/setvars.boot (setOutputOpenMath): Remove. (describeOutputOpenMath): Likewise. * algebra/Makefile.in (axiom_algebra_layer_14): Don't include OMSERVER. * algebra/float.spad.pamphlet (Float): Remove OpenMath exports. * algebra/fraction.spad.pamphlet (Fraction): Likewise. * algebra/gaussian.spad.pamphlet (Complex): Likewise. * algebra/integer.spad.pamphlet (Integer): Likewise. * algebra/list.spad.pamphlet (List): Likewise. * algebra/sf.spad.pamphlet (DoubleFloat): Likewise. * algebra/si.spad.pamphlet (SingleInteger): Likewise. * algebra/string.spad.pamphlet (String): Likewise. * algebra/symbol.spad.pamphlet (Symbol): Likewise.
Diffstat (limited to 'src/algebra/gaussian.spad.pamphlet')
-rw-r--r--src/algebra/gaussian.spad.pamphlet47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet
index 44e9b918..c87d880a 100644
--- a/src/algebra/gaussian.spad.pamphlet
+++ b/src/algebra/gaussian.spad.pamphlet
@@ -547,55 +547,10 @@ ComplexPatternMatch(R, S, CS) : C == T where
++ \spadtype {Complex(R)} creates the domain of elements of the form
++ \spad{a + b * i} where \spad{a} and b come from the ring R,
++ and i is a new element such that \spad{i**2 = -1}.
-Complex(R:CommutativeRing): ComplexCategory(R) with
- if R has OpenMath then OpenMath
+Complex(R:CommutativeRing): ComplexCategory(R)
== add
Rep := Record(real:R, imag:R)
- if R has OpenMath then
- writeOMComplex(dev: OpenMathDevice, x: %): Void ==
- OMputApp(dev)
- OMputSymbol(dev, "complex1", "complex__cartesian")
- OMwrite(dev, real x)
- OMwrite(dev, imag x)
- OMputEndApp(dev)
-
- OMwrite(x: %): String ==
- s: String := ""
- sp := OM_-STRINGTOSTRINGPTR(s)$Lisp
- dev: OpenMathDevice := OMopenString(sp pretend String, OMencodingXML())
- OMputObject(dev)
- writeOMComplex(dev, x)
- OMputEndObject(dev)
- OMclose(dev)
- s := OM_-STRINGPTRTOSTRING(sp)$Lisp pretend String
- s
-
- OMwrite(x: %, wholeObj: Boolean): String ==
- s: String := ""
- sp := OM_-STRINGTOSTRINGPTR(s)$Lisp
- dev: OpenMathDevice := OMopenString(sp pretend String, OMencodingXML())
- if wholeObj then
- OMputObject(dev)
- writeOMComplex(dev, x)
- if wholeObj then
- OMputEndObject(dev)
- OMclose(dev)
- s := OM_-STRINGPTRTOSTRING(sp)$Lisp pretend String
- s
-
- OMwrite(dev: OpenMathDevice, x: %): Void ==
- OMputObject(dev)
- writeOMComplex(dev, x)
- OMputEndObject(dev)
-
- OMwrite(dev: OpenMathDevice, x: %, wholeObj: Boolean): Void ==
- if wholeObj then
- OMputObject(dev)
- writeOMComplex(dev, x)
- if wholeObj then
- OMputEndObject(dev)
-
0 == [0, 0]
1 == [1, 0]
zero? x == zero?(x.real) and zero?(x.imag)