Class SquareRoot

  • All Implemented Interfaces:
    PostfixMathCommandI, RealUnaryFunction, java.io.Serializable

    public class SquareRoot
    extends UnaryFunction
    implements RealUnaryFunction
    Square root function. Positive Number arguments returns double results. Negative Number arguments return Complex results by default or Double.NaN if the strict flag is set in constructor. Complex arguments return Complex results.
    See Also:
    Serialized Form
    • Constructor Detail

      • SquareRoot

        public SquareRoot()
        Standard constructor, Complex results for negative Number arguments.
      • SquareRoot

        public SquareRoot​(boolean strict)
        Controls behaviour for negative real arguments.
        Parameters:
        strict - true then returns NaN for negative real arguments, false to return complex results for negative real arguments.