functionregSquare
Anti-symmetric square approximation with non-zero derivative in the origin
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function approximates x^2*sgn(x), such that the derivative is non-zero in x=0.
| Function | Approximation | Range |
|---|---|---|
| y = regSquare(x) | y ~= x^2*sgn(x) | abs(x) >>delta |
| y = regSquare(x) | y ~= x*delta | abs(x) << delta |
With the default value of delta=0.01, the difference between x^2 and regSquare(x) is 41% around x=0.01, 0.4% around x=0.1 and 0.005% around x=1.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | ||
| Real | delta | 0.01 | Range of significant deviation from x^2*sgn(x) |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y |
Revisions
- 15 Mar 2005
by Francesco Casella:
Created.