Comparison with traditional mathematics: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 182: Line 182:
| <math>\exists x, P(x)</math>    || <source lang="apl" inline>∨/P(x)</source>
| <math>\exists x, P(x)</math>    || <source lang="apl" inline>∨/P(x)</source>
|}
|}
 
== Practical example ==
The steps to produce the component of a vector <math>\textbf{a}</math> in the direction of another vector <math>\textbf{b}</math> go as follows:
<div style="text-align:center">
{| class="wikitable c" style="margin: 1em auto 1em auto"
! style="width:50%" | Traditional notation !! APL
|-
| <math>|\textbf{b}|=\sqrt[2]{\textbf{b}\cdot\textbf{b}}</math> || <source lang=apl>bNorm ← 2 Root b +.× b</source>
|-
| <math>\hat{\textbf{b}} = \textbf{b}\div|\textbf{b}|</math>  ||  <source lang=apl>bHat ← b ÷ bNorm</source>
|-
| <math>\textbf{a}_\textbf{b}=(\textbf{a}\cdot\hat{\textbf{b}})\hat{\textbf{b}}</math>  ||  <source lang=apl>a_b ← (a +.× bHat) × bHat</source>
|}
</div>
{{APL syntax}}
{{APL syntax}}

Navigation menu