rpn(1): fixed exponentiation #57

Closed
emma wants to merge 0 commits from rpn-fix-exp into main
Owner
No description provided.
emma added the
bug
label 2024-02-13 16:58:31 -07:00
emma added 1 commit 2024-02-13 16:58:32 -07:00
emma requested review from trinity 2024-02-13 16:59:53 -07:00
Owner

I figured exponentiating (is that the word?) x to the power of y (Python: x ** y) would be more intuitive for existing RPN users (because this matches the operation on HP and Elektronika calculators). It looks like the powf method is used like base.powf(exponent). Wouldn't y.powf(x) be bringing y to the power of x?

I figured exponentiating (is that the word?) `x` to the power of `y` (Python: `x ** y`) would be more intuitive for existing RPN users (because this matches the operation on HP and Elektronika calculators). It looks like [the `powf` method](https://doc.rust-lang.org/src/std/f32.rs.html#364) is used like `base.powf(exponent)`. Wouldn't `y.powf(x)` be bringing `y` to the power of `x`?
Owner

Never mind, I looked it up and the HP 41C (basically the gold standard in terms of RPN calculators) is indeed y**x. It looks like Elektronika (which I was referencing, particularly the MK-61 keypad) is an outlier in this regard.

Never mind, I looked it up and the HP 41C (basically the gold standard in terms of RPN calculators) is indeed y**x. It looks like Elektronika (which I was referencing, particularly the MK-61 keypad) is an outlier in this regard.
trinity approved these changes 2024-02-14 22:34:34 -07:00
emma closed this pull request 2024-02-14 23:07:29 -07:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#57
No description provided.