realcons - Maple Help

type/realcons

check for a real constant

 Calling Sequence type(x, realcons)

Parameters

 x - any expression

Description

 • The call type(x, realcons) checks if x is a real constant. A real constant is infinity, -infinity, or an expression for which evalf returns a floating-point number.

Subtypes

 •

Supertypes

 •

Examples

 > $\mathrm{type}\left(4,\mathrm{realcons}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(2+I,\mathrm{realcons}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(3.5,\mathrm{realcons}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{ln}\left(\mathrm{\pi }\right),\mathrm{realcons}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(\mathrm{sin}\left(2\right),\mathrm{realcons}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(\mathrm{undefined},\mathrm{realcons}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\mathrm{\infty },\mathrm{realcons}\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left({x}^{2},\mathrm{realcons}\right)$
 ${\mathrm{false}}$ (8)