C# 클래스 Lucene.Net.Util.MathUtil

Math static utility methods.
파일 보기 프로젝트 열기: apache/lucenenet

공개 메소드들

메소드 설명
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