-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(rules): better multiplicative inverse docs
- Loading branch information
1 parent
9663bba
commit 3fa8012
Showing
4 changed files
with
41 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
The `Multiplicative Inverse` rule converts division operations into multiplication by the reciprocal. This transformation can simplify the structure of mathematical expressions and prepare them for further simplification. | ||
|
||
This rule is expressed with the equation `a / b = a * (1 / b)` | ||
|
||
**Convert Division to Multiplication by Reciprocal** | ||
|
||
This handles the `a / b` conversion to `a * (1 / b)`. | ||
|
||
**Handle Division by a Negative Denominator** | ||
|
||
When the denominator is negative, the rule handles it by negating the numerator and converting the division into multiplication by the positive reciprocal of the denominator. | ||
|
||
This handles the `4 / -(2 + 3)` conversion to `4 * -1 / (2 + 3)` | ||
|
||
### Examples | ||
|
||
`rule_tests:multiplicative_inverse` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters