calc_epsilon (float x, float y, float z)
{
  dec_x (float x, float delta_x) 
  {
    float res = x - delta_x;

    if (res < 0) return 0;
    else return res;
  }

  ...

  return z * sqrt (dec_x), { dec_x = dec_x (x, delta_x) };
}