I suppose the derivative of Math.Special.erf should be defined, like: annotation(derivative=derf);
and implementing the derivative;
function derf "Derivative of error function"
input Real u;
input Real deru;
output Real y;
algorithm
y:=2/sqrt(Modelica.Constants.pi)*exp(-u^2)*deru;
annotation(Inline=true);
end derf;
Usefull at least when a tool tries to differentiate for index reduction.
Additonally, the inverse-annotation (erfInv) is missing.
Same remarks for erfc and erfcInv.
I suppose the derivative of Math.Special.erf should be defined, like:
annotation(derivative=derf);and implementing the derivative;
function derf "Derivative of error function"input Real u;input Real deru;output Real y;algorithmy:=2/sqrt(Modelica.Constants.pi)*exp(-u^2)*deru;annotation(Inline=true);end derf;Usefull at least when a tool tries to differentiate for index reduction.
Additonally, the inverse-annotation (erfInv) is missing.
Same remarks for erfc and erfcInv.