Logged In: YES
user_id=588346
The $binomial function in mlisp is part of the noun/verb
scheme. Along the same lines, ($sin '$%pi) => 1.22E-16 and
not 0.
The binomial function (defined in mlisp.lisp) sets $float
and $numer to true. This can cause $binomial
to return a decimal approximation when a rational
is expected; consider
------ file bug.lisp--------------------------------
(defun $unk (a b)
($binomial a b))
--------------------------------------------------------
(C1) load("l:/maxima-bugs/bug.lisp")$
(C2) unk(21/5,4);
(D2) 1.4784
(C3) display2d : false$
(C4) binomial(21/5,4);
(D4) 924/625
Calling binomial from a Maxima function doesn't
use the binomial function defined in mlisp; for
example,
(C5) foo(a,b) := block([], binomial(a,b))$
(C6) foo(21/5,4);
(D6) 924/625
I seen no reason for $binomial in mlisp to set $float
or $numer to true; I suggest that we try removing
these assigments.
Barton
Logged In: YES
user_id=588346
The $binomial function in mlisp is part of the noun/verb
scheme. Along the same lines, ($sin '$%pi) => 1.22E-16 and
not 0.
Logged In: YES
user_id=501686
$BINOMIAL appears to be working as intended per the comment
by Stavros. Closing this report as "won't fix".
Log in to post a comment.