Built-In Functions

Built-In Functions

Top  Previous  Next

For including in any expression or constraint, Gx has the following common functions available:

Trig

  • sin()
  • arcsin()
  • sinh()
  • cos()
  • arccos()
  • cosh()
  • tan()
  • arctan()
  • tanh()

Math

  • sqrt() - same as sqrt 
  • abs() - same as abs 
  • signum(x) - finds the sign of a number:

= -1 if x < 0

   0 if x = 0

   1 if x > 0

  • exp(x) - the exponential function; you must use exp, not e, e is just a variable name
  • log() or ln() - both mean the natural log
  • piecewise({expression1, domain1},{expression2,domain2}...) - the function is evaluated in the order written
  • diff(expression, variable)
  • integrate(expression, variable)
  • sum(expression, variable = start, end)
  • pi - same as pi symbol  in the Symbols toolbox

Boolean

AND

OR

NOT

<

<=

>

>=