Findpeak: using functions from libmath_func