type/factorial - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/factorial

type/factorial

test for factorial

 Calling Sequence type(expr, !)

Parameters

 expr - any expression

Description

 • This function will return true if expr is a factorial, and false otherwise.  For more information about factorials, see factorial.
 • An expression of the type n!, where $n$ is an integer, is not of type !, since its value is calculated before the call to the type function is executed.
 • Note that the factorial function is both of type function and type !. In the function call, it is important that the exclamation mark, !, be enclosed in quotes.  Missing quotes will cause a syntax error.

Examples

 > $\mathrm{type}\left(n!,\mathrm{!}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(n!,\mathrm{function}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(6!,\mathrm{!}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(0.5!,\mathrm{!}\right)$
 ${\mathrm{false}}$ (4)