List of utility methods to do sqr
float | sqrt(float a) sqrt return (float) StrictMath.sqrt((double) a); |
float | sqrt(float f) sqrt return (float) Math.sqrt(f); |
int | sqrt(int n) sqrt int s = (n + 65536) >> 1; for (int i = 0; i < 8; i++) { s = (s + div(n, s)) >> 1; return s; |
int | sqrt(int val) sqrt int temp, g = 0, b = 0x8000, bshft = 15; do { if (val >= (temp = (((g << 1) + b) << bshft--))) { g += b; val -= temp; } while ((b >>= 1) > 0); return g; ... |
long | sqrt(long val) sqrt double epsilon = 1e-15; double estimate = val; while (Math.abs(estimate - val / estimate) > epsilon * estimate) { estimate = (val / estimate + estimate) / 2l; return (long) estimate; |
long | sqrt(long x) sqrt long y = 0; long b = (~Long.MAX_VALUE) >>> 1; while (b > 0) { if (x >= y + b) { x -= y + b; y >>= 1; y += b; } else { ... |
double | sqrt(Short a) Sqrt. return Math.sqrt(a.doubleValue());
|
short | sqrt(short value) sqrt return (short) Math.sqrt(value); |
float | sqrt2(float x) sqrt x = fastInverseSqrt(x); if (x > 0) { return 1.0f / x; } else { return 0; |
double | sqrt2sq(double x, double y) sqrtsq return sqrt(sq(x) + sq(y));
|