fix bug

if ( f( (a + b)/N ) = 0 ) then x:=(a + b)/N;