Subject: Return a list of numbers used in an expression
From: Barton Willis
Date: Sat, 16 Jul 2005 08:47:46 -0500
Yes, try 'numberp' Examples:
(%i24) map(numberp, [3,1/3, 7.8, -9.0b0,a, a/b]);
Evaluation took 0.00 seconds (0.00 elapsed)
(%o24) [true,true,true,true,false,false]
Barton
-----maxima-admin@math.utexas.edu wrote: -----
>To: maxima@math.utexas.edu
>From: Harry Kanda
>Sent by: maxima-admin@math.utexas.edu
>Date: 07/16/2005 08:03AM
>Subject: Return a list of numbers used
>in an expression
>
>Hi everyone,
>
>I'm trying to write a function that will return a
>list of the numbers
>used in an exp
>
>i.e. a: 3*x^2 + 6*x + 3 + 4*y + 5*y^2 + sin(2*x)
>fun(a);
>[3,2,6,3,4,5,2,2]
>
>I'm assuming that i'll have to start down with an
>args breakdown, but
>is there a way to say is this a number? as
>opposed to a var
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxim
>a
>