Function Analyzer
Version 1.x for All Windows Platforms
Function Analyzer
  Function Analyzer is a program that permits you to see the graph of a function like
f(x)=<x expression>.

In this picture you can see the graph of this function:
f(x)=1/Cos(x)/(1/X)

The usage is very simple:
- Write the function expression in the bottom combo box or choose and modify a predefined one (see the list of recognized keywords).
- Press the 'Analyze' button to show the graph.

After this you can:
- Move the X,Y axis, zoom in/out, increase/decrease precision (more precision you use more time the program take to process the expression).

In order to parse complex expressions I've created a parser using
GOLD Parser Builder by Devin Cook giving it a BNF rule grammar created by me ;-).
After this, the GOLD Parser Builder creates a skeleton program I've used to parse expressions.
The BNF sintax used is present in the program installation folder (expression.grm).
Available Tools
Function Analyzer 1.0
Freeware

Win 32 Setup (1200 Kb)
Function Analyzer can parse a mathematic expression recognizing valid the following words:

- operators like:
   - + - * /
   - ^ (power)
- numbers like:
   - integer          ex. 100
   - float            ex. 100.52 (use the . for decimals)
   - hexadecimal      ex. &hFF (255)
   - octal            ex. &o22
- x (is the variable)
- e (is ~ 2.718282)
- cos       ( <Expr> )
-> the cosine of an angle
- sin       ( <Expr> ) -> the sine of an angle
- tan       ( <Expr> ) -> the tangent of an angle
- atn       ( <Expr> ) -> the arctangent of a number
- log       ( <Expr> ) -> natural logarithm of a number
- sgn       ( <Expr> ) -> the sign of a number
- sqr       ( <Expr> ) -> the square root of a number
- exp       ( <Expr> ) -> e (the base of natural logarithms) raised to a power
- sec       ( <Expr> ) -> Secant         = 1 / Cos(X)
- cosec     ( <Expr> ) -> Cosecant       = 1 / Sin(X)
- cotan     ( <Expr> ) -> Cotangent      = 1 / Tan(X)
- arcsin    ( <Expr> ) -> Inverse Sine   = Atn(X / Sqr(-X * X + 1))
- arccos    ( <Expr> ) -> Inverse Cosine = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
- arcsec    ( <Expr> ) -> Inverse Secant = Atn(X / Sqr(X * X - 1)) + Sgn((X) -1) * (2 * Atn(1))
- arccosec  ( <Expr> ) -> Inverse Cosecant     = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
- arccotan  ( <Expr> ) -> Inverse Cotangent    = Atn(X) + 2 * Atn(1)
- hsin      ( <Expr> ) -> Hyperbolic Sine      = (Exp(X) - Exp(-X)) / 2  
- hcos      ( <Expr> ) -> Hyperbolic Cosine    = (Exp(X) + Exp(-X)) / 2
- htan      ( <Expr> ) -> Hyperbolic Tangent   = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
- hsec      ( <Expr> ) -> Hyperbolic Secant    = 2 / (Exp(X) + Exp(-X))
- hcosec    ( <Expr> ) -> Hyperbolic Cosecant  = 2 / (Exp(X) - Exp(-X))
- hcotan    ( <Expr> ) -> Hyperbolic Cotangent = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
- harcsin   ( <Expr> ) -> Inverse Hyperbolic Sine      = Log(X + Sqr(X * X + 1))
- harccos   ( <Expr> ) -> Inverse Hyperbolic Cosine    = Log(X + Sqr(X * X - 1))
- harctan   ( <Expr> ) -> Inverse Hyperbolic Tangent   = Log((1 + X) / (1 - X)) / 2
- harcsec   ( <Expr> ) -> Inverse Hyperbolic Secant    = Log((Sqr(-X * X + 1) + 1) / X)
- harccosec ( <Expr> ) -> Inverse Hyperbolic Cosecant  = Log((Sgn(X) * Sqr(X * X + 1) +1) / X)
- harccotan ( <Expr> ) -> Inverse Hyperbolic Cotangent = Log((X + 1) / (X - 1)) / 2
- log2      ( <Expr> ) -> Base 2 logarithm of a number
- log8      ( <Expr> ) -> Base 8 logarithm of a number
- log10     ( <Expr> ) -> Base 10 logarithm of a number
- log16     ( <Expr> ) -> Base 16 logarithm of a number


Obviously an expression can be very complex.

Some examples:

f(x)=harccosec(log(x)*cos(x+1*2))
f(x)=Atn(X / Sqr(X * X - 1)) + Sgn((X) -1) * (2 * Atn(1)) <--this is the arcsec equation
f(x)=
x^2


Operators precedence:

Works as you expect; first Function Analyzer executes unary expressions (- +), then
binary in this order (^, * /, + -), then all others above functions.

So the expression f(x)=3+2*6 gives 15 and not 30.
You can apply '()' to this expression so  f(x)=(3+2)*6 gives 30
Copyright © 2002-26 by Lorenzi Davide. All rights reserved.
Site built with Dynamic HTML Editor