fnormal - Maple Programming Help

Home : Support : Online Help : Mathematics : Numbers : fnormal

fnormal

floating-point normalization

 Calling Sequence fnormal(e) fnormal(e, digits) fnormal(e, digits, epsilon)

Parameters

 e - algebraic expression, or a list, set, relation, series, or range of algebraic expressions digits - (optional) number of digits for floating-point evaluation (defaults to the value of the global variable Digits) epsilon - (optional) error tolerance for fuzzy zero'' (defaults to the value Float(1,-digits+2))

Description

 • The value returned by fnormal is an expression equivalent to e under the assumption that all numeric values with magnitude less than epsilon may be considered to be zero.
 • In addition, all floats in e which remain nonzero are converted to floats with digits precision.
 • fnormal preserves numeric type and sign information as much as possible.  Thus, for example, fnormal(1e-20*I, 10) = 0.*I not 0. .  This ensures that branching behavior is generally not affected by fnormal.  Use simplify(expr, zero) to remove 0 real or imaginary parts of complex floating point numbers.
 • If e is a list, set, range, series, equation, or relation, then fnormal is applied recursively to the components of e.

Examples

 > $\mathrm{fnormal}\left(1.{10}^{-10}\right)$
 ${0.}$ (1)
 > $\mathrm{fnormal}\left(1+1.{10}^{-10}I\right)$
 ${1.}{+}{0.}{}{I}$ (2)
 > $\mathrm{fnormal}\left(\left[{10}^{-10},-{10}^{-9},{10}^{-8}\right]\right)$
 $\left[{0.}{,}{-0.}{,}\frac{{1}}{{100000000}}\right]$ (3)
 > $e≔2{x}^{2}+0.00001x-\mathrm{\pi }$
 ${e}{≔}{2}{}{{x}}^{{2}}{+}{0.00001}{}{x}{-}{\mathrm{\pi }}$ (4)
 > $\mathrm{fnormal}\left(e\right)$
 ${2}{}{{x}}^{{2}}{+}{0.00001}{}{x}{-}{\mathrm{\pi }}$ (5)
 > $\mathrm{fnormal}\left(e,4\right)$
 ${2}{}{{x}}^{{2}}{-}{3.141592654}$ (6)
 > $f≔\mathrm{evalf}\left(e\right)$
 ${f}{≔}{2.}{}{{x}}^{{2}}{+}{0.00001}{}{x}{-}{3.141592654}$ (7)
 > $\mathrm{fnormal}\left(f,4\right)$
 ${2.}{}{{x}}^{{2}}{-}{3.142}$ (8)
 > $\mathrm{ln}\left(-1.-1.{10}^{-15}I\right),\mathrm{ln}\left(\mathrm{fnormal}\left(-1.-1.{10}^{-15}I,10\right)\right),\mathrm{ln}\left(\mathrm{simplify}\left(\mathrm{fnormal}\left(-1.-1.{10}^{-15}I,10\right),\mathrm{zero}\right)\right)$
 ${5.}{}{{10}}^{{-31}}{-}{3.141592654}{}{I}{,}{-}{3.141592654}{}{I}{,}{3.141592654}{}{I}$ (9)