| Overview | Group | Tree | Graph | Index | Concepts |
This function creates a new constrained expression equal f(x). The arguments
f and invf must be pointers to functions of type IlcFloatFunction.
Those two functions must be inverses of one another, that is,
invf(f(x)) == x and f(invf(x)) == x for all x.
Those two functions must also be monotonically increasing.
IlcMonotonicIncreasingFloatExp does not verify whether f and
invf are inverses of one another. It does not verify whether they are monotonically
increasing either.
The effects of this function are reversible.
Examples:
Here's how to define IlcExponent and IlcLog
in terms of this function:
static IlcFloat CallFloatExponent(IlcFloat x) {
return (x > 709) ? 1e308 : exp(x);
}
static IlcFloat CallFloatLog(IlcFloat x) {
return (x <= 0) ? -1e308 : log(x);
}
IlcFloatExp IlcExponent(const IlcFloatExp var) {
return IlcMonotonicIncreasingFloatExp
(var, CallFloatExponent,CallFloatLog, ?IlcExponent?);
}
IlcFloatExp IlcLog(const IlcFloatExp var) {
return IlcMonotonicIncreasingFloatExp
(var, CallFloatLog,CallFloatExponent, ?IlcLog?);
}See Also:
IlcExponent, IlcFloatExp, IlcFloatFunction, IlcLog, IlcMonotonicDecreasingFloatExp, IlcPower, IlcSquare