On 9/9/07, Robert Dodier <robert.dodier at gmail.com> wrote:
> It turns out the problem is that $ERF applied to a numerical argument
> does not yield a number (while %ERF applied to a number does yield
> a number).
OK, here's a patch to make erf act like many other built-in functions.
With this change, plot2d(erf(x), [x, -5, 5]) works OK (and it didn't before).
I'll commit this if there isn't any opposition.
Robert
--- src/mlisp.lisp 7 Sep 2007 18:59:30 -0000 1.53
+++ src/mlisp.lisp 10 Sep 2007 01:53:53 -0000
@@ -2284,7 +2284,7 @@
(|''MAKE| $acot %acot) (|''MAKE| $asec %asec) (|''MAKE| $acsc %acsc)
(|''MAKE| $asinh %asinh) (|''MAKE| $acosh %acosh) (|''MAKE| $atanh %atanh)
(|''MAKE| $acoth %acoth) (|''MAKE| $asech %asech) (|''MAKE| $acsch %acsch)
- (|''MAKE| $gamma %gamma))
+ (|''MAKE| $erf %erf) (|''MAKE| $gamma %gamma))
(defmfun $binomial (x y)
(let (($numer t) ($float t))