Menu ▾ ▴

#1934 taylor expansion bug when mixing floats and rationals

open
nobody
5
2012-11-18
2010-03-25
Anonymous
No

When taylor encounters terms of the same order, one with float coefficient and the other one with rational coefficient, with non-minimal degree, it fails.

Example:
keepfloat:true;
taylor(cos(x) + 1.0*x^2, x, 0, 2);
Maxima encountered a Lisp error:
Error in MACSYMA-TOP-LEVEL [or a callee]: 1.0 is not of type INTEGER.

while taylor(cos(x) + 1.0*x, x, 0, 2) works correctly, since there is no term of order 1 in cos(x), and taylor(cos(x) + 1.0, x, 0, 2) also works correctly.

Discussion


Log in to post a comment.