public class MathTest2 {
    public static void main(String[] args) {
        final double TOLERANCE = 0.00000000001;
        
        // run test 1
        double x = 45;
        
        try {
            if (Math.abs((Math.sqrt(x) * Math.sqrt(x)) - x) > TOLERANCE)
                System.out.println("Error:  failed sqrt test 1 for " + x);
        } catch (Exception e) { 
            System.out.println("Error:  failed test 1 because " + e);
        }
    }
}