Tuesday, January 1, 2013

Formulas

A simple calculator and function graph.

Supported operations: +, -, *, /, ^
Predefined variables: pi, e, i
Predefined functions:
  • ln(x)
  • sin(x)
  • cos(x)
  • tan(x)
  • asin(x)
  • acos(x)
  • atan(x)
  • atan(y,x)
  • sinh(x)
  • cosh(x)
  • tanh(x)
  • arsinh(x)
  • arcosh(x)
  • artanh(x)
  • fac(x)
  • min(x1,x2,x3,...)
  • max(x1,x2,x3,...)
  • abs(x)
Functions for complex numbers:
  • phi(c)
  • x(c)
  • y(c)

Lets you define variables:
a=30
b=40
c=(a^2+b^2)^0.5

and functions:
pyth(a,b)=(a^2+b^2)^0.5
pyth(30,40)


You may use hexadecimal, octal or binary numbers:
# hexadecimal
hex1=0x10
hex2=0h20

# binary
bin=0b1010

# octal
oct=0o3


Draw function graph with:
f(x)=3*sin(x)+x/5
:graph(f())


Draw polar function graph with:
flower(x)=5+cos(x*8)
:polar(flower())

Or specify the interval:
spiral(x)=x
:polar(spiral(),0,4pi,0.1)


Draw parameter graph with:
f(p)=5*sin(p)
g(p)=5*sin(p*10)

:param(f(),g(),-pi,pi,0.001)

All graphs have an additional parameter for the color in RGB:
:graph(sin(),0xff0000)

p(x)=3
:polar(p(),0x00ff00)

px(p)=sin(p)
py(p)=p
:param(px(),py(),-20,20,0.1,0x0000ff)


Find it embedded at: http://ssbssa.dyndns.org/formulas.html
Download at: http://ssbssa.dyndns.org

No comments:

Post a Comment