cal error for finite diff