Difference between revisions of "Pyth"
From WikiManual
m (example) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | __notoc__ | ||
+ | {| align="right" | ||
+ | |- | ||
+ | | | ||
+ | |} | ||
+ | ==[[Operator]]s:== | ||
+ | |||
Pythagorous Sum Operator '''BINARY''' | Pythagorous Sum Operator '''BINARY''' | ||
Returns the hypotenuse formed by the legs of a triangle with lengths the two top values of the stack. | Returns the hypotenuse formed by the legs of a triangle with lengths the two top values of the stack. | ||
− | |||
− | |||
− | |||
==Example:== | ==Example:== | ||
Line 10: | Line 14: | ||
3 4 pyth | 3 4 pyth | ||
− | would place 5 on the stack as per | + | would place 5 on the stack as per <math>a^2+b^2=c^2</math>. It basically does |
3 3 mult 4 4 mult add sqr | 3 3 mult 4 4 mult add sqr | ||
− | c= | + | <math>c = \sqrt{ a^2 + b^2 }</math> |
+ | |||
+ | {{Advanced Commands}} |
Latest revision as of 11:35, 27 June 2014
Operators:
Pythagorous Sum Operator BINARY
Returns the hypotenuse formed by the legs of a triangle with lengths the two top values of the stack.
Example:
3 4 pyth
would place 5 on the stack as per . It basically does
3 3 mult 4 4 mult add sqr
Advanced Commands:The following commands are not supported in versions earlier 2.46: |