[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [#69 sqrt(-1/abs(x))-1/sqrt(-abs(x))]
From: |
kratt6 |
Subject: |
[Axiom-developer] [#69 sqrt(-1/abs(x))-1/sqrt(-abs(x))] |
Date: |
Tue, 18 Oct 2005 06:09:11 -0500 |
Changes http://wiki.axiom-developer.org/69Sqrt1AbsX1SqrtAbsX/diff
--
Just for the archive, here is the patch::
--- /home/rubey/axiom/mnt/linux/src/algebra/algfunc.spad 2004-05-21
18:51:30.000000000 +0200
+++ algfunc.spad 2004-05-25 13:39:19.000000000 +0200
@@ -431,9 +431,20 @@
hackroot(x, n) ==
-- one? n or one? x => x
(n = 1) or (x = 1) => x
+
+-- the following is FALSE! if x can be negative. Example: x=-1/2 would pass
the
+-- test and give 1/(-2)^(1/n) ~= (-1/2)^(1/n)
-- (x ^= -1) and (one?(num := numer x) or (num = -1)) =>
- (x ^= -1) and (((num := numer x) = 1) or (num = -1)) =>
- inv hackroot((num * denom x)::F, n)
+-- (x ^= -1) and (((num := numer x) = 1) or (num = -1)) =>
+-- inv hackroot((num * denom x)::F, n)
+
+-- permissible when denom x is a positive number
+
+ (((dx := denom x) ^= 1) and
+ ((rx := retractIfCan(dx)@Union(Integer,"failed")) case Integer) and
+ positive?(rx))
+ => hackroot((numer x)::F, n)/hackroot(rx::Integer::F, n)
+
(x = -1) and n = 4 =>
((-1::F) ** (1::Q / 2::Q) + 1) / ((2::F) ** (1::Q / 2::Q))
kernel(oproot, [x, n::F])
--
forwarded from http://wiki.axiom-developer.org/address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] [#69 sqrt(-1/abs(x))-1/sqrt(-abs(x))],
kratt6 <=