## Overview

The mathematical functions below can be applied to scalars and vectors. When applied
to vectors, the returned value is a vector of the function applied to each entry of the input.

For example:  
`
float3 a, b;`  
`
// The following call sets`  
`
// a.x to sin(b.x),`  
`
// a.y to sin(b.y), and`  
`
// a.z to sin(b.z).`  
`
a = sin(b);`  
`
`

See [Vector Math Functions](https://developer.android.com/guide/topics/renderscript/reference/rs_vector_math) for functions like [distance](https://developer.android.com/guide/topics/renderscript/reference/rs_vector_math#android_rs:distance)() and [length](https://developer.android.com/guide/topics/renderscript/reference/rs_vector_math#android_rs:length)() that interpret
instead the input as a single vector in n-dimensional space.

The precision of the mathematical operations on 32 bit floats is affected by the pragmas
rs_fp_relaxed and rs_fp_full. Under rs_fp_relaxed, subnormal values may be flushed to zero and
rounding may be done towards zero. In comparison, rs_fp_full requires correct handling of
subnormal values, i.e. smaller than 1.17549435e-38f. rs_fp_rull also requires round to nearest
with ties to even.

Different precision/speed tradeoffs can be achieved by using variants of the common math
functions. Functions with a name starting with

- native_: May have custom hardware implementations with weaker precision. Additionally, subnormal values may be flushed to zero, rounding towards zero may be used, and NaN and infinity input may not be handled correctly.
- half_: May perform internal computations using 16 bit floats. Additionally, subnormal values may be flushed to zero, and rounding towards zero may be used.

<br />

## Summary

| Constants ||
|---|---|
| [M_1_PI](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_1_PI) | 1 / pi, as a 32 bit float |
| [M_2_PI](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_2_PI) | 2 / pi, as a 32 bit float |
| [M_2_SQRTPI](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_2_SQRTPI) | 2 / sqrt(pi), as a 32 bit float |
| [M_E](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_E) | e, as a 32 bit float |
| [M_LN10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_LN10) | log_e(10), as a 32 bit float |
| [M_LN2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_LN2) | log_e(2), as a 32 bit float |
| [M_LOG10E](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_LOG10E) | log_10(e), as a 32 bit float |
| [M_LOG2E](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_LOG2E) | log_2(e), as a 32 bit float |
| [M_PI](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_PI) | pi, as a 32 bit float |
| [M_PI_2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_PI_2) | pi / 2, as a 32 bit float |
| [M_PI_4](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_PI_4) | pi / 4, as a 32 bit float |
| [M_SQRT1_2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_SQRT1_2) | 1 / sqrt(2), as a 32 bit float |
| [M_SQRT2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:M_SQRT2) | sqrt(2), as a 32 bit float |

| Functions ||
|---|---|
| [abs](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:abs) | Absolute value of an integer |
| [acos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acos) | Inverse cosine |
| [acosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acosh) | Inverse hyperbolic cosine |
| [acospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acospi) | Inverse cosine divided by pi |
| [asin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asin) | Inverse sine |
| [asinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asinh) | Inverse hyperbolic sine |
| [asinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asinpi) | Inverse sine divided by pi |
| [atan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan) | Inverse tangent |
| [atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2) | Inverse tangent of a ratio |
| [atan2pi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2pi) | Inverse tangent of a ratio, divided by pi |
| [atanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atanh) | Inverse hyperbolic tangent |
| [atanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atanpi) | Inverse tangent divided by pi |
| [cbrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cbrt) | Cube root |
| [ceil](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ceil) | Smallest integer not less than a value |
| [clamp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:clamp) | Restrain a value to a range |
| [clz](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:clz) | Number of leading 0 bits |
| [copysign](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:copysign) | Copies the sign of a number to another |
| [cos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cos) | Cosine |
| [cosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cosh) | Hypebolic cosine |
| [cospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cospi) | Cosine of a number multiplied by pi |
| [degrees](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:degrees) | Converts radians into degrees |
| [erf](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:erf) | Mathematical error function |
| [erfc](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:erfc) | Mathematical complementary error function |
| [exp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp) | e raised to a number |
| [exp10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp10) | 10 raised to a number |
| [exp2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp2) | 2 raised to a number |
| [expm1](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:expm1) | e raised to a number minus one |
| [fabs](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fabs) | Absolute value of a float |
| [fdim](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fdim) | Positive difference between two values |
| [floor](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:floor) | Smallest integer not greater than a value |
| [fma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fma) | Multiply and add |
| [fmax](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fmax) | Maximum of two floats |
| [fmin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fmin) | Minimum of two floats |
| [fmod](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fmod) | Modulo |
| [fract](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fract) | Positive fractional part |
| [frexp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:frexp) | Binary mantissa and exponent |
| [half_recip](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_recip) | Reciprocal computed to 16 bit precision |
| [half_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_rsqrt) | Reciprocal of a square root computed to 16 bit precision |
| [half_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_sqrt) | Square root computed to 16 bit precision |
| [hypot](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:hypot) | Hypotenuse |
| [ilogb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ilogb) | Base two exponent |
| [ldexp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ldexp) | Creates a floating point from mantissa and exponent |
| [lgamma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:lgamma) | Natural logarithm of the gamma function |
| [log](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log) | Natural logarithm |
| [log10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log10) | Base 10 logarithm |
| [log1p](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log1p) | Natural logarithm of a value plus 1 |
| [log2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log2) | Base 2 logarithm |
| [logb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:logb) | Base two exponent |
| [mad](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:mad) | Multiply and add |
| [max](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:max) | Maximum |
| [min](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:min) | Minimum |
| [mix](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:mix) | Mixes two values |
| [modf](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:modf) | Integral and fractional components |
| [nan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:nan) | Not a Number |
| [nan_half](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:nan_half) | Not a Number |
| [native_acos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acos) | Approximate inverse cosine |
| [native_acosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acosh) | Approximate inverse hyperbolic cosine |
| [native_acospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acospi) | Approximate inverse cosine divided by pi |
| [native_asin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asin) | Approximate inverse sine |
| [native_asinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asinh) | Approximate inverse hyperbolic sine |
| [native_asinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asinpi) | Approximate inverse sine divided by pi |
| [native_atan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan) | Approximate inverse tangent |
| [native_atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan2) | Approximate inverse tangent of a ratio |
| [native_atan2pi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan2pi) | Approximate inverse tangent of a ratio, divided by pi |
| [native_atanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atanh) | Approximate inverse hyperbolic tangent |
| [native_atanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atanpi) | Approximate inverse tangent divided by pi |
| [native_cbrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cbrt) | Approximate cube root |
| [native_cos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cos) | Approximate cosine |
| [native_cosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cosh) | Approximate hypebolic cosine |
| [native_cospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cospi) | Approximate cosine of a number multiplied by pi |
| [native_divide](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_divide) | Approximate division |
| [native_exp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp) | Approximate e raised to a number |
| [native_exp10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp10) | Approximate 10 raised to a number |
| [native_exp2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp2) | Approximate 2 raised to a number |
| [native_expm1](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_expm1) | Approximate e raised to a number minus one |
| [native_hypot](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_hypot) | Approximate hypotenuse |
| [native_log](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log) | Approximate natural logarithm |
| [native_log10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log10) | Approximate base 10 logarithm |
| [native_log1p](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log1p) | Approximate natural logarithm of a value plus 1 |
| [native_log2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log2) | Approximate base 2 logarithm |
| [native_powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_powr) | Approximate positive base raised to an exponent |
| [native_recip](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_recip) | Approximate reciprocal |
| [native_rootn](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_rootn) | Approximate nth root |
| [native_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_rsqrt) | Approximate reciprocal of a square root |
| [native_sin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sin) | Approximate sine |
| [native_sincos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sincos) | Approximate sine and cosine |
| [native_sinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sinh) | Approximate hyperbolic sine |
| [native_sinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sinpi) | Approximate sine of a number multiplied by pi |
| [native_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sqrt) | Approximate square root |
| [native_tan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tan) | Approximate tangent |
| [native_tanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tanh) | Approximate hyperbolic tangent |
| [native_tanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tanpi) | Approximate tangent of a number multiplied by pi |
| [nextafter](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:nextafter) | Next floating point number |
| [pow](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pow) | Base raised to an exponent |
| [pown](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pown) | Base raised to an integer exponent |
| [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr) | Positive base raised to an exponent |
| [radians](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:radians) | Converts degrees into radians |
| [remainder](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:remainder) | Remainder of a division |
| [remquo](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:remquo) | Remainder and quotient of a division |
| [rint](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rint) | Round to even |
| [rootn](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rootn) | Nth root |
| [round](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:round) | Round away from zero |
| [rsRand](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsRand) | Pseudo-random number |
| [rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsqrt) | Reciprocal of a square root |
| [sign](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sign) | Sign of a value |
| [sin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sin) | Sine |
| [sincos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sincos) | Sine and cosine |
| [sinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sinh) | Hyperbolic sine |
| [sinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sinpi) | Sine of a number multiplied by pi |
| [sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sqrt) | Square root |
| [step](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:step) | 0 if less than a value, 1 otherwise |
| [tan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tan) | Tangent |
| [tanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tanh) | Hyperbolic tangent |
| [tanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tanpi) | Tangent of a number multiplied by pi |
| [tgamma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tgamma) | Gamma function |
| [trunc](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:trunc) | Truncates a floating point |

| Deprecated Functions ||
|---|---|
| [rsClamp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsClamp) | **Deprecated**. Restrain a value to a range |
| [rsFrac](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsFrac) | **Deprecated**. Returns the fractional part of a float |

## Constants

#### M_1_PI
: 1 / pi, as a 32 bit float

<br />

|---|
| Value: 0.318309886183790671537767526745028724f |

The inverse of pi, as a 32 bit float.  

#### M_2_PI
: 2 / pi, as a 32 bit float

<br />

|---|
| Value: 0.636619772367581343075535053490057448f |

2 divided by pi, as a 32 bit float.  

#### M_2_SQRTPI
: 2 / sqrt(pi), as a 32 bit float

<br />

|---|
| Value: 1.128379167095512573896158903121545172f |

2 divided by the square root of pi, as a 32 bit float.  

#### M_E
: e, as a 32 bit float

<br />

|---|
| Value: 2.718281828459045235360287471352662498f |

The number e, the base of the natural logarithm, as a 32 bit float.  

#### M_LN10
: log_e(10), as a 32 bit float

<br />

|---|
| Value: 2.302585092994045684017991454684364208f |

The natural logarithm of 10, as a 32 bit float.  

#### M_LN2
: log_e(2), as a 32 bit float

<br />

|---|
| Value: 0.693147180559945309417232121458176568f |

The natural logarithm of 2, as a 32 bit float.  

#### M_LOG10E
: log_10(e), as a 32 bit float

<br />

|---|
| Value: 0.434294481903251827651128918916605082f |

The logarithm base 10 of e, as a 32 bit float.  

#### M_LOG2E
: log_2(e), as a 32 bit float

<br />

|---|
| Value: 1.442695040888963407359924681001892137f |

The logarithm base 2 of e, as a 32 bit float.  

#### M_PI
: pi, as a 32 bit float

<br />

|---|
| Value: 3.141592653589793238462643383279502884f |

The constant pi, as a 32 bit float.  

#### M_PI_2
: pi / 2, as a 32 bit float

<br />

|---|
| Value: 1.570796326794896619231321691639751442f |

Pi divided by 2, as a 32 bit float.  

#### M_PI_4
: pi / 4, as a 32 bit float

<br />

|---|
| Value: 0.785398163397448309615660845819875721f |

Pi divided by 4, as a 32 bit float.  

#### M_SQRT1_2
: 1 / sqrt(2), as a 32 bit float

<br />

|---|
| Value: 0.707106781186547524400844362104849039f |

The inverse of the square root of 2, as a 32 bit float.  

#### M_SQRT2
: sqrt(2), as a 32 bit float

<br />

|---|
| Value: 1.414213562373095048801688724209698079f |

The square root of 2, as a 32 bit float.

## Functions

#### abs
: Absolute value of an integer

|---|---|
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) abs(char v); |   |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) abs([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) v); |   |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) abs([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) v); |   |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) abs([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) v); |   |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) abs(int v); |   |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) abs([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) v); |   |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) abs([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) v); |   |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) abs([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) v); |   |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) abs(short v); |   |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) abs([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) v); |   |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) abs([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) v); |   |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) abs([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) v); |   |

Returns the absolute value of an integer.

For floats, use [fabs](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fabs)().  

#### acos
: Inverse cosine

|---|---|
| float acos(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) acos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) acos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) acos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) acos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) acos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) acos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) acos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse cosine, in radians.

See also [native_acos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acos)().  

#### acosh
: Inverse hyperbolic cosine

|---|---|
| float acosh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) acosh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) acosh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) acosh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) acosh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) acosh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) acosh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) acosh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse hyperbolic cosine, in radians.

See also [native_acosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acosh)().  

#### acospi
: Inverse cosine divided by pi

|---|---|
| float acospi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) acospi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) acospi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) acospi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) acospi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) acospi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) acospi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) acospi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse cosine in radians, divided by pi.

To get an inverse cosine measured in degrees, use `acospi(a) * 180.f`.

See also [native_acospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_acospi)().  

#### asin
: Inverse sine

|---|---|
| float asin(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) asin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) asin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) asin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) asin([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) asin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) asin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) asin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse sine, in radians.

See also [native_asin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asin)().  

#### asinh
: Inverse hyperbolic sine

|---|---|
| float asinh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) asinh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) asinh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) asinh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) asinh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) asinh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) asinh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) asinh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse hyperbolic sine, in radians.

See also [native_asinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asinh)().  

#### asinpi
: Inverse sine divided by pi

|---|---|
| float asinpi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) asinpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) asinpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) asinpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) asinpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) asinpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) asinpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) asinpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse sine in radians, divided by pi.

To get an inverse sine measured in degrees, use `asinpi(a) * 180.f`.

See also [native_asinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_asinpi)().  

#### atan
: Inverse tangent

|---|---|
| float atan(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) atan([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) atan([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) atan([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) atan([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) atan([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) atan([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) atan([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse tangent, in radians.

See also [native_atan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan)().  

#### atan2
: Inverse tangent of a ratio

|---|---|
| float atan2(float numerator, float denominator); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) atan2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) atan2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) atan2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) atan2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) atan2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) atan2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) atan2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| numerator | Numerator. |
| denominator | Denominator. Can be 0. |
|---|---|

Returns the inverse tangent of `(numerator / denominator)`, in radians.

See also [native_atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan2)().  

#### atan2pi
: Inverse tangent of a ratio, divided by pi

|---|---|
| float atan2pi(float numerator, float denominator); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) atan2pi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) atan2pi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) atan2pi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) atan2pi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) atan2pi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) atan2pi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) atan2pi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| numerator | Numerator. |
| denominator | Denominator. Can be 0. |
|---|---|

Returns the inverse tangent of `(numerator / denominator)`, in radians, divided by pi.

To get an inverse tangent measured in degrees, use `atan2pi(n, d) * 180.f`.

See also [native_atan2pi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atan2pi)().  

#### atanh
: Inverse hyperbolic tangent

|---|---|
| float atanh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) atanh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) atanh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) atanh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) atanh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) atanh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) atanh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) atanh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse hyperbolic tangent, in radians.

See also [native_atanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atanh)().  

#### atanpi
: Inverse tangent divided by pi

|---|---|
| float atanpi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) atanpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) atanpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) atanpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) atanpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) atanpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) atanpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) atanpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the inverse tangent in radians, divided by pi.

To get an inverse tangent measured in degrees, use `atanpi(a) * 180.f`.

See also [native_atanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_atanpi)().  

#### cbrt
: Cube root

|---|---|
| float cbrt(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) cbrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) cbrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) cbrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) cbrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) cbrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) cbrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) cbrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the cube root.

See also [native_cbrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cbrt)().  

#### ceil
: Smallest integer not less than a value

|---|---|
| float ceil(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) ceil([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) ceil([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) ceil([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) ceil([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) ceil([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) ceil([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) ceil([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the smallest integer not less than a value.

For example, `ceil(1.2f)` returns 2.f, and `ceil(-1.2f)` returns -1.f.

See also [floor](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:floor)().  

#### clamp
: Restrain a value to a range

|---|---|
| char clamp(char value, char min_value, char max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) clamp([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) value, char min_value, char max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) clamp([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) value, [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) min_value, [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) clamp([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) value, char min_value, char max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) clamp([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) value, [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) min_value, [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) clamp([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) value, char min_value, char max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) clamp([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) value, [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) min_value, [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| float clamp(float value, float min_value, float max_value); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) clamp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) value, float min_value, float max_value); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) clamp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) value, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) min_value, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) max_value); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) clamp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) value, float min_value, float max_value); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) clamp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) value, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) min_value, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) max_value); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) clamp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) value, float min_value, float max_value); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) clamp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) value, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) min_value, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) max_value); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) clamp([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) min_value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) clamp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) min_value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) clamp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) value, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) min_value, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) clamp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) min_value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) clamp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) value, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) min_value, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) clamp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) min_value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) clamp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) value, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) min_value, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) max_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| int clamp(int value, int min_value, int max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) clamp([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) value, int min_value, int max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) clamp([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) value, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) min_value, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) clamp([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) value, int min_value, int max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) clamp([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) value, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) min_value, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) clamp([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) value, int min_value, int max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) clamp([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) value, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) min_value, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| long clamp(long value, long min_value, long max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) clamp([long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) value, long min_value, long max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) clamp([long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) value, [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) min_value, [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) clamp([long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) value, long min_value, long max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) clamp([long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) value, [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) min_value, [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) clamp([long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) value, long min_value, long max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) clamp([long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) value, [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) min_value, [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| short clamp(short value, short min_value, short max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) clamp([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) value, short min_value, short max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) clamp([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) value, [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) min_value, [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) clamp([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) value, short min_value, short max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) clamp([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) value, [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) min_value, [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) clamp([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) value, short min_value, short max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) clamp([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) value, [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) min_value, [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) clamp([uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) min_value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) clamp([uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) min_value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) clamp([uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) value, [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) min_value, [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) clamp([uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) min_value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) clamp([uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) value, [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) min_value, [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) clamp([uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) min_value, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) clamp([uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) value, [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) min_value, [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) clamp([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) min_value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) clamp([uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) min_value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) clamp([uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) value, [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) min_value, [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) clamp([uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) min_value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) clamp([uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) value, [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) min_value, [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) clamp([uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) min_value, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) clamp([uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) value, [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) min_value, [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) clamp([ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) min_value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) clamp([ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) min_value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) clamp([ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) value, [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) min_value, [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) clamp([ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) min_value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) clamp([ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) value, [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) min_value, [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) clamp([ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) min_value, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) clamp([ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) value, [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) min_value, [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) clamp([ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) min_value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) clamp([ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) min_value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) clamp([ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) value, [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) min_value, [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) clamp([ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) min_value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) clamp([ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) value, [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) min_value, [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) clamp([ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) min_value, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) clamp([ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) value, [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) min_value, [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) max_value); | Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| value | Value to be clamped. |
| min_value | Lower bound, a scalar or matching vector. |
| max_value | High bound, must match the type of low. |
|---|---|

Clamps a value to a specified high and low bound. clamp() returns min_value
if value \< min_value, max_value if value \> max_value, otherwise value.

There are two variants of clamp: one where the min and max are scalars applied
to all entries of the value, the other where the min and max are also vectors.

If min_value is greater than max_value, the results are undefined.  

#### clz
: Number of leading 0 bits

|---|---|
| char clz(char value); |   |
| [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) clz([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) value); |   |
| [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) clz([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) value); |   |
| [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) clz([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) value); |   |
| int clz(int value); |   |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) clz([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) value); |   |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) clz([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) value); |   |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) clz([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) value); |   |
| short clz(short value); |   |
| [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) clz([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) value); |   |
| [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) clz([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) value); |   |
| [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) clz([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) value); |   |
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) clz([uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) value); |   |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) clz([uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) value); |   |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) clz([uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) value); |   |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) clz([uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) value); |   |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) clz([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) value); |   |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) clz([uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) value); |   |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) clz([uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) value); |   |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) clz([uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) value); |   |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) clz([ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) value); |   |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) clz([ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) value); |   |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) clz([ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) value); |   |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) clz([ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) value); |   |

Returns the number of leading 0-bits in a value.

For example, `clz((char)0x03)` returns 6.  

#### copysign
: Copies the sign of a number to another

|---|---|
| float copysign(float magnitude_value, float sign_value); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) copysign([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) magnitude_value, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sign_value); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) copysign([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) magnitude_value, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sign_value); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) copysign([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) magnitude_value, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sign_value); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) copysign([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) magnitude_value, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sign_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) copysign([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) magnitude_value, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sign_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) copysign([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) magnitude_value, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sign_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) copysign([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) magnitude_value, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sign_value); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Copies the sign from sign_value to magnitude_value.

The value returned is either magnitude_value or -magnitude_value.

For example, `copysign(4.0f, -2.7f)` returns -4.0f and `copysign(-4.0f, 2.7f)` returns 4.0f.  

#### cos
: Cosine

|---|---|
| float cos(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) cos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) cos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) cos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) cos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) cos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) cos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) cos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the cosine of an angle measured in radians.

See also [native_cos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cos)().  

#### cosh
: Hypebolic cosine

|---|---|
| float cosh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) cosh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) cosh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) cosh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) cosh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) cosh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) cosh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) cosh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the hypebolic cosine of v, where v is measured in radians.

See also [native_cosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cosh)().  

#### cospi
: Cosine of a number multiplied by pi

|---|---|
| float cospi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) cospi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) cospi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) cospi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) cospi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) cospi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) cospi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) cospi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the cosine of `(v * pi)`, where `(v * pi)` is measured in radians.

To get the cosine of a value measured in degrees, call `cospi(v / 180.f)`.

See also [native_cospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_cospi)().  

#### degrees
: Converts radians into degrees

|---|---|
| float degrees(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) degrees([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) degrees([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) degrees([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) degrees([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) degrees([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) degrees([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) degrees([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Converts from radians to degrees.  

#### erf
: Mathematical error function

|---|---|
| float erf(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) erf([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) erf([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) erf([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) erf([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) erf([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) erf([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) erf([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the error function.  

#### erfc
: Mathematical complementary error function

|---|---|
| float erfc(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) erfc([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) erfc([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) erfc([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) erfc([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) erfc([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) erfc([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) erfc([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the complementary error function.  

#### exp
: e raised to a number

|---|---|
| float exp(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exp([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns e raised to v, i.e. e \^ v.

See also [native_exp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp)().  

#### exp10
: 10 raised to a number

|---|---|
| float exp10(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exp10([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exp10([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exp10([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exp10([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exp10([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exp10([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exp10([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns 10 raised to v, i.e. 10.f \^ v.

See also [native_exp10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp10)().  

#### exp2
: 2 raised to a number

|---|---|
| float exp2(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exp2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exp2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exp2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exp2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exp2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exp2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exp2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns 2 raised to v, i.e. 2.f \^ v.

See also [native_exp2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_exp2)().  

#### expm1
: e raised to a number minus one

|---|---|
| float expm1(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) expm1([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) expm1([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) expm1([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) expm1([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) expm1([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) expm1([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) expm1([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns e raised to v minus 1, i.e. (e \^ v) - 1.

See also [native_expm1](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_expm1)().  

#### fabs
: Absolute value of a float

|---|---|
| float fabs(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fabs([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fabs([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fabs([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fabs([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fabs([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fabs([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fabs([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the absolute value of the float v.

For integers, use [abs](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:abs)().  

#### fdim
: Positive difference between two values

|---|---|
| float fdim(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fdim([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fdim([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fdim([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fdim([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fdim([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fdim([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fdim([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the positive difference between two values.

If a \> b, returns (a - b) otherwise returns 0f.  

#### floor
: Smallest integer not greater than a value

|---|---|
| float floor(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) floor([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) floor([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) floor([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) floor([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) floor([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) floor([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) floor([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the smallest integer not greater than a value.

For example, `floor(1.2f)` returns 1.f, and `floor(-1.2f)` returns -2.f.

See also [ceil](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ceil)().  

#### fma
: Multiply and add

|---|---|
| float fma(float multiplicand1, float multiplicand2, float offset); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fma([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) multiplicand1, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) multiplicand2, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) offset); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fma([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) multiplicand1, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) multiplicand2, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) offset); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fma([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) multiplicand1, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) multiplicand2, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) offset); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fma([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) multiplicand1, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) multiplicand2, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fma([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) multiplicand1, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) multiplicand2, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fma([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) multiplicand1, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) multiplicand2, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fma([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) multiplicand1, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) multiplicand2, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Multiply and add. Returns `(multiplicand1 * multiplicand2) + offset`.

This function is similar to [mad](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:mad)(). fma() retains full precision of the multiplied result
and rounds only after the addition. [mad](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:mad)() rounds after the multiplication and the addition.
This extra precision is not guaranteed in rs_fp_relaxed mode.  

#### fmax
: Maximum of two floats

|---|---|
| float fmax(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fmax([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fmax([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fmax([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, float b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fmax([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fmax([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, float b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fmax([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fmax([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fmax([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fmax([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fmax([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fmax([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fmax([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fmax([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the maximum of a and b, i.e. `(a < b ? b : a)`.

The [max](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:max)() function returns identical results but can be applied to more data types.  

#### fmin
: Minimum of two floats

|---|---|
| float fmin(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fmin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fmin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fmin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, float b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fmin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fmin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, float b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fmin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fmin([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fmin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fmin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fmin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fmin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fmin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fmin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the minimum of a and b, i.e. `(a > b ? b : a)`.

The [min](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:min)() function returns identical results but can be applied to more data types.  

#### fmod
: Modulo

|---|---|
| float fmod(float numerator, float denominator); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fmod([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fmod([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fmod([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fmod([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fmod([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fmod([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fmod([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the remainder of (numerator / denominator), where the quotient is rounded towards zero.

The function [remainder](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:remainder)() is similar but rounds toward the closest integer.
For example, `fmod(-3.8f, 2.f)` returns -1.8f (-3.8f - -1.f \* 2.f)
while [remainder](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:remainder)`(-3.8f, 2.f)` returns 0.2f (-3.8f - -2.f \* 2.f).  

#### fract
: Positive fractional part

|---|---|
| float fract(float v); |   |
| float fract(float v, float\* floor); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fract([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fract([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2)\* floor); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fract([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fract([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3)\* floor); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fract([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fract([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4)\* floor); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fract([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fract([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half)\* floor); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fract([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fract([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2)\* floor); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fract([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fract([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3)\* floor); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fract([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fract([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4)\* floor); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v | Input value. |
| floor | If floor is not null, \*floor will be set to the floor of v. |
|---|---|

Returns the positive fractional part of v, i.e. `v - floor(v)`.

For example, `fract(1.3f, &val)` returns 0.3f and sets val to 1.f.
`fract(-1.3f, &val)` returns 0.7f and sets val to -2.f.  

#### frexp
: Binary mantissa and exponent

|---|---|
| float frexp(float v, int\* exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) frexp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) frexp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) frexp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* exponent); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) frexp([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, int\* exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) frexp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) frexp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) frexp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v | Input value. |
| exponent | If exponent is not null, \*exponent will be set to the exponent of v. |
|---|---|

Returns the binary mantissa and exponent of v, i.e. `v == mantissa * 2 ^ exponent`.

The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive).

See [ldexp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ldexp)() for the reverse operation. See also [logb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:logb)() and [ilogb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ilogb)().  

#### half_recip
: Reciprocal computed to 16 bit precision

|---|---|
| float half_recip(float v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) half_recip([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) half_recip([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) half_recip([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate reciprocal of a value.

The precision is that of a 16 bit floating point value.

See also [native_recip](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_recip)().  

#### half_rsqrt
: Reciprocal of a square root computed to 16 bit precision

|---|---|
| float half_rsqrt(float v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) half_rsqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) half_rsqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) half_rsqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate value of `(1.f / sqrt(value))`.

The precision is that of a 16 bit floating point value.

See also [rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsqrt)(), [native_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_rsqrt)().  

#### half_sqrt
: Square root computed to 16 bit precision

|---|---|
| float half_sqrt(float v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) half_sqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) half_sqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) half_sqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate square root of a value.

The precision is that of a 16 bit floating point value.

See also [sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sqrt)(), [native_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sqrt)().  

#### hypot
: Hypotenuse

|---|---|
| float hypot(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) hypot([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) hypot([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) hypot([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) hypot([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) hypot([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) hypot([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) hypot([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the hypotenuse, i.e. `sqrt(a * a + b * b)`.

See also [native_hypot](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_hypot)().  

#### ilogb
: Base two exponent

|---|---|
| int ilogb(float v); |   |
| int ilogb([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) ilogb([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) ilogb([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) ilogb([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) ilogb([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) ilogb([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) ilogb([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the base two exponent of a value, where the mantissa is between
1.f (inclusive) and 2.f (exclusive).

For example, `ilogb(8.5f)` returns 3.

Because of the difference in mantissa, this number is one less than is returned by [frexp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:frexp)().

[logb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:logb)() is similar but returns a float.  

#### ldexp
: Creates a floating point from mantissa and exponent

|---|---|
| float ldexp(float mantissa, int exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) ldexp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) mantissa, int exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) ldexp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) mantissa, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) ldexp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) mantissa, int exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) ldexp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) mantissa, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) ldexp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) mantissa, int exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) ldexp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) mantissa, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) exponent); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) ldexp([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) mantissa, int exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) ldexp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) mantissa, int exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) ldexp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) mantissa, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) ldexp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) mantissa, int exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) ldexp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) mantissa, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) ldexp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) mantissa, int exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) ldexp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) mantissa, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| mantissa | Mantissa. |
| exponent | Exponent, a single component or matching vector. |
|---|---|

Returns the floating point created from the mantissa and exponent,
i.e. (mantissa \* 2 \^ exponent).

See [frexp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:frexp)() for the reverse operation.  

#### lgamma
: Natural logarithm of the gamma function

|---|---|
| float lgamma(float v); |   |
| float lgamma(float v, int\* sign_of_gamma); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) lgamma([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) lgamma([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* sign_of_gamma); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) lgamma([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) lgamma([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* sign_of_gamma); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) lgamma([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) lgamma([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* sign_of_gamma); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) lgamma([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) lgamma([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, int\* sign_of_gamma); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) lgamma([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) lgamma([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* sign_of_gamma); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) lgamma([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) lgamma([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* sign_of_gamma); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) lgamma([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) lgamma([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* sign_of_gamma); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v |   |
| sign_of_gamma | If sign_of_gamma is not null, \*sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f. |
|---|---|

Returns the natural logarithm of the absolute value of the gamma function,
i.e. [log](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log)`(`[fabs](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fabs)`(`[tgamma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tgamma)`(v)))`.

See also [tgamma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tgamma)().  

#### log
: Natural logarithm

|---|---|
| float log(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) log([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) log([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) log([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) log([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) log([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) log([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) log([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the natural logarithm.

See also [native_log](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log)().  

#### log10
: Base 10 logarithm

|---|---|
| float log10(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) log10([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) log10([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) log10([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) log10([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) log10([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) log10([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) log10([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the base 10 logarithm.

See also [native_log10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log10)().  

#### log1p
: Natural logarithm of a value plus 1

|---|---|
| float log1p(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) log1p([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) log1p([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) log1p([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) log1p([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) log1p([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) log1p([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) log1p([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the natural logarithm of `(v + 1.f)`.

See also [native_log1p](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log1p)().  

#### log2
: Base 2 logarithm

|---|---|
| float log2(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) log2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) log2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) log2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) log2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) log2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) log2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) log2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the base 2 logarithm.

See also [native_log2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_log2)().  

#### logb
: Base two exponent

|---|---|
| float logb(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) logb([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) logb([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) logb([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) logb([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) logb([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) logb([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) logb([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the base two exponent of a value, where the mantissa is between
1.f (inclusive) and 2.f (exclusive).

For example, `logb(8.5f)` returns 3.f.

Because of the difference in mantissa, this number is one less than is returned by frexp().

[ilogb](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:ilogb)() is similar but returns an integer.  

#### mad
: Multiply and add

|---|---|
| float mad(float multiplicand1, float multiplicand2, float offset); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) mad([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) multiplicand1, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) multiplicand2, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) offset); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) mad([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) multiplicand1, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) multiplicand2, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) offset); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) mad([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) multiplicand1, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) multiplicand2, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) offset); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) mad([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) multiplicand1, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) multiplicand2, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) mad([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) multiplicand1, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) multiplicand2, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) mad([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) multiplicand1, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) multiplicand2, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) mad([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) multiplicand1, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) multiplicand2, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) offset); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Multiply and add. Returns `(multiplicand1 * multiplicand2) + offset`.

This function is similar to [fma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fma)(). [fma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fma)() retains full precision of the multiplied result
and rounds only after the addition. mad() rounds after the multiplication and the addition.
In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton.  

#### max
: Maximum

|---|---|
| char max(char a, char b); |   |
| [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) max([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) a, [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) b); |   |
| [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) max([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) a, [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) b); |   |
| [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) max([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) a, [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) b); |   |
| float max(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) max([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) max([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) max([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, float b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) max([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) max([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, float b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) max([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) max([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) max([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) max([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) max([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) max([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) max([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) max([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| int max(int a, int b); |   |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) max([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) a, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) b); |   |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) max([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) a, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) b); |   |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) max([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) a, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) b); |   |
| long max(long a, long b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) max([long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) a, [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) max([long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) a, [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) max([long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) a, [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| short max(short a, short b); |   |
| [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) max([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) a, [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) b); |   |
| [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) max([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) a, [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) b); |   |
| [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) max([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) a, [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) b); |   |
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) max([uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) a, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) b); |   |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) max([uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) a, [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) b); |   |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) max([uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) a, [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) b); |   |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) max([uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) a, [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) b); |   |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) max([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) a, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) b); |   |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) max([uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) a, [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) b); |   |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) max([uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) a, [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) b); |   |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) max([uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) a, [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) b); |   |
| [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) max([ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) a, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) max([ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) a, [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) max([ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) a, [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) max([ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) a, [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) max([ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) a, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) b); |   |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) max([ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) a, [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) b); |   |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) max([ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) a, [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) b); |   |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) max([ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) a, [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) b); |   |

Returns the maximum value of two arguments.  

#### min
: Minimum

|---|---|
| char min(char a, char b); |   |
| [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) min([char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) a, [char2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char2) b); |   |
| [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) min([char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) a, [char3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char3) b); |   |
| [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) min([char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) a, [char4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:char4) b); |   |
| float min(float a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) min([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, float b); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) min([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) min([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, float b); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) min([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) min([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, float b); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) min([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) min([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) min([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) min([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) min([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) min([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) min([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) min([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| int min(int a, int b); |   |
| [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) min([int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) a, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) b); |   |
| [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) min([int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) a, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) b); |   |
| [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) min([int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) a, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) b); |   |
| long min(long a, long b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) min([long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) a, [long2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long2) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) min([long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) a, [long3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long3) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) min([long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) a, [long4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:long4) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| short min(short a, short b); |   |
| [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) min([short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) a, [short2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short2) b); |   |
| [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) min([short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) a, [short3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short3) b); |   |
| [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) min([short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) a, [short4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:short4) b); |   |
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) min([uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) a, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) b); |   |
| [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) min([uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) a, [uchar2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar2) b); |   |
| [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) min([uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) a, [uchar3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar3) b); |   |
| [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) min([uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) a, [uchar4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar4) b); |   |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) min([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) a, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) b); |   |
| [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) min([uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) a, [uint2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint2) b); |   |
| [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) min([uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) a, [uint3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint3) b); |   |
| [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) min([uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) a, [uint4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint4) b); |   |
| [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) min([ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) a, [ulong](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) min([ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) a, [ulong2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong2) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) min([ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) a, [ulong3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong3) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) min([ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) a, [ulong4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ulong4) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) min([ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) a, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) b); |   |
| [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) min([ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) a, [ushort2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort2) b); |   |
| [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) min([ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) a, [ushort3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort3) b); |   |
| [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) min([ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) a, [ushort4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort4) b); |   |

Returns the minimum value of two arguments.  

#### mix
: Mixes two values

|---|---|
| float mix(float start, float stop, float fraction); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) mix([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) start, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) stop, float fraction); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) mix([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) start, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) stop, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) fraction); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) mix([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) start, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) stop, float fraction); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) mix([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) start, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) stop, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) fraction); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) mix([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) start, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) stop, float fraction); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) mix([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) start, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) stop, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) fraction); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) mix([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) start, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) stop, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) mix([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) start, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) stop, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) mix([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) start, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) stop, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) mix([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) start, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) stop, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) mix([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) start, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) stop, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) mix([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) start, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) stop, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) mix([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) start, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) stop, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) fraction); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns start + ((stop - start) \* fraction).

This can be useful for mixing two values. For example, to create a new color that is
40% color1 and 60% color2, use `mix(color1, color2, 0.6f)`.  

#### modf
: Integral and fractional components

|---|---|
| float modf(float v, float\* integral_part); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) modf([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2)\* integral_part); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) modf([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3)\* integral_part); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) modf([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4)\* integral_part); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) modf([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half)\* integral_part); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) modf([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2)\* integral_part); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) modf([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3)\* integral_part); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) modf([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4)\* integral_part); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v | Source value. |
| integral_part | \*integral_part will be set to the integral portion of the number. |
|---|---|

##### Returns

|---|
| Floating point portion of the value. |

Returns the integral and fractional components of a number.

Both components will have the same sign as x. For example, for an input of -3.72f,
\*integral_part will be set to -3.f and .72f will be returned.  

#### nan
: Not a Number

|---|---|
| float nan([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) v); |   |

##### Parameters

| v | Not used. |
|---|---|

Returns a NaN value (Not a Number).  

#### nan_half
: Not a Number

|---|---|
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) nan_half(); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns a half-precision floating point NaN value (Not a Number).  

#### native_acos
: Approximate inverse cosine

|---|---|
| float native_acos(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_acos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_acos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_acos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_acos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_acos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_acos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_acos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse cosine, in radians.

This function yields undefined results from input values less than -1 or greater than 1.

See also [acos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acos)().  

#### native_acosh
: Approximate inverse hyperbolic cosine

|---|---|
| float native_acosh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_acosh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_acosh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_acosh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_acosh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_acosh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_acosh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_acosh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse hyperbolic cosine, in radians.

See also [acosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acosh)().  

#### native_acospi
: Approximate inverse cosine divided by pi

|---|---|
| float native_acospi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_acospi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_acospi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_acospi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_acospi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_acospi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_acospi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_acospi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse cosine in radians, divided by pi.

To get an inverse cosine measured in degrees, use `acospi(a) * 180.f`.

This function yields undefined results from input values less than -1 or greater than 1.

See also [acospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:acospi)().  

#### native_asin
: Approximate inverse sine

|---|---|
| float native_asin(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_asin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_asin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_asin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_asin([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_asin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_asin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_asin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse sine, in radians.

This function yields undefined results from input values less than -1 or greater than 1.

See also [asin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asin)().  

#### native_asinh
: Approximate inverse hyperbolic sine

|---|---|
| float native_asinh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_asinh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_asinh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_asinh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_asinh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_asinh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_asinh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_asinh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse hyperbolic sine, in radians.

See also [asinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asinh)().  

#### native_asinpi
: Approximate inverse sine divided by pi

|---|---|
| float native_asinpi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_asinpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_asinpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_asinpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_asinpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_asinpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_asinpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_asinpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse sine in radians, divided by pi.

To get an inverse sine measured in degrees, use `asinpi(a) * 180.f`.

This function yields undefined results from input values less than -1 or greater than 1.

See also [asinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:asinpi)().  

#### native_atan
: Approximate inverse tangent

|---|---|
| float native_atan(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_atan([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_atan([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_atan([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_atan([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_atan([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_atan([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_atan([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse tangent, in radians.

See also [atan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan)().  

#### native_atan2
: Approximate inverse tangent of a ratio

|---|---|
| float native_atan2(float numerator, float denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_atan2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_atan2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_atan2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_atan2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_atan2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_atan2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_atan2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| numerator | Numerator. |
| denominator | Denominator. Can be 0. |
|---|---|

Returns the approximate inverse tangent of `(numerator / denominator)`, in radians.

See also [atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2)().  

#### native_atan2pi
: Approximate inverse tangent of a ratio, divided by pi

|---|---|
| float native_atan2pi(float numerator, float denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_atan2pi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_atan2pi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_atan2pi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_atan2pi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_atan2pi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_atan2pi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_atan2pi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| numerator | Numerator. |
| denominator | Denominator. Can be 0. |
|---|---|

Returns the approximate inverse tangent of `(numerator / denominator)`,
in radians, divided by pi.

To get an inverse tangent measured in degrees, use `atan2pi(n, d) * 180.f`.

See also [atan2pi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2pi)().  

#### native_atanh
: Approximate inverse hyperbolic tangent

|---|---|
| float native_atanh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_atanh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_atanh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_atanh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_atanh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_atanh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_atanh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_atanh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse hyperbolic tangent, in radians.

See also [atanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atanh)().  

#### native_atanpi
: Approximate inverse tangent divided by pi

|---|---|
| float native_atanpi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_atanpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_atanpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_atanpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_atanpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_atanpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_atanpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_atanpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate inverse tangent in radians, divided by pi.

To get an inverse tangent measured in degrees, use `atanpi(a) * 180.f`.

See also [atanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atanpi)().  

#### native_cbrt
: Approximate cube root

|---|---|
| float native_cbrt(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_cbrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_cbrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_cbrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_cbrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_cbrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_cbrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_cbrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate cubic root.

See also [cbrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cbrt)().  

#### native_cos
: Approximate cosine

|---|---|
| float native_cos(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_cos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_cos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_cos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_cos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_cos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_cos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_cos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate cosine of an angle measured in radians.

See also [cos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cos)().  

#### native_cosh
: Approximate hypebolic cosine

|---|---|
| float native_cosh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_cosh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_cosh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_cosh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_cosh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_cosh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_cosh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_cosh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate hypebolic cosine.

See also [cosh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cosh)().  

#### native_cospi
: Approximate cosine of a number multiplied by pi

|---|---|
| float native_cospi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_cospi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_cospi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_cospi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_cospi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_cospi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_cospi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_cospi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate cosine of (v \* pi), where (v \* pi) is measured in radians.

To get the cosine of a value measured in degrees, call `cospi(v / 180.f)`.

See also [cospi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:cospi)().  

#### native_divide
: Approximate division

|---|---|
| float native_divide(float left_vector, float right_vector); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_divide([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) left_vector, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) right_vector); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_divide([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) left_vector, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) right_vector); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_divide([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) left_vector, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) right_vector); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_divide([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) left_vector, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) right_vector); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_divide([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) left_vector, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) right_vector); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_divide([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) left_vector, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) right_vector); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_divide([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) left_vector, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) right_vector); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Computes the approximate division of two values.  

#### native_exp
: Approximate e raised to a number

|---|---|
| float native_exp(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_exp([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_exp([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_exp([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_exp([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_exp([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_exp([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_exp([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate exp.

It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be
expected from using 16 bit floating point values.

See also [exp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp)().  

#### native_exp10
: Approximate 10 raised to a number

|---|---|
| float native_exp10(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_exp10([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_exp10([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_exp10([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_exp10([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_exp10([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_exp10([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_exp10([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate exp10.

It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be
expected from using 16 bit floating point values.

See also [exp10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp10)().  

#### native_exp2
: Approximate 2 raised to a number

|---|---|
| float native_exp2(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_exp2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_exp2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_exp2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_exp2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_exp2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_exp2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_exp2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate exp2.

It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be
expected from using 16 bit floating point values.

See also [exp2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:exp2)().  

#### native_expm1
: Approximate e raised to a number minus one

|---|---|
| float native_expm1(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_expm1([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_expm1([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_expm1([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_expm1([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_expm1([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_expm1([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_expm1([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate (e \^ v) - 1.

See also [expm1](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:expm1)().  

#### native_hypot
: Approximate hypotenuse

|---|---|
| float native_hypot(float a, float b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_hypot([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) a, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_hypot([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) a, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_hypot([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) a, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) b); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_hypot([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) a, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_hypot([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) a, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_hypot([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) a, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_hypot([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) a, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) b); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate native_sqrt(a \* a + b \* b)

See also [hypot](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:hypot)().  

#### native_log
: Approximate natural logarithm

|---|---|
| float native_log(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_log([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_log([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_log([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_log([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_log([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_log([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_log([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate log.

It is not accurate for values very close to zero.

See also [log](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log)().  

#### native_log10
: Approximate base 10 logarithm

|---|---|
| float native_log10(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_log10([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_log10([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_log10([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_log10([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_log10([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_log10([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_log10([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate log10.

It is not accurate for values very close to zero.

See also [log10](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log10)().  

#### native_log1p
: Approximate natural logarithm of a value plus 1

|---|---|
| float native_log1p(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_log1p([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_log1p([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_log1p([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_log1p([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_log1p([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_log1p([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_log1p([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate natural logarithm of (v + 1.0f)

See also [log1p](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log1p)().  

#### native_log2
: Approximate base 2 logarithm

|---|---|
| float native_log2(float v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_log2([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_log2([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_log2([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_log2([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_log2([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_log2([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_log2([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Fast approximate log2.

It is not accurate for values very close to zero.

See also [log2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:log2)().  

#### native_powr
: Approximate positive base raised to an exponent

|---|---|
| float native_powr(float base, float exponent); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_powr([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) base, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exponent); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_powr([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) base, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exponent); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_powr([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) base, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exponent); | Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_powr([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) base, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_powr([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) base, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_powr([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) base, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_powr([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) base, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| base | Must be between 0.f and 256.f. The function is not accurate for values very close to zero. |
| exponent | Must be between -15.f and 15.f. |
|---|---|

Fast approximate (base \^ exponent).

See also [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr)().  

#### native_recip
: Approximate reciprocal

|---|---|
| float native_recip(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_recip([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_recip([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_recip([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_recip([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_recip([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_recip([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_recip([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate approximate reciprocal of a value.

See also [half_recip](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_recip)().  

#### native_rootn
: Approximate nth root

|---|---|
| float native_rootn(float v, int n); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_rootn([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) n); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_rootn([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) n); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_rootn([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) n); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_rootn([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, int n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_rootn([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_rootn([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_rootn([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Compute the approximate Nth root of a value.

See also [rootn](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rootn)().  

#### native_rsqrt
: Approximate reciprocal of a square root

|---|---|
| float native_rsqrt(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_rsqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_rsqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_rsqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_rsqrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_rsqrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_rsqrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_rsqrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns approximate (1 / sqrt(v)).

See also [rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rsqrt)(), [half_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_rsqrt)().  

#### native_sin
: Approximate sine

|---|---|
| float native_sin(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_sin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_sin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_sin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_sin([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_sin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_sin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_sin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate sine of an angle measured in radians.

See also [sin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sin)().  

#### native_sincos
: Approximate sine and cosine

|---|---|
| float native_sincos(float v, float\* cos); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_sincos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2)\* cos); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_sincos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3)\* cos); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_sincos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4)\* cos); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_sincos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_sincos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_sincos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_sincos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v | Incoming value in radians. |
| cos | \*cos will be set to the cosine value. |
|---|---|

##### Returns

|---|
| Sine. |

Returns the approximate sine and cosine of a value.

See also [sincos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sincos)().  

#### native_sinh
: Approximate hyperbolic sine

|---|---|
| float native_sinh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_sinh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_sinh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_sinh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_sinh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_sinh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_sinh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_sinh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate hyperbolic sine of a value specified in radians.

See also [sinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sinh)().  

#### native_sinpi
: Approximate sine of a number multiplied by pi

|---|---|
| float native_sinpi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_sinpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_sinpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_sinpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_sinpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_sinpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_sinpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_sinpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate sine of (v \* pi), where (v \* pi) is measured in radians.

To get the sine of a value measured in degrees, call `sinpi(v / 180.f)`.

See also [sinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sinpi)().  

#### native_sqrt
: Approximate square root

|---|---|
| float native_sqrt(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_sqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_sqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_sqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_sqrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_sqrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_sqrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_sqrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate sqrt(v).

See also [sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sqrt)(), [half_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_sqrt)().  

#### native_tan
: Approximate tangent

|---|---|
| float native_tan(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_tan([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_tan([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_tan([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_tan([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_tan([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_tan([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_tan([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate tangent of an angle measured in radians.  

#### native_tanh
: Approximate hyperbolic tangent

|---|---|
| float native_tanh(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_tanh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_tanh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_tanh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_tanh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_tanh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_tanh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_tanh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate hyperbolic tangent of a value.

See also [tanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tanh)().  

#### native_tanpi
: Approximate tangent of a number multiplied by pi

|---|---|
| float native_tanpi(float v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) native_tanpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) native_tanpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) native_tanpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) native_tanpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) native_tanpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) native_tanpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) native_tanpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the approximate tangent of (v \* pi), where (v \* pi) is measured in radians.

To get the tangent of a value measured in degrees, call `tanpi(v / 180.f)`.

See also [tanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:tanpi)().  

#### nextafter
: Next floating point number

|---|---|
| float nextafter(float v, float target); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) nextafter([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) target); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) nextafter([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) target); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) nextafter([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) target); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) nextafter([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) target); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) nextafter([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) target); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) nextafter([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) target); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) nextafter([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) target); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the next representable floating point number from v towards target.

In rs_fp_relaxed mode, a denormalized input value may not yield the next denormalized
value, as support of denormalized values is optional in relaxed mode.  

#### pow
: Base raised to an exponent

|---|---|
| float pow(float base, float exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) pow([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) base, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) pow([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) base, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) pow([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) base, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exponent); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) pow([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) base, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) pow([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) base, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) pow([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) base, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) pow([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) base, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns base raised to the power exponent, i.e. base \^ exponent.

[pown](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pown)() and [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr)() are similar. [pown](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pown)() takes an integer exponent. [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr)() assumes the
base to be non-negative.  

#### pown
: Base raised to an integer exponent

|---|---|
| float pown(float base, int exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) pown([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) base, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) pown([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) base, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) pown([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) base, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) exponent); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) pown([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) base, int exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) pown([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) base, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) pown([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) base, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) pown([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) base, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns base raised to the power exponent, i.e. base \^ exponent.

[pow](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pow)() and [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr)() are similar. The both take a float exponent. [powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:powr)() also assumes the
base to be non-negative.  

#### powr
: Positive base raised to an exponent

|---|---|
| float powr(float base, float exponent); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) powr([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) base, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) exponent); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) powr([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) base, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) exponent); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) powr([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) base, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) exponent); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) powr([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) base, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) powr([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) base, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) powr([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) base, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) powr([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) base, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) exponent); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns base raised to the power exponent, i.e. base \^ exponent. base must be \>= 0.

[pow](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pow)() and [pown](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pown)() are similar. They both make no assumptions about the base.
[pow](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pow)() takes a float exponent while [pown](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:pown)() take an integer.

See also [native_powr](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_powr)().  

#### radians
: Converts degrees into radians

|---|---|
| float radians(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) radians([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) radians([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) radians([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) radians([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) radians([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) radians([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) radians([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Converts from degrees to radians.  

#### remainder
: Remainder of a division

|---|---|
| float remainder(float numerator, float denominator); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) remainder([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) remainder([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) remainder([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) remainder([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) remainder([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) remainder([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) remainder([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the remainder of (numerator / denominator), where the quotient is rounded towards
the nearest integer.

The function [fmod](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fmod)() is similar but rounds toward the closest integer.
For example, [fmod](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fmod)`(-3.8f, 2.f)` returns -1.8f (-3.8f - -1.f \* 2.f)
while `remainder(-3.8f, 2.f)` returns 0.2f (-3.8f - -2.f \* 2.f).  

#### remquo
: Remainder and quotient of a division

|---|---|
| float remquo(float numerator, float denominator, int\* quotient); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) remquo([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) numerator, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) denominator, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* quotient); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) remquo([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) numerator, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) denominator, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* quotient); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) remquo([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) numerator, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) denominator, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* quotient); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) remquo([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) numerator, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) denominator, int\* quotient); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) remquo([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) numerator, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) denominator, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2)\* quotient); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) remquo([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) numerator, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) denominator, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3)\* quotient); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) remquo([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) numerator, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) denominator, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4)\* quotient); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| numerator | Numerator. |
| denominator | Denominator. |
| quotient | \*quotient will be set to the integer quotient. |
|---|---|

##### Returns

|---|
| Remainder, precise only for the low three bits. |

Returns the quotient and the remainder of (numerator / denominator).

Only the sign and lowest three bits of the quotient are guaranteed to be accurate.

This function is useful for implementing periodic functions. The low three bits of the
quotient gives the quadrant and the remainder the distance within the quadrant.
For example, an implementation of [sin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:sin)(x) could call `remquo(x, PI / 2.f, &quadrant)`
to reduce very large value of x to something within a limited range.

Example: `remquo(-23.5f, 8.f, &quot)` sets the lowest three bits of quot to 3
and the sign negative. It returns 0.5f.  

#### rint
: Round to even

|---|---|
| float rint(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) rint([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) rint([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) rint([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) rint([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) rint([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) rint([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) rint([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Rounds to the nearest integral value.

rint() rounds half values to even. For example, `rint(0.5f)` returns 0.f and
`rint(1.5f)` returns 2.f. Similarly, `rint(-0.5f)` returns -0.f and
`rint(-1.5f)` returns -2.f.

[round](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:round)() is similar but rounds away from zero. [trunc](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:trunc)() truncates the decimal fraction.  

#### rootn
: Nth root

|---|---|
| float rootn(float v, int n); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) rootn([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) n); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) rootn([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) n); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) rootn([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) n); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) rootn([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, int n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) rootn([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [int2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int2) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) rootn([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [int3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int3) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) rootn([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [int4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:int4) n); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Compute the Nth root of a value.

See also [native_rootn](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_rootn)().  

#### round
: Round away from zero

|---|---|
| float round(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) round([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) round([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) round([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) round([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) round([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) round([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) round([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Round to the nearest integral value.

round() rounds half values away from zero. For example, `round(0.5f)` returns 1.f
and `round(1.5f)` returns 2.f. Similarly, `round(-0.5f)` returns -1.f
and `round(-1.5f)` returns -2.f.

[rint](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rint)() is similar but rounds half values toward even. [trunc](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:trunc)() truncates the decimal fraction.  

#### rsClamp
: Restrain a value to a range

|---|---|
| char rsClamp(char amount, char low, char high); |   |
| int rsClamp(int amount, int low, int high); |   |
| short rsClamp(short amount, short low, short high); |   |
| [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) rsClamp([uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) amount, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) low, [uchar](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uchar) high); |   |
| [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) rsClamp([uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) amount, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) low, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) high); |   |
| [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) rsClamp([ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) amount, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) low, [ushort](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:ushort) high); |   |

##### Parameters

| amount | Value to clamp. |
| low | Lower bound. |
| high | Upper bound. |
|---|---|

**Deprecated.** Use [clamp](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:clamp)() instead.

Clamp a value between low and high.  

#### rsFrac
: Returns the fractional part of a float

|---|---|
| float rsFrac(float v); |   |

**Deprecated.** Use [fract](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:fract)() instead.

Returns the fractional part of a float  

#### rsRand
: Pseudo-random number

|---|---|
| float rsRand(float max_value); |   |
| float rsRand(float min_value, float max_value); |   |
| int rsRand(int max_value); |   |
| int rsRand(int min_value, int max_value); |   |

Return a random value between 0 (or min_value) and max_malue.  

#### rsqrt
: Reciprocal of a square root

|---|---|
| float rsqrt(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) rsqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) rsqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) rsqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) rsqrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) rsqrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) rsqrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) rsqrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns (1 / sqrt(v)).

See also [half_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_rsqrt)(), [native_rsqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_rsqrt)().  

#### sign
: Sign of a value

|---|---|
| float sign(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sign([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sign([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sign([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sign([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sign([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sign([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sign([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the sign of a value.

if (v \< 0) return -1.f;
else if (v \> 0) return 1.f;
else return 0.f;  

#### sin
: Sine

|---|---|
| float sin(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sin([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sin([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sin([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sin([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sin([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sin([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sin([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the sine of an angle measured in radians.

See also [native_sin](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sin)().  

#### sincos
: Sine and cosine

|---|---|
| float sincos(float v, float\* cos); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sincos([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2)\* cos); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sincos([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3)\* cos); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sincos([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4)\* cos); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sincos([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sincos([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sincos([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sincos([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4)\* cos); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| v | Incoming value in radians. |
| cos | \*cos will be set to the cosine value. |
|---|---|

##### Returns

|---|
| Sine of v. |

Returns the sine and cosine of a value.

See also [native_sincos](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sincos)().  

#### sinh
: Hyperbolic sine

|---|---|
| float sinh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sinh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sinh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sinh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sinh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sinh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sinh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sinh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the hyperbolic sine of v, where v is measured in radians.

See also [native_sinh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sinh)().  

#### sinpi
: Sine of a number multiplied by pi

|---|---|
| float sinpi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sinpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sinpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sinpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sinpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sinpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sinpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sinpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the sine of (v \* pi), where (v \* pi) is measured in radians.

To get the sine of a value measured in degrees, call `sinpi(v / 180.f)`.

See also [native_sinpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sinpi)().  

#### sqrt
: Square root

|---|---|
| float sqrt(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) sqrt([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) sqrt([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) sqrt([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) sqrt([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) sqrt([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) sqrt([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) sqrt([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the square root of a value.

See also [half_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:half_sqrt)(), [native_sqrt](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_sqrt)().  

#### step
: 0 if less than a value, 1 otherwise

|---|---|
| float step(float edge, float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) step(float edge, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) step([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) edge, float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) step([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) edge, [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) step(float edge, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) step([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) edge, float v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) step([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) edge, [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) step(float edge, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); | Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) step([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) edge, float v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) step([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) edge, [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) step([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) edge, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) step([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) edge, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) step([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) edge, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) step([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) edge, [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) step([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) edge, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) step([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) edge, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) step([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) edge, [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) step([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) edge, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) step([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) edge, [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) step([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) edge, [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns 0.f if v \< edge, 1.f otherwise.

This can be useful to create conditional computations without using loops and branching
instructions. For example, instead of computing `(a[i] < b[i]) ? 0.f : `[atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2)`(a[i], b[i])`
for the corresponding elements of a vector, you could instead use `step(a, b) * `[atan2](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:atan2)`(a, b)`.  

#### tan
: Tangent

|---|---|
| float tan(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) tan([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) tan([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) tan([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) tan([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) tan([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) tan([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) tan([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the tangent of an angle measured in radians.

See also [native_tan](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tan)().  

#### tanh
: Hyperbolic tangent

|---|---|
| float tanh(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) tanh([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) tanh([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) tanh([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) tanh([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) tanh([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) tanh([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) tanh([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the hyperbolic tangent of a value.

See also [native_tanh](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tanh)().  

#### tanpi
: Tangent of a number multiplied by pi

|---|---|
| float tanpi(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) tanpi([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) tanpi([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) tanpi([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) tanpi([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) tanpi([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) tanpi([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) tanpi([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the tangent of (v \* pi), where (v \* pi) is measured in radians.

To get the tangent of a value measured in degrees, call `tanpi(v / 180.f)`.

See also [native_tanpi](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:native_tanpi)().  

#### tgamma
: Gamma function

|---|---|
| float tgamma(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) tgamma([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) tgamma([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) tgamma([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) tgamma([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) tgamma([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) tgamma([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) tgamma([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Returns the gamma function of a value.

See also [lgamma](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:lgamma)().  

#### trunc
: Truncates a floating point

|---|---|
| float trunc(float v); |   |
| [float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) trunc([float2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float2) v); |   |
| [float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) trunc([float3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float3) v); |   |
| [float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) trunc([float4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:float4) v); |   |
| [half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) trunc([half](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) trunc([half2](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half2) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) trunc([half3](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half3) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |
| [half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) trunc([half4](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:half4) v); | Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

Rounds to integral using truncation.

For example, `trunc(1.7f)` returns 1.f and `trunc(-1.7f)` returns -1.f.

See [rint](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:rint)() and [round](https://developer.android.com/guide/topics/renderscript/reference/rs_math#android_rs:round)() for other rounding options.