Documentation of 'Catalano.Math.Approximation' Java class
Approximation
Catalano.Math

Class Approximation



  • public final class Approximation
    extends java.lang.Object
    Calculate approximations for common math operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int abs(int x)
      Calculate absolute number.
      static long abs(long x)
      Calculate absolute number.
      static double atan2(double y, double x)
      Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
      static double Highprecision_Exp(double x)
      Calculate Exp.
      static double Highprecision_Pow(double x, double y)
      Calculate Pow.
      static double Highprecision_Sin(double x)
      Calculate Sin using Quadratic curve.
      static double Lowprecision_Log(double x)
      Calculate Pow.
      static double Lowprecision_Pow(double x, double y)
      Calculate Pow.
      static double Lowprecision_Sin(double x)
      Calculate Sin using Quadratic curve.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • abs

        public static int abs(int x)
        Calculate absolute number.
        Parameters:
        x - Number.
        Returns:
        Abs(x).
      • abs

        public static long abs(long x)
        Calculate absolute number.
        Parameters:
        x - Number.
        Returns:
        Abs(x).
      • Highprecision_Pow

        public static double Highprecision_Pow(double x,
                                               double y)
        Calculate Pow. The pow is calculate following the formula: Formula: Exp(y * Log(x))
        Parameters:
        x - The base.
        y - The exponent.
        Returns:
      • Lowprecision_Pow

        public static double Lowprecision_Pow(double x,
                                              double y)
        Calculate Pow. The pow is calculate following the formula: Formula: Highprecision_Exp(y * Log(x))
        Parameters:
        x - The base.
        y - The exponent.
        Returns:
      • Highprecision_Exp

        public static double Highprecision_Exp(double x)
        Calculate Exp. Exp by Taylor series (9).
        Parameters:
        x - Value.
        Returns:
        Exponential.
      • Lowprecision_Log

        public static double Lowprecision_Log(double x)
        Calculate Pow. The exp is calculate following the formula: 6*(x-1) / (x + 1 + 4*(Sqrt(x)));
        Parameters:
        x - Value.
        Returns:
      • Lowprecision_Sin

        public static double Lowprecision_Sin(double x)
        Calculate Sin using Quadratic curve.
        Parameters:
        x - An angle, in radians.
        Returns:
        Result.
      • Highprecision_Sin

        public static double Highprecision_Sin(double x)
        Calculate Sin using Quadratic curve.
        Parameters:
        x - An angle, in radians.
        Returns:
        Result.
      • atan2

        public static double atan2(double y,
                                   double x)
        Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta). This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.
        Parameters:
        y - Y axis coordinate.
        x - X axis coordinate.
        Returns:
        The theta component of the point (r, theta) in polar coordinates that corresponds to the point (x, y) in Cartesian coordinates.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.