Changes 
http://wiki.axiom-developer.org/358VariableIsApparentlyAlwaysAssumedToBePositive/diff
--

??changed:
 
-(1) -> f(x|x<0)==-x**2
-                                                                   Type: Void
-(2) -> f(x)==x**2
-                                                                   Type: Void
+\begin{axiom}
+f(x|x<0)==-x**2
+f(x)==x**2
+\end{axiom}
 

??changed:
 Then, draw the function
-
-(3) -> draw(f(x),x=-1..1)
-   Compiling function f with type Variable x -> Polynomial Integer 
-Compiling /tmp/gazonk0.lsp.
-End of Pass 1.  
-End of Pass 2.  
-OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
-Finished compiling /tmp/gazonk0.lsp.
-   Compiling function %F with type DoubleFloat -> DoubleFloat 
-   Graph data being transmitted to the viewport manager...
-   AXIOM2D data being transmitted to the viewport manager...
-
-   (3)  TwoDimensionalViewport: "x*x"
-                                                 Type: TwoDimensionalViewport
-
+\begin{axiom}
+draw(f(x),x=-1..1)
+\end{axiom}
 Note that the function is compiled with Variable x -> Polynomial Integer, and 
the viewport shows the function x*x, even for x<0, where it should show -x*x.

??changed:
 The same holds when you eval the function:
-
-(4) -> )clear all
-   All user variables and function definitions have been cleared.
-(1) -> f(x|x<0)==-x**2
-                                                                   Type: Void
-(2) -> f(x)==x**2
-                                                                   Type: Void
-(3) -> eval(f(x),x=-5)
-   Compiling function f with type Variable x -> Polynomial Integer 
-
-   (3)  25
-                                                     Type: Polynomial Integer
-
-Here, we should expect -25. And shouldn't this:
-
-(4) -> f(x)
-(4) -> 
-         2
-   (4)  x
-[1 more lines...]
+\begin{axiom}
+eval(f(x),x=-5)
+\end{axiom}
+Here, we should expect -25. And shouldn't
+\begin{axiom}
+f(x)
+\end{axiom}
 result in something similar to

??changed:
 result in something similar to
-
-(5) -> )display values f
-   Definition:
-                         2
-     f (x | x < 0) == - x
-             2
-     f x == x
-
-?
+\begin{axiom}
+)display values f
+\end{axiom}
 

??changed:
 Integration, therefore, also goes wrong,
-
-(5) -> integrate(f(x),x=-5..5)
-(5) -> 
-        250
-   (5)  ---
-         3
-                    Type: Union(f1: OrderedCompletion Expression Integer,...)
-
+\begin{axiom}
+integrate(f(x),x=-5..5)
+\end{axiom}
 which should of course yield 0. It would appear that in certain operations, 
when performing a function on f (like draw, eval, integrate), or when x is not 
specified, it is assumed to be positive. After that, the actual value is filled 
in and this can therefore yield an erroneous result.

--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]

Reply via email to