Half-interval search algorithm
function FindInterval extends Modelica.Icons.Function; input Real x "input"; input Real[:] breaks "grid points defining the intervals"; output Integer i "found interval number"; output Integer error = 0 "1=did not find interval"; end FindInterval;