Difference between revisions of "Pyth"

From WikiManual
Jump to: navigation, search
m (style + find x)
(Example:)
Line 14: Line 14:
 
  3 4 pyth
 
  3 4 pyth
  
would place 5 on the stack as per + = . It basically does
+
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>
 
 
[[Image:Findx.jpg]]
 

Revision as of 18:29, 25 June 2010

Advanced Commands:

angle
dist
ceil
floor
sqr pow
pyth

The following commands are not supported in versions earlier 2.46:

anglecmp
root
logx
sin
cos

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 a^2+b^2=c^2. It basically does

3 3 mult 4 4 mult add sqr

c = \sqrt{ a^2 + b^2 }