scalar - Maple Help

type/scalar

check for scalars

 Calling Sequence type(expr, scalar)

Parameters

 expr - Maple expression

Description

 • The type scalar includes all names defined to be scalar through defform.
 • Any sum or product which contains one term which is of type scalar, and remaining terms that are all either of type scalar or of type const, is considered to be scalar.
 • Any power, where the base type is scalar, is considered to be scalar.
 • The types const, scalar, and form are mutually exclusive.  Any expression can belong to at most one of these types.
 • This function is part of the difforms package and can only be used after performing with(difforms).

Examples

 > $\mathrm{with}\left(\mathrm{difforms}\right):$$\mathrm{defform}\left(a=\mathrm{const},b=\mathrm{const},c=\mathrm{scalar},d=\mathrm{scalar}\right)$
 > $\mathrm{type}\left(c+{d}^{3},\mathrm{scalar}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(a+d,\mathrm{scalar}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(a+d+f,\mathrm{scalar}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(a+b,\mathrm{scalar}\right)$
 ${\mathrm{false}}$ (4)