Java sqr sqrt(double a)

Here you can find the source of sqrt(double a)

Description

Returns the correctly rounded positive square root of a double value.

License

Open Source License

Parameter

Parameter Description
a a value

Return

the positive square root of a . If the argument is NaN or less than zero, the result is NaN

Declaration

public static double sqrt(double a) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  w  ww. j  a va2s  .  c o m
     * Returns the correctly rounded positive square root of a {@code double}
     * value. Special cases:
     * <ul><li>If the argument is NaN or less than zero, then the result is NaN.
     * <li>If the argument is positive infinity, then the result is positive
     * infinity.
     * <li>If the argument is positive zero or negative zero, then the result is
     * the same as the argument.</ul>
     * Otherwise, the result is the {@code double} value closest to the true
     * mathematical square root of the argument value.
     *
     * @param a a value
     * @return the positive square root of {@code a}. If the argument is NaN or
     * less than zero, the result is NaN
     */
    public static double sqrt(double a) {
        return Math.sqrt(a);
    }
}

Related

  1. sqr(float x)
  2. sqr(int V)
  3. sqr(int x)
  4. sqr(int x)
  5. sqRightFunction(int databaseType, String expr, int length)
  6. sqrt(double d)
  7. sqrt(double n)
  8. sqrt(double value)
  9. sqrt(double value)