diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-18 00:55:11 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-18 00:55:11 +0000 |
commit | 6e4fb4c2b8cc5f867eceb3bc39572fe218bb5d13 (patch) | |
tree | 619a415b58c3681cf06ef7d70ed356c9e6acd4eb | |
parent | d68d655abaef0d14652e07608c633b1ff1feefda (diff) | |
download | open-axiom-6e4fb4c2b8cc5f867eceb3bc39572fe218bb5d13.tar.gz |
Fix AW/293
* algebra/gaussian.spad.pamphlet (ComplexCategory): Remove complex
attribute.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/algebra/gaussian.spad.pamphlet | 1 | ||||
-rw-r--r-- | src/algebra/intfact.spad.pamphlet | 32 | ||||
-rw-r--r-- | src/testsuite/interpreter/aw-210.input | 3 |
4 files changed, 37 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4d1dc7b4..2525ae03 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-10-17 Alfredo Portes <doyenatccny@gmail.com> + + Fix AW/293 + * algebra/gaussian.spad.pamphlet (ComplexCategory): Remove complex + attribute. + 2008-10-17 Waldek Hebisch <hebisch@math.uni.wroc.pl> Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet index e09ed0c5..a7d5c1dd 100644 --- a/src/algebra/gaussian.spad.pamphlet +++ b/src/algebra/gaussian.spad.pamphlet @@ -28,7 +28,6 @@ ComplexCategory(R:CommutativeRing): Category == Join(MonogenicAlgebra(R, SparseUnivariatePolynomial R), FullyRetractableTo R, DifferentialExtension R, FullyEvalableOver R, FullyPatternMatchable(R), Patternable(R), FullyLinearlyExplicitRingOver R, CommutativeRing) with - complex ++ indicates that % has sqrt(-1) imaginary: () -> % ++ imaginary() = sqrt(-1) = %i. conjugate: % -> % ++ conjugate(x + %i y) returns x - %i y. complex : (R, R) -> % ++ complex(x,y) constructs x + %i*y. diff --git a/src/algebra/intfact.spad.pamphlet b/src/algebra/intfact.spad.pamphlet index 4d4cc811..8e21b097 100644 --- a/src/algebra/intfact.spad.pamphlet +++ b/src/algebra/intfact.spad.pamphlet @@ -407,28 +407,52 @@ IntegerFactorizationPackage(I): Exports == Implementation where G:I := 1 ys: I x: I + l: I + k: I until G > 1 repeat x := y - k: I + ys := y for i in 1..convert(r)@Integer repeat y := (y*y+5::I) rem n q := (q*abs(x-y)) rem n - k := 0 + k := 0::I + G := gcd(q,n) until (k>=r) or (G>1) repeat ys := y for i in 1..convert(min(m,r-k))@Integer repeat y := (y*y+5::I) rem n - q := q*abs(x-y) rem n + q := (q*abs(x-y)) rem n G := gcd(q,n) k := k+m + k := k + r r := 2*r if G=n then + l := k - m + G := 1::I until G>1 repeat ys := (ys*ys+5::I) rem n G := gcd(abs(x-ys),n) + l := l + 1 + if G = n then + y := x0 + x := x0 + for i in 1..convert(l)@Integer repeat + y := (y*y + 5::I) rem n + G := gcd(abs(x-y),n) + until G > 1 repeat + y := (y*y + 5::I) rem n + x := (x*x + 5::I) rem n + G := gcd(abs(x-y),n) G=n => "failed" G + PollardSmallFactor20(n: I): Union(I,"failed") == + r: Union(I,"failed") + for i in 1..20 repeat + r := PollardSmallFactor n + r case I => return r + r + BasicSieve(r, lim) == l:List(I) := [1::I,2::I,2::I,4::I,2::I,4::I,2::I,4::I,6::I,2::I,6::I] @@ -480,7 +504,7 @@ IntegerFactorizationPackage(I): Exports == Implementation where (y:=perfectSqrt (x**2-n)) case I => insert_!(x+y,a,c) insert_!(x-y,a,c) - (d := PollardSmallFactor n) case I => + (d := PollardSmallFactor20 n) case I => m' : NonNegativeInteger for m' in 0.. while zero?(n rem d) repeat n := n quo d insert_!(d, a, m' * c) diff --git a/src/testsuite/interpreter/aw-210.input b/src/testsuite/interpreter/aw-210.input new file mode 100644 index 00000000..6a235d7a --- /dev/null +++ b/src/testsuite/interpreter/aw-210.input @@ -0,0 +1,3 @@ +integrate(1/(1 + x^4),x=%minusInfinity..%plusInfinity) +integrate(1/(1 + x^4),x) + |