aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-08-21 21:42:45 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-08-21 21:42:45 -0400
commit850d173aef48f907ce071608ee4469fb11f0b364 (patch)
tree7b6cdff698867fbccf2a6a5fb9dc136b70af91f0 /spec
parent12507e7eaad4fc806534644fae4c69172564d349 (diff)
Point out that defining √⁼ to be ט gives it an extended domain
Diffstat (limited to 'spec')
-rw-r--r--spec/inferred.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/inferred.md b/spec/inferred.md
index 680f75b9..0be0cc6c 100644
--- a/spec/inferred.md
+++ b/spec/inferred.md
@@ -62,7 +62,7 @@ Fill elements of iteration modifiers such as `¨⌜` are not specified. It is re
The Undo 1-modifier `⁼`, given an operand `𝔽` and argument `𝕩`, and possibly a left argument `𝕨`, finds a value `y` such that `𝕩≡𝕨𝔽y`, that is, an element of the pre-image of `𝕩` under `𝔽` or `𝕨𝔽⊢`. Thus it satisfies the constraint `𝕩 ≡ 𝕨𝔽𝕨𝔽⁼𝕩` (`𝕨𝔽⁼⊢` is a *right inverse* of `𝕨𝔽⊢`) provided `𝔽⁼` and `𝔽` both complete without error. `𝔽⁼` should of course give an error if no inverse element exists, and can also fail if no inverse can be found. It is also preferred for `𝔽⁼` to give an error if there are many choices of inverse with no clear way to choose one of them: for example, `0‿0⍉m` returns the diagonal of matrix `m`; `0‿0⍉⁼2‿3` requires values to be chosen for the off-diagonal elements in its result. It is better to give an error, encouraging the programmer to use a fully-specified approach like `2‿3⌾(0‿0⊸⍉)` applied to a matrix of initial elements, than to return a result that could be very different from other implementations.
-If a value `𝕩` isn't in the range of `𝔽`, then no result satisfies the rule for `𝔽⁼𝕩`. As `𝔽⁼𝕩` would then always give an error by the above rules, a BQN implementation with extensions could define it in any way. However, two such extensions are specified: `F⁼⁼` and `F⍟(-n)⁼` are extended to the full domain of `F` and `/⁼` to any list of natural numbers, as noted below.
+If a value `𝕩` isn't in the range of `𝔽`, then no result satisfies the rule for `𝔽⁼𝕩`. As `𝔽⁼𝕩` would then always give an error by the above rules, a BQN implementation with extensions could define it in any way. However, a few such extensions are specified: `√⁼` is defined on all numbers, and `F⁼⁼` and `F⍟(-n)⁼` are extended to the full domain of `F` and `/⁼` to any list of natural numbers, as noted below.
When working with limited-precision numbers, it may be difficult or impossible to exactly invert the operand function. Instead, it is generally acceptable to perform a computation that, if done with unlimited precision, would exactly invert `𝔽` computed with unlimited precision. This principle is the basis for the numeric inverses specified below. It is also acceptable to find an inverse by numeric methods, provided that the error in the inverse value found relative to an unlimited-precision inverse can be kept close to the inherent error in the implementation's number format.