java.lang.Object
uk.ac.manchester.tornado.api.math.TornadoMath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byteabs(byte a) static doubleabs(double a) static floatabs(float a) static intabs(int a) static longabs(long a) static shortabs(short a) static doubleacos(double a) static floatacos(float a) static doubleacosh(double x) static floatacosh(float x) static doubleasin(double a) static floatasin(float a) static doubleasinh(double x) static floatasinh(float x) static doubleatan(double value) static floatatan(float value) static doubleatan2(double a, double b) static floatatan2(float a, float b) static StringbitDiff(float[] a, float[] b) static doubleceil(double value) static floatceil(float value) static byteclamp(byte val, byte min, byte max) static doubleclamp(double val, double min, double max) static floatclamp(float val, float min, float max) static intclamp(int val, int min, int max) static longclamp(long val, long min, long max) static shortclamp(short val, short min, short max) static doublecos(double angle) In PTX, the cos operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.static floatcos(float angle) static Float16static Float2static Float4static Float8static doublecospi(double angle) In PTX, the cospi operation that accepts a double input is narrowed to f32, since the PTX cos instruction does not support f64 operands.static floatcospi(float angle) static doubleexp(double value) In PTX, the exp operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.static floatexp(float value) static doublefindULPDistance(double[] value, double[] expected) static floatfindULPDistance(float[] value, float[] expected) static doublefindULPDistance(DoubleArray value, DoubleArray expected) static floatfindULPDistance(FloatArray value, FloatArray expected) static floatfloatPI()static doublefloor(double f) static floatfloor(float f) static doublefract(double f) static floatfract(float f) static booleanisEqual(byte[] a, byte[] b) static booleanisEqual(double[] a, double[] b) static booleanisEqual(float[] a, float[] b) static booleanisEqual(int[] a, int[] b) static booleanisEqual(short[] a, short[] b) static booleanisEqual(DoubleArray a, DoubleArray b) static booleanisEqual(FloatArray a, FloatArray b) static booleanstatic booleanstatic booleanisEqualTol(float[] a, float[] b, float tol) static booleanisEqualULP(double[] value, double[] expected, double numULP) static booleanisEqualULP(float[] value, float[] expected, float numULP) static doublelog(double value) In PTX, the log operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.static floatlog(float value) static doublelog2(double value) In PTX, the log2 operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.static floatlog2(float value) static bytemax(byte a, byte b) static doublemax(double a, double b) static floatmax(float a, float b) static intmax(int a, int b) static longmax(long a, long b) static shortmax(short a, short b) static HalfFloatstatic bytemin(byte a, byte b) static doublemin(double a, double b) static floatmin(float a, float b) static intmin(int a, int b) static longmin(long a, long b) static shortmin(short a, short b) static HalfFloatstatic doublePI()static doublepow(double a, double b) static floatpow(float a, float b) static Float3rotate(Matrix4x4Float m, Float3 x) static doublesignum(double a) static floatsignum(float a) static doublesin(double angle) In PTX, the sin operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands.static floatsin(float angle) static Float16static Float2static Float4static Float8static doublesinpi(double angle) In PTX, the sinpi operation that accepts a double input is narrowed to f32, since the PTX sin instruction does not support f64 operands.static floatsinpi(float angle) static doublesqrt(double value) static floatsqrt(float value) static doubletan(double value) static floattan(float value) static doubletanh(double value) static floattanh(float value) static doubletoRadians(double angdeg) static floattoRadians(float angdeg)
-
Constructor Details
-
TornadoMath
public TornadoMath()
-
-
Method Details
-
min
public static float min(float a, float b) -
min
public static double min(double a, double b) -
min
public static long min(long a, long b) -
min
public static int min(int a, int b) -
min
public static short min(short a, short b) -
min
public static byte min(byte a, byte b) -
min
-
max
public static double max(double a, double b) -
max
public static float max(float a, float b) -
max
public static long max(long a, long b) -
max
public static int max(int a, int b) -
max
public static short max(short a, short b) -
max
public static byte max(byte a, byte b) -
max
-
abs
public static float abs(float a) -
abs
public static double abs(double a) -
abs
public static long abs(long a) -
abs
public static int abs(int a) -
abs
public static short abs(short a) -
abs
public static byte abs(byte a) -
exp
public static float exp(float value) -
exp
public static double exp(double value) In PTX, the exp operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands. -
sqrt
public static float sqrt(float value) -
sqrt
public static double sqrt(double value) -
clamp
public static long clamp(long val, long min, long max) -
clamp
public static int clamp(int val, int min, int max) -
clamp
public static short clamp(short val, short min, short max) -
clamp
public static byte clamp(byte val, byte min, byte max) -
clamp
public static float clamp(float val, float min, float max) -
clamp
public static double clamp(double val, double min, double max) -
floor
public static float floor(float f) -
floor
public static double floor(double f) -
fract
public static float fract(float f) -
fract
public static double fract(double f) -
cos
-
cos
-
cos
-
cos
-
sin
-
sin
-
sin
-
sin
-
isEqual
public static boolean isEqual(float[] a, float[] b) -
isEqual
-
isEqual
-
isEqual
-
isEqual
-
isEqual
public static boolean isEqual(double[] a, double[] b) -
isEqualULP
public static boolean isEqualULP(float[] value, float[] expected, float numULP) -
isEqualULP
public static boolean isEqualULP(double[] value, double[] expected, double numULP) -
findULPDistance
-
findULPDistance
-
findULPDistance
public static float findULPDistance(float[] value, float[] expected) -
findULPDistance
public static double findULPDistance(double[] value, double[] expected) -
isEqualTol
public static boolean isEqualTol(float[] a, float[] b, float tol) -
isEqual
public static boolean isEqual(int[] a, int[] b) -
isEqual
public static boolean isEqual(short[] a, short[] b) -
isEqual
public static boolean isEqual(byte[] a, byte[] b) -
bitDiff
-
log
public static float log(float value) -
log
public static double log(double value) In PTX, the log operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands. -
log2
public static float log2(float value) -
log2
public static double log2(double value) In PTX, the log2 operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands. -
atan
public static float atan(float value) -
atan
public static double atan(double value) -
tan
public static float tan(float value) -
tan
public static double tan(double value) -
tanh
public static float tanh(float value) -
tanh
public static double tanh(double value) -
floatPI
public static float floatPI() -
PI
public static double PI() -
pow
public static float pow(float a, float b) -
pow
public static double pow(double a, double b) -
atan2
public static float atan2(float a, float b) -
atan2
public static double atan2(double a, double b) -
acos
public static float acos(float a) -
acosh
public static float acosh(float x) -
acosh
public static double acosh(double x) -
acos
public static double acos(double a) -
asin
public static float asin(float a) -
asin
public static double asin(double a) -
asinh
public static float asinh(float x) -
asinh
public static double asinh(double x) -
cos
public static float cos(float angle) -
cos
public static double cos(double angle) In PTX, the cos operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands. -
sin
public static float sin(float angle) -
sin
public static double sin(double angle) In PTX, the sin operation that accepts a double input is narrowed to f32, since the PTX instruction does not support f64 operands. -
signum
public static float signum(float a) -
signum
public static double signum(double a) -
toRadians
public static float toRadians(float angdeg) -
toRadians
public static double toRadians(double angdeg) -
sinpi
public static float sinpi(float angle) -
sinpi
public static double sinpi(double angle) In PTX, the sinpi operation that accepts a double input is narrowed to f32, since the PTX sin instruction does not support f64 operands. -
cospi
public static float cospi(float angle) -
cospi
public static double cospi(double angle) In PTX, the cospi operation that accepts a double input is narrowed to f32, since the PTX cos instruction does not support f64 operands. -
rotate
-
ceil
public static float ceil(float value) -
ceil
public static double ceil(double value)
-