From 2afb23928e1984d475cc460e1672e8f6fa0e4dbe Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 11 Aug 2021 17:21:31 -0400 Subject: Allow clicking on header to get fragment link --- docs/doc/arithmetic.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/doc/arithmetic.html') diff --git a/docs/doc/arithmetic.html b/docs/doc/arithmetic.html index 0be70506..22dc233b 100644 --- a/docs/doc/arithmetic.html +++ b/docs/doc/arithmetic.html @@ -4,7 +4,7 @@ BQN: Arithmetic functions -

Arithmetic functions

+

Arithmetic functions

BQN's arithmetic functions use mostly the same symbols as APL, and the functionality is actually defined by the language implementation's number system and not the specification, so there's not too much to say about them.

Summary of differences for APLers:

-

Basic arithmetic

+

Basic arithmetic

These functions are also introduced in the first BQN tutorial.

BQN of course supports the elementary functions taught in schools everywhere:

@@ -104,7 +104,7 @@ ׯ2¯004 ⟨ 1 ¯1 0 0 1 ⟩ -

Character arithmetic

+

Character arithmetic

The Add and Subtract functions can be applied to characters as well as numbers. While any two numbers (finite ones, at least) can be added or subtracted, character arithmetic has more restrictions.

@@ -149,7 +149,7 @@ ↗️
    'a' - @
 97
 
-

Additional arithmetic

+

Additional arithmetic

@@ -202,7 +202,7 @@ 1

Unlike in APL, a left argument of 0 fails or returns a not-a-number result. Set 𝕨 to to keep 𝕩 intact, but do note that if 𝕩<0 this will return .

-

Comparisons

+

Comparisons

BQN uses the six standard comparison functions of mathematics. For each pair of atoms the result is 1 if the comparison is true and 0 if it's false. These functions do the obvious thing with numeric arguments, but are extended to other types as well.

@@ -283,7 +283,7 @@ 'b'"abacba" ⟨ 1 0 1 1 0 1 ⟩ -

Pervasion

+

Pervasion

Arithmetic primitives act as though they are given depth 0, so that with array arguments they treat each atom independently. While the examples above use only numbers or lists of them, arithmetic applies to nested and high-rank arrays just as easily.

↗️
    × ˘¯8,¯9⟨⟨2,0,4,5
 ┌─                 
-- 
cgit v1.2.3