Automatic checking example - Midpoint