Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: numberp (<expr>) Returns true if <expr> is a literal integer, rational number, floating point number, or bigfloat, otherwise false.
![Numberp Example numberp (42);
numberp (-13/19);
numberp (3.14159);
numberp (-1729b-4);
map (numberp, [%e, %pi, %i, %phi, inf, minf]);
declare (a, even, b, odd, c, integer, d, rational, e, irrational, f, real, g, imaginary, h, complex);
map (numberp, [a, b, c, d, e, f, g, h]);](http://maxima-online.org//plot.html?g=i2037122714.png&t=img&db=r860262660)
numberp returns false if its argument is a symbol, even if the argument is a symbolic number such as %pi or %i, or declared to be even, odd, integer, rational, irrational, real, imaginary, or complex.
Examples:
(%i1) numberp (42);
(%o1) true
(%i2) numberp (-13/19);
(%o2) true
(%i3) numberp (3.14159);
(%o3) true
(%i4) numberp (-1729b-4);
(%o4) true
(%i5) map (numberp, [%e, %pi, %i, %phi, inf, minf]);
(%o5) [false, false, false, false, false, false]
(%i6) declare (a, even, b, odd, c, integer, d, rational,
e, irrational, f, real, g, imaginary, h, complex);
(%o6) done
(%i7) map (numberp, [a, b, c, d, e, f, g, h]);
(%o7) [false, false, false, false, false, false, false, false](%o1) true (%i2)