Class MathFunctions

java.lang.Object
it.unimi.di.prog2.s05.MathFunctions

public class MathFunctions extends Object
Utility class for computing mathematical functions.
  • Constructor Details

    • MathFunctions

      private MathFunctions()
      .
  • Method Details

    • sqrt

      public static double sqrt(double x)
      Extracts (if possible) the square root of the given number.
      • Requires: \( x \geq 0 \).
      • Modifies: nothing.
      • Effects: returns \( y : | y^2 - x | < 10^{-3} \).