C# Класс Lucene.Net.Util.MathUtil

Math static utility methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
Acosh ( double a ) : double

Calculates inverse hyperbolic cosine of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is +1, then the result is a zero.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is less than 1, then the result is NaN.

Asinh ( double a ) : double

Calculates inverse hyperbolic sine of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.
  • If the argument is infinite, then the result is infinity with the same sign as the argument.

Atanh ( double a ) : double

Calculates inverse hyperbolic tangent of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.
  • If the argument is +1, then the result is positive infinity.
  • If the argument is -1, then the result is negative infinity.
  • If the argument's absolute value is greater than 1, then the result is NaN.

Gcd ( long a, long b ) : long

Return the greatest common divisor of a and b, consistently with BigInteger#gcd(BigInteger).

NOTE: A greatest common divisor must be positive, but 2^64 cannot be expressed as a long although it is the GCD of Long#MIN_VALUE and 0 and the GCD of Long#MIN_VALUE and Long#MIN_VALUE. So in these 2 cases, and only them, this method will return Long#MIN_VALUE.

Log ( double @base, double x ) : double

Calculates logarithm in a given base with doubles.

Log ( long x, int @base ) : int

Returns {@code x <= 0 ? 0 : Math.floor(Math.log(x) / Math.log(base))}

Приватные методы

Метод Описание
MathUtil ( ) : Lucene.Net.Support

Описание методов

Acosh() публичный статический Метод

Calculates inverse hyperbolic cosine of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is +1, then the result is a zero.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is less than 1, then the result is NaN.
public static Acosh ( double a ) : double
a double
Результат double

Asinh() публичный статический Метод

Calculates inverse hyperbolic sine of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.
  • If the argument is infinite, then the result is infinity with the same sign as the argument.
public static Asinh ( double a ) : double
a double
Результат double

Atanh() публичный статический Метод

Calculates inverse hyperbolic tangent of a {@code double} value.

Special cases:

  • If the argument is NaN, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.
  • If the argument is +1, then the result is positive infinity.
  • If the argument is -1, then the result is negative infinity.
  • If the argument's absolute value is greater than 1, then the result is NaN.
public static Atanh ( double a ) : double
a double
Результат double

Gcd() публичный статический Метод

Return the greatest common divisor of a and b, consistently with BigInteger#gcd(BigInteger).

NOTE: A greatest common divisor must be positive, but 2^64 cannot be expressed as a long although it is the GCD of Long#MIN_VALUE and 0 and the GCD of Long#MIN_VALUE and Long#MIN_VALUE. So in these 2 cases, and only them, this method will return Long#MIN_VALUE.

public static Gcd ( long a, long b ) : long
a long
b long
Результат long

Log() публичный статический Метод

Calculates logarithm in a given base with doubles.
public static Log ( double @base, double x ) : double
@base double
x double
Результат double

Log() публичный статический Метод

Returns {@code x <= 0 ? 0 : Math.floor(Math.log(x) / Math.log(base))}
public static Log ( long x, int @base ) : int
x long
@base int
Результат int