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

check for an algebraic number in terms of radicals

Parameters

 expr - any expression

Description

 • The type(expr, radnum) function checks to see if expr is a radical number.
 • A radical number is defined as either a rational number or I, or a combination of roots of rational numbers specified in terms of radicals. A sum, product, or quotient of these is also a radical number.

Examples

 > $\mathrm{type}\left(\frac{2}{3},\mathrm{radnum}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{ln}\left(2\right),\mathrm{radnum}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left({\left(-1\right)}^{\frac{1}{2}},\mathrm{radnum}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\frac{5}{\sqrt{2}},\mathrm{radnum}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left({\left(\frac{3}{2}\right)}^{\frac{4}{3}},\mathrm{radnum}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left({x}^{\frac{1}{4}},\mathrm{radnum}\right)$
 ${\mathrm{false}}$ (6)