Figuredynamic-basis-elem Figure 52 , A P P L Y \APPLY APPLY on Floats: Elementary Functions, in Section D.4.3 Powers and Elementary Functions .
A P P L Y ( b , N a N ) = { N a N } for each b of the figure A P P L Y ( b , x ) = { x } if x is a zero, for b ∈ { sin , tan , asin , atan } A P P L Y ( b , x ) = { N a N } if x ∈ { + ∞ , − ∞ } , for b ∈ { sin , cos , tan } A P P L Y ( b , x ) = { N a N } if ∣ x ∣ > 1 , for b ∈ { asin , acos } A P P L Y ( atan , x ) = { s g n ( x ) ⋅ f l ( π / 2 ) } if x ∈ { + ∞ , − ∞ }
\begin{array}{rcll}
\APPLY(b,\dbNaN) {\ }& = {\ }& \{\dbNaN\} {\quad}& \text{for each}\ b\ \text{of the figure}\\[1ex]
\APPLY(b,x) {\ }& = {\ }& \{x\} {\quad}& \text{if}\ x\ \text{is a zero, for}\ b\in\{\kw{sin},\kw{tan},\kw{asin},\kw{atan}\}\\
\APPLY(b,x) {\ }& = {\ }& \{\dbNaN\} {\quad}& \text{if}\ x\in\{+\infty,-\infty\},\ \text{for}\ b\in\{\kw{sin},\kw{cos},\kw{tan}\}\\
\APPLY(b,x) {\ }& = {\ }& \{\dbNaN\} {\quad}& \text{if}\ |x|>1,\ \text{for}\ b\in\{\kw{asin},\kw{acos}\}\\
\APPLY(\kw{atan},x) {\ }& = {\ }& \{\dbsgn(x)\cdot\dbfl(\dbpinum/2)\} {\quad}& \text{if}\ x\in\{+\infty,-\infty\}
\end{array}
APPLY ( b , NaN ) APPLY ( b , x ) APPLY ( b , x ) APPLY ( b , x ) APPLY ( atan , x ) = = = = = { NaN } { x } { NaN } { NaN } { sgn ( x ) ⋅ fl ( π /2 )} for each b of the figure if x is a zero, for b ∈ { sin , tan , asin , atan } if x ∈ { + ∞ , − ∞ } , for b ∈ { sin , cos , tan } if ∣ x ∣ > 1 , for b ∈ { asin , acos } if x ∈ { + ∞ , − ∞ } A P P L Y ( Elm.Kernel.Basics.log , x ) = { − ∞ } if x is a zero = { N a N } if x < 0 = { + ∞ } if x = + ∞ A P P L Y ( b , x ) = { f l ( f ( x ) ) } otherwise, for each b
\begin{array}{rcll}
\APPLY(\kw{Elm.Kernel.Basics.log},x) {\ }& = {\ }& \{-\infty\} {\quad}& \text{if}\ x\ \text{is a zero}\\
{\ }& = {\ }& \{\dbNaN\} {\quad}& \text{if}\ x<0\\
{\ }& = {\ }& \{+\infty\} {\quad}& \text{if}\ x=+\infty\\[1ex]
\APPLY(b,x) {\ }& = {\ }& \{\dbfl(f(x))\} {\quad}& \text{otherwise, for each}\ b
\end{array}
APPLY ( Elm.Kernel.Basics.log , x ) APPLY ( b , x ) = = = = { − ∞ } { NaN } { + ∞ } { fl ( f ( x ))} if x is a zero if x < 0 if x = + ∞ otherwise, for each b A P P L Y ( atan2 , y , x ) = { N a N } if x or y is N a N = { y } if y is a zero, and x is + 0 or x > 0 = { s g n ( y ) ⋅ f l ( π ) } if y is a zero, and x is − 0 or x < 0 = { s g n ( y ) ⋅ f l ( π / 2 ) } if x is a zero = { s g n ( y ) ⋅ f l ( π / 2 ) } if y is an infinity and x is finite = { s g n ( y ) ⋅ f l ( 3 π / 4 ) } if y is an infinity and x = − ∞ = { s g n ( y ) ⋅ f l ( π / 4 ) } if y is an infinity and x = + ∞ = { s g n ( y ) ⋅ f l ( π ) } if x = − ∞ = { s g n ( y ) ⋅ 0 } if x = + ∞ = { f l ( θ ) } otherwise
\begin{array}{rcll}
\APPLY(\kw{atan2},y,x) {\ }& = {\ }& \{\dbNaN\} {\quad}& \text{if}\ x\ \text{or}\ y\ \text{is}\ \dbNaN\\
{\ }& = {\ }& \{y\} {\quad}& \text{if}\ y\ \text{is a zero, and}\ x\ \text{is}\ +0\ \text{or}\ x>0\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(\dbpinum)\} {\quad}& \text{if}\ y\ \text{is a zero, and}\ x\ \text{is}\ -0\ \text{or}\ x<0\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(\dbpinum/2)\} {\quad}& \text{if}\ x\ \text{is a zero}\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(\dbpinum/2)\} {\quad}& \text{if}\ y\ \text{is an infinity and}\ x\ \text{is finite}\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(3\dbpinum/4)\} {\quad}& \text{if}\ y\ \text{is an infinity and}\ x=-\infty\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(\dbpinum/4)\} {\quad}& \text{if}\ y\ \text{is an infinity and}\ x=+\infty\\
{\ }& = {\ }& \{\dbsgn(y)\cdot\dbfl(\dbpinum)\} {\quad}& \text{if}\ x=-\infty\\
{\ }& = {\ }& \{\dbsgn(y)\cdot 0\} {\quad}& \text{if}\ x=+\infty\\
{\ }& = {\ }& \{\dbfl(\theta)\} {\quad}& \text{otherwise}
\end{array}
APPLY ( atan2 , y , x ) = = = = = = = = = = { NaN } { y } { sgn ( y ) ⋅ fl ( π )} { sgn ( y ) ⋅ fl ( π /2 )} { sgn ( y ) ⋅ fl ( π /2 )} { sgn ( y ) ⋅ fl ( 3 π /4 )} { sgn ( y ) ⋅ fl ( π /4 )} { sgn ( y ) ⋅ fl ( π )} { sgn ( y ) ⋅ 0 } { fl ( θ )} if x or y is NaN if y is a zero, and x is + 0 or x > 0 if y is a zero, and x is − 0 or x < 0 if x is a zero if y is an infinity and x is finite if y is an infinity and x = − ∞ if y is an infinity and x = + ∞ if x = − ∞ if x = + ∞ otherwise Figure 52 : A P P L Y \APPLY APPLY on Floats: Elementary Functions