Math inverse
See original GitHub issueThe negate
function makes it possible to obtain the additive inverse of a number. How about adding a similar function, but for multiplicative inverse?
// inverse :: Number -> Number
inverse(10); //=> 0.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Inverse - Math is Fun
Inverse. Inverse means the opposite in effect. The reverse of. It is a general idea in mathematics and has many meanings. Here are...
Read more >Inverse Function – Definition With Examples - SplashLearn
In mathematics, the word inverse refers to the opposite of another operation. Let us look at some examples to understand the meaning of...
Read more >Inverse function - Wikipedia
In mathematics, the inverse function of a function f is a function that undoes the operation of f. The inverse of f exists...
Read more >Finding inverse functions (article) - Khan Academy
Inverse functions, in the most general sense, are functions that "reverse" each other. For example, if f f ff takes a a aa...
Read more >Inverse Operations in Math: Definition & Examples
The four main mathematical operations are addition, subtraction, multiplication, division. The inverse of addition is subtraction and vice versa ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Both are inverses for different group operations. First for the composition of invertible functions, and second for the multiplication.
Which becomes a problem if
inverse
is used without clearly specifying the operation.reciprocal
would be unambiguous.That is because JS forcefully extends the division breaking the maths law:
(1/0)*0 != 1
Still formally(a/b)*b == a
holds for all valid expressions, but we cannot expect it to hold for the invalid ones.That language is called maths 😉
in that case,
reciprocal = R.divide(1);