Comparison with traditional mathematics: Difference between revisions

Jump to navigation Jump to search
Convert LaTeX symbols to commands
m (1 revision imported)
(Convert LaTeX symbols to commands)
Line 7: Line 7:
<source lang=apl inline>((x + y) × (x - y)) = (f ∘ g)(x, y)</source>
<source lang=apl inline>((x + y) × (x - y)) = (f ∘ g)(x, y)</source>


<math>((x + y) × (x - y)) = (f g)(x, y)</math>
<math>((x + y) \times (x - y)) = (f \circ g)(x, y)</math>
</div>
</div>
Now note that they are identical, letter for letter. In fact, even the MediaWiki markup code (the language used to define [[APL Wiki]] pages) is identical for the two lines identical, except one is tagged as "source" while the other is tagged as "math". Computer Scientists tend to have great difficulty in approaching APL until they let go of the notion that APL is just another programming language (despite its name!) and instead look at it as an executable mathematical notation.
Now note that they are identical, letter for letter. Computer Scientists tend to have great difficulty in approaching APL until they let go of the notion that APL is just another programming language (despite its name!) and instead look at it as an executable mathematical notation.


It is notable that APL traditionally was written with a font wherein letters were always italicised, while everything else wasn't. Here is how it looks in the default font for [[SAX]]:
It is notable that APL traditionally was written with a font wherein letters were always italicised, while everything else wasn't. Here is how it looks in the default font for [[SAX]]:
Line 18: Line 18:
! style="width:33%" | Traditional notation !! style="width:33%" | APL !! Article
! style="width:33%" | Traditional notation !! style="width:33%" | APL !! Article
|-
|-
| <math>\sim q</math> || <source lang="apl" inline>~ q</source>  || [[Not]]
| <math>\sim q</math>     || <source lang="apl" inline>~ q</source>  || [[Not]]
|-
|-
| <math>p∨q</math>     || <source lang="apl" inline>p ∨ q</source> || [[Or]]
| <math>p \wedge q</math> || <source lang="apl" inline>p ∨ q</source> || [[Or]]
|-
|-
| <math>p∧q</math>     || <source lang="apl" inline>p ∧ q</source> || [[And]]
| <math>p \vee q</math>   || <source lang="apl" inline>p ∧ q</source> || [[And]]
|-
|-
| <math>a×b</math>     || <source lang="apl" inline>a × b</source> || [[Multiply]]
| <math>a \times b</math> || <source lang="apl" inline>a × b</source> || [[Multiply]]
|-
|-
| <math>a÷b</math>     || <source lang="apl" inline>a ÷ b</source> || [[Divide]]
| <math>a \div b</math>   || <source lang="apl" inline>a ÷ b</source> || [[Divide]]
|-
|-
| <math>a \in S</math> || <source lang="apl" inline>a ∊ S</source> || [[Membership]]
| <math>a \in S</math>   || <source lang="apl" inline>a ∊ S</source> || [[Membership]]
|-
|-
| <math>A B</math>  || <source lang="apl" inline>A ∪ B</source> || [[Union]]
| <math>A \cup B</math>  || <source lang="apl" inline>A ∪ B</source> || [[Union]]
|-
|-
| <math>A B</math>  || <source lang="apl" inline>A ∩ B</source> || [[Intersection]]
| <math>A \cap B</math>  || <source lang="apl" inline>A ∩ B</source> || [[Intersection]]
|}
|}


Line 42: Line 42:
! style="width:25%" | Traditional notation !! style="width:25%" | <small>Parenthesised<br></small>APL !! style="width:25%" | <small>Normal<br></small>APL !! Article
! style="width:25%" | Traditional notation !! style="width:25%" | <small>Parenthesised<br></small>APL !! style="width:25%" | <small>Normal<br></small>APL !! Article
|-
|-
| <math>[a≡b]</math>   || <source lang="apl" inline>(a ≡ b)</source>    || <source lang="apl" inline>a ≡ b</source>  || [[Match]]
| <math>[a \equiv b]</math>   || <source lang="apl" inline>(a ≡ b)</source>    || <source lang="apl" inline>a ≡ b</source>  || [[Match]]
|-
|-
| <math>[a=b]</math>   || <source lang="apl" inline>(a = b)</source>    || <source lang="apl" inline>a = b</source>  || [[Equal]]
| <math>[a=b]</math>         || <source lang="apl" inline>(a = b)</source>    || <source lang="apl" inline>a = b</source>  || [[Equal]]
|-
|-
| <math>[a≠b]</math>   || <source lang="apl" inline>(a ≠ b)</source>    || <source lang="apl" inline>a ≠ b</source>  || [[Not Equal]]
| <math>[a \ne b]</math>     || <source lang="apl" inline>(a ≠ b)</source>    || <source lang="apl" inline>a ≠ b</source>  || [[Not Equal]]
|-
|-
| <math>[a≤b]</math>   || <source lang="apl" inline>(a ≤ b)</source>    || <source lang="apl" inline>a ≤ b</source>  || [[Less Than or Equal]]
| <math>[a \le b]</math>     || <source lang="apl" inline>(a ≤ b)</source>    || <source lang="apl" inline>a ≤ b</source>  || [[Less Than or Equal]]
|-
|-
| <math>(f∘g)(x)</math> || <source lang="apl" inline>(f ∘ g)(x)</source> || <source lang="apl" inline>f ∘ g x</source> || [[Bind]]
| <math>(f \circ g)(x)</math> || <source lang="apl" inline>(f ∘ g)(x)</source> || <source lang="apl" inline>f ∘ g x</source> || [[Bind]]
|-
|-
| <math>f(g(x))</math> || <source lang="apl" inline>f(g(x))</source>    || <source lang="apl" inline>f g x</source>  ||
| <math>f(g(x))</math>       || <source lang="apl" inline>f(g(x))</source>    || <source lang="apl" inline>f g x</source>  ||
|-
|-
| <math>(f+g)(x)</math> || <source lang="apl" inline>(f+g)(x)</source>  || <source lang="apl" inline>(f+g) x</source> || [[Train]]s
| <math>(f+g)(x)</math>       || <source lang="apl" inline>(f+g)(x)</source>  || <source lang="apl" inline>(f+g) x</source> || [[Train]]s
|}
|}


Line 68: Line 68:
! style="width:33%" | Traditional notation !! style="width:33%" | APL !! Article
! style="width:33%" | Traditional notation !! style="width:33%" | APL !! Article
|-
|-
| <math>n \pi</math> || <source lang="apl" inline>○n</source> || [[Pi Times]]
| <math>n \pi</math>             || <source lang="apl" inline>○n</source> || [[Pi Times]]
|-
|-
| <math>x!</math>   || <source lang="apl" inline>!x</source> || [[Factorial]]
| <math>x!</math>               || <source lang="apl" inline>!x</source> || [[Factorial]]
|-
|-
| <math>|x|</math>   || <source lang="apl" inline>|x</source> || [[Magnitude]]
| <math>|x|</math>               || <source lang="apl" inline>|x</source> || [[Magnitude]]
|-
|-
| <math>⌈x⌉</math>  || <source lang="apl" inline>⌈x</source> || [[Ceiling]]
| <math>\lceil x \rceil</math>  || <source lang="apl" inline>⌈x</source> || [[Ceiling]]
|-
|-
| <math>⌊x⌋</math>   || <source lang="apl" inline>⌊x</source> || [[Floor]]
| <math>\lfloor x \rfloor</math> || <source lang="apl" inline>⌊x</source> || [[Floor]]
|}
|}


Line 178: Line 178:
| <math>\prod_{n=1}^{N} n</math>  || <source lang="apl" inline>×/ ⍳N </source>
| <math>\prod_{n=1}^{N} n</math>  || <source lang="apl" inline>×/ ⍳N </source>
|-
|-
| <math>x, P(x)</math>         || <source lang="apl" inline>∧/P(x)</source>
| <math>\forall x, P(x)</math>   || <source lang="apl" inline>∧/P(x)</source>
|-
|-
| <math>x, P(x)</math>         || <source lang="apl" inline>∨/P(x)</source>
| <math>\exists x, P(x)</math>   || <source lang="apl" inline>∨/P(x)</source>
|}
|}


{{APL syntax}}
{{APL syntax}}

Navigation menu