Changes
http://wiki.axiom-developer.org/358VariableIsApparentlyAlwaysAssumedToBePositive/diff
--
This rewriting does not change the result or explain the difference in
handling. 'map(f, ...)' is not exactly the same syntax as 'integrate(f(x),
...)'. I think the real reason for the failure of 'eval', 'integrate' is these
functions are not programmed to handle conditionals in function definitions.
\begin{axiom}
h(x | x<=0) == -x^2
eval(h(x), x=-2)
integrate(h(x), x=-2..0)
integrate(h(x), x=-2.0..0.0)
\end{axiom}
If the interpreter is able to find another definition for h that is valid, it
would have used it. Instead of compiling the function h, as in the handling of
'map(h, ...)', and which is what it might have done, the interpreter is trying
to evaluate exactly, not numerically. Are there any numerical integration
functions in Axiom? Indeed, how can I compute something like
\begin{axiom}
[h(x) for x in -1.0..0.0 by 0.5]
\end{axiom}
Must I manually translate an integer segment to a float segment (a la old
Fortran)?
\begin{axiom}
[h(-1.0+0.5*i) for i in 0..2]
\end{axiom}
--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]