diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-24 10:53:26 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-24 10:53:26 -0500 |
| commit | 82fe2e9e68f9d68694aaa3181c28ad95bf486e25 (patch) | |
| tree | 9392bf1193f15f2a2f250f760abd2cdca886850b /doc | |
| parent | ac6ac58f2532ad972ef389347a66bf4b526f6444 (diff) | |
Clarifications
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/undo.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/undo.md b/doc/undo.md index 3dded26a..08099e8f 100644 --- a/doc/undo.md +++ b/doc/undo.md @@ -23,7 +23,7 @@ If `π½` can be inverted exactly, then Undo just does that. However, there are ΓΛ Β―3 ΓΛβΌ ΓΛ Β―3 # It's not the same! -Don't worry, this isn't 'nam. Undo doesn't always satisfy `π© β‘ π½βΌ π½ π©`, but it *does* obey `π© β‘ π½ π½βΌ π©`. That is, it gives one possible argument that could have been passed to `π½`, just not necessarily the one that actually was. BQN is conservative in how it uses this freedom, so that it won't for example make up new elements entirely to find an inverse. It's usually used when there's an obvious or standard way to pick which of the possible values should be returned. +Don't worry, this isn't 'nam. Undo doesn't always satisfy `π© β‘ π½βΌ π½ π©`, but it *does* obey `π© β‘ π½ π½βΌ π©`. That is, it gives one possible argument that could have been passed to `π½`, just not necessarily the one that actually was. BQN is conservative in how it uses this freedom, so that it won't for example make up new elements entirely to find an inverse: `1βΈβ` is one function that it could undo but won't. It's usually used when there's an obvious or standard way to pick which of the possible values should be returned. In a BQN with floating-point numbers, computations are approximate, so the inverse is allowed to be approximate as well (any error should still be very small though). @@ -35,7 +35,7 @@ For the full list, see [the specification](../spec/inferred.md#undo). An individ Arithmetic and simple combinators are usually invertible. A compound function that refers to its argument just once, like `6+β½ββ`, can typically be undone, but one that uses the argument in two different ways, such as `β’+β`, probably can't. -A few notable inverses are the [logarithm](arithmetic.md#basic-arithmetic) `ββΌ`, [un-Transpose](transpose.md) `ββΌ`, and [Indices inverse](replicate.md#inverse) `/βΌ`. [Enclose](enclose.md) inverse, `<βΌ`, is an alternative to [First](pick.md#first) that requires its argument to be a unit. +A few notable inverses are the [logarithm](arithmetic.md#basic-arithmetic) `ββΌ`, [un-Transpose](transpose.md) `ββΌ`, and [Indices inverse](replicate.md#inverse) `/βΌ`. [Enclose](enclose.md) inverse, `<βΌ`, is an alternative to [First](pick.md#first) that requires its argument to be a unit array. Structural functions like [Take](take.md) and [shifts](shift.md) that remove elements from `π©` can't be inverted, because given the result there's no way to know what the elements should be. However, there are two special cases that have inverses defined despite losing data: these are `β£βΌ` and `kβΌ` where `k` is a constant (a data type, or `kΛ`). For these, `π©` is required to [match](match.md) the always returned value `π¨` or `k`, and this value is also used for the resultβeven though any result would be valid, as these functions ignore `π©`. |
