Java java.lang Math Calculation

Java examples for java.lang:Math Calculation

Description

Click the following links for the tutorial for java.lang and Math Calculation.

  1. Returns the natural logarithm of n!.
  2. Returns the natural logarithm (base e) of a double value.
  3. Returns the base 2 logarithm of a double value.
  4. Returns the base 10 logarithm of a double value.
  5. Computes an inverse logarithmic interpolation, returning an interpolation fraction.
  6. Computes a logarithmic interpolation between two values.
  7. Fast way to calculate the log2(x).
  8. Returns natural logarithm of Gamma function of x Algorithm is from Numerical recipes 6.1


  9. Calculates the natural logarithm of a number
  10. Computes log2 (ceil (a)).
  11. log Gamma
  12. Returns the natural log of the Binomial Coefficient, "n choose k", the number of k-element subsets that can be selected from an n-element set.
  13. Given log(a) and log(b) calculate log(a + b) boils down to log( exp(log_a) + exp(log_b) ) but this might overflow, so we turn this into log([exp(log_a - log_c) + exp(log_b - log_c)]exp(log_c)) and we set log_c == max(log_a,log_b) and so it becomes: LARGE + log(1 + exp(SMALL - LARGE)) == LARGE + log(1 + SMALL) ~= large the whole idea being to avoid an overflow (exp(LARGE) == VERY LARGE == overflow)
  14. Compute -log of a binomial of form p^n*(1-p)^(N-n)binomial(N,n).
  15. turn a log probability into Phred score
  16. Compute an approximation to the natural logarithm.


  17. Compute logFactorial(N).
  18. Returns the common (base 10) logarithm of a double.
  19. Returns the logarithm of the Beta function.
  20. Returns the logarithm of the Gamma function of a double.
  21. Gets the gaussian pdf value log.
  22. Calculates the area of a parallelogram.
  23. Computes the weighted average of scores: -> log( w0 * exp(score[0]) + w1 exp(score[1]) + w1 * exp(score[2]) + ..
  24. Computes the logarithm of the given value to the base of 2, rounded down.
  25. Computes the logarithm of the given value to the base of 2.
  26. Compute the natural logarithm of x to a given scale, x > 0.
  27. Computes the intersection between two lines.
  28. Computes an inverse linear interpolation, returning an interpolation fraction.
  29. Computes the percent difference between two non-negative numbers.
  30. Computes (N choose K), the number of ways to select K different elements from a set of size N.
  31. Computes the floored division dividend/divisor which is useful when dividing potentially negative numbers into bins.
  32. Computes a linear interpolation between two values.
  33. Computes the factorial of some integer value.
  34. Computes the elegant pairing function for two non-negative BigInteger values.
  35. Computes the elegant pairing function for a given list of non-negative BigInteger values.
  36. Computes the binomial coefficient (number of unique ways to choose k elements from a set of n elements) over BigIntegers.
  37. Computes the binomial coefficient (number of unique ways to choose k elements from a set of n elements) by converting arguments from type long to type BigInteger.
  38. Computes a random BigInteger that is less than the upper bound BigInteger provided to the method.
  39. Computes the GCD (greatest common divisor) of a and b.
  40. Computes the LCM (least common multiple) of a and b.
  41. Computes the integral of the piecewise linear function through the given points (i, y[i]) using the trapezoidal method.
  42. Computes a fast approximation to Math.pow(a, b).
  43. Computes the Greatest Common Divisor of integers p and q.
  44. Compute an approximately geometric distribution on n items with decay parameter p.
  45. compute Normal on javafx.geometry.Point3D
  46. Computes the set mean.
  47. Compute the weighted arithmetic mean
  48. Compute the weighted geometric mean.
  49. Compute e^x to a given scale.
  50. Gets the computed machine precision.
  51. Compute the mean along the given column
  52. Private method to compute the determinant recursively.
  53. next Power Of Two
  54. Determines if value is powered by two.
  55. Given a number, round up to the nearest power of ten times 1, 2, or 5.
  56. is Power Of 2
  57. next Power Of 2
  58. previous Power Of 2
  59. power Of Two
  60. This function returns an approximated value of sin using the taylor approximation of power 5.
  61. Determines if nNum is a power of 2.
  62. ensure Power Of 2
  63. is Power Of Two
  64. raise To Power In Precision
  65. Rounds down the value to the nearest lower power^2 value.
  66. Returns the next power of 2 superior to n.
  67. Get the smallest power of 2 > x.
  68. Get the smallest long which is a power of 2 and > x.
  69. Closest power of two above.
  70. nearest Power Of Two
  71. Decrements the given number down to the closest power of two.
  72. Calculates the monthly payment for a loan of a given amount and with a given interest rate.
  73. Calculate the sphericity of a particle (Laurent formula)
  74. Calculate the sphericity of a particle (Mathilde formula)
  75. Calculate the sphericity of a particle (Wikipedia formula)
  76. Calculates e^x
  77. Calculates e^x, faster but less accurate than MathUtil#exp(double)
  78. Calculates a^b
  79. Calculate two number's greatest common divisor.
  80. calculate Smooth Rotation
  81. Calculates ln(ex - 1).
  82. Calculate the order of magnitude of a number (float by now)
  83. Calculates the remainder based on #floorDivide(int,int) .
  84. Calculates the number of multicombinations of n elements in sets of k-sized bags.
  85. Calculate the covariance of two sets of data.
  86. Calculates the binomial coefficient C(n,k).
  87. Calculates the multinomial coefficient.