Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Numberp Calculator

Numberp

Function: numberp (<expr>) Returns true if <expr> is a literal integer, rational number, floating point number, or bigfloat, otherwise false.

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) 

Numberp Example

Related Examples

numberp

numberp(%i);

Calculate

numberp

numberp(%i);

Calculate