From 89ffbec6ac981a81b9e78e6555124f51fdd78df2 Mon Sep 17 00:00:00 2001 From: alexdikelsky Date: Fri, 24 Sep 2021 07:54:23 -0500 Subject: Add reference implementations for gcd and lcm to logic.md --- doc/logic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/logic.md b/doc/logic.md index 8e7f935a..f9bdc896 100644 --- a/doc/logic.md +++ b/doc/logic.md @@ -36,7 +36,7 @@ As with logical And and Or, any value and 0 is 0, while any value or 1 is 1. The ## Why not GCD and LCM? -The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement, which allows the programmer to control the details, and also add functionality such as the extended GCD. +The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement (reference implementations for [gcd](https://mlochbaum.github.io/bqncrate/?q=gcd) and [lcm](https://mlochbaum.github.io/bqncrate/?q=lcm) on [bqncrate](https://mlochbaum.github.io/bqncrate)), which allows the programmer to control the details, and also add functionality such as the extended GCD. A secondary reason is that the GCD falls short as an extension of Or, because its identity value 0 is not total. `0∨x`, for a real number `x`, is actually equal to `|x` and not `x`: for example, `0∨¯2` is `2` in APL. This means the identity `0∨x ←→ x` isn't reliable in APL. -- cgit v1.2.3 From ffd757232566f90d33b1903ca910da53f36bcd2a Mon Sep 17 00:00:00 2001 From: alexdikelsky Date: Fri, 24 Sep 2021 07:56:30 -0500 Subject: Fix previous commit's grammer --- doc/logic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/logic.md b/doc/logic.md index f9bdc896..360a651d 100644 --- a/doc/logic.md +++ b/doc/logic.md @@ -36,7 +36,7 @@ As with logical And and Or, any value and 0 is 0, while any value or 1 is 1. The ## Why not GCD and LCM? -The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement (reference implementations for [gcd](https://mlochbaum.github.io/bqncrate/?q=gcd) and [lcm](https://mlochbaum.github.io/bqncrate/?q=lcm) on [bqncrate](https://mlochbaum.github.io/bqncrate)), which allows the programmer to control the details, and also add functionality such as the extended GCD. +The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement (reference implementations for [gcd](https://mlochbaum.github.io/bqncrate/?q=gcd) and [lcm](https://mlochbaum.github.io/bqncrate/?q=lcm) are available on [bqncrate](https://mlochbaum.github.io/bqncrate)), which allows the programmer to control the details, and also add functionality such as the extended GCD. A secondary reason is that the GCD falls short as an extension of Or, because its identity value 0 is not total. `0∨x`, for a real number `x`, is actually equal to `|x` and not `x`: for example, `0∨¯2` is `2` in APL. This means the identity `0∨x ←→ x` isn't reliable in APL. -- cgit v1.2.3 From 69b6135c87140cf2b57b18dac53820dd02e2605d Mon Sep 17 00:00:00 2001 From: alexdikelsky Date: Fri, 24 Sep 2021 08:03:21 -0500 Subject: Move sentence to the end --- doc/logic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/logic.md b/doc/logic.md index 360a651d..a72cf8e4 100644 --- a/doc/logic.md +++ b/doc/logic.md @@ -36,7 +36,7 @@ As with logical And and Or, any value and 0 is 0, while any value or 1 is 1. The ## Why not GCD and LCM? -The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement (reference implementations for [gcd](https://mlochbaum.github.io/bqncrate/?q=gcd) and [lcm](https://mlochbaum.github.io/bqncrate/?q=lcm) are available on [bqncrate](https://mlochbaum.github.io/bqncrate)), which allows the programmer to control the details, and also add functionality such as the extended GCD. +The main reason for omitting these functions is that they are complicated and, when applied to real or complex numbers, require a significant number of design decisions where there is no obvious choice (for example, whether to use comparison tolerance). On the other hand, these functions are fairly easy to implement, which allows the programmer to control the details, and also add functionality such as the extended GCD. Reference implementations for gcd and lcm are available on [bqncrate](https://mlochbaum.github.io/bqncrate) ([gcd](https://mlochbaum.github.io/bqncrate/?q=gcd), [lcm](https://mlochbaum.github.io/bqncrate/?q=lcm)). A secondary reason is that the GCD falls short as an extension of Or, because its identity value 0 is not total. `0∨x`, for a real number `x`, is actually equal to `|x` and not `x`: for example, `0∨¯2` is `2` in APL. This means the identity `0∨x ←→ x` isn't reliable in APL. -- cgit v1.2.3