compileFunction1
fun compileFunction1(expression: String, parameter0: String, constants: Map<String, Double> = mapOf(), functions: FunctionExtensions = FunctionExtensions.EMPTY, error: (Double) -> Double = { 0.0 }): (Double) -> Double(source)
Compile a (Double)->Double function from an expression string
Parameters
expression
the expression string to be compiled
parameter0
the name of the first parameter
constants
a map of named constant values that can be referred from the expression
functions
a map of named functions that can be invoked from the expression
error
in case the expression fails to compile or evaluate, this function is invoked instead