\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Alberto Marchetti (cmaster11)} \pdfinfo{ /Title (renderscript-math-functions.pdf) /Creator (Cheatography) /Author (Alberto Marchetti (cmaster11)) /Subject (RenderScript Math Functions Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{FF4328} \definecolor{LightBackground}{HTML}{FFF3F1} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{RenderScript Math Functions Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Alberto Marchetti (cmaster11)} via \textcolor{DarkBackground}{\uline{cheatography.com/26309/cs/7330/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Alberto Marchetti (cmaster11) \\ \uline{cheatography.com/cmaster11} \\ \uline{\seqsplit{hydex11}.net} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 12th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Intrinsic math functions}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{RenderScript provides a lot of intrinsic math functions, which are optimized using NEON instructions (on ARMv7 devices). These functions should be used instead of writing pure calculations when possible. \newline % Row Count 5 (+ 5) For example, `a * b + c` should be translated into `fma(a, b, c)`. \newline % Row Count 7 (+ 2) {\bf{Note: }} functions' arguments are assumed to be of type that matches function's return one. Otherwise, different type is specified.% Row Count 10 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Following functions have been taken directly from \{\{link="https://android.googlesource.com/platform/frameworks/rs/+/marshmallow-mr1-release/api/rs\_math.spec"\}\}Android source code\{\{/link\}\}.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 1)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Definition}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `acos(v)` & Inverse cosine \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `acosh(v)` & Inverse hyperbolic cosine \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} `acospi(v)` & Inverse cosine divided by pi \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} `asin(v)` & Inverse sine \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} `asinh(v)` & Inverse hyperbolic sine \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} `asinpi(v)` & Inverse sine divided by pi \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} `atan(v)` & Inverse tangent \tn % Row Count 11 (+ 1) % Row 8 \SetRowColor{LightBackground} `atan2(num, den)` & Inverse tangent of a ratio \tn % Row Count 13 (+ 2) % Row 9 \SetRowColor{white} `atan2pi(num, den)` & Inverse tangent of a ratio, divided by pi \tn % Row Count 15 (+ 2) % Row 10 \SetRowColor{LightBackground} `atanh(v)` & Inverse hyperbolic tangent \tn % Row Count 17 (+ 2) % Row 11 \SetRowColor{white} `atanpi(v)` & Inverse tangent divided by pi \tn % Row Count 19 (+ 2) % Row 12 \SetRowColor{LightBackground} `cbrt(v)` & Cube root \tn % Row Count 20 (+ 1) % Row 13 \SetRowColor{white} `ceil(v)` & Smallest integer not less than a value \tn % Row Count 22 (+ 2) % Row 14 \SetRowColor{LightBackground} `clamp(value, min, max)` & Restrain a value to a range \tn % Row Count 24 (+ 2) % Row 15 \SetRowColor{white} \seqsplit{`copysign(magnitude}, sign)` & Copies the sign of a number to another. `copysign(4.0f, -2.7f)` returns `-4.0f` \tn % Row Count 28 (+ 4) % Row 16 \SetRowColor{LightBackground} `cos(v)` & Cosine \tn % Row Count 29 (+ 1) % Row 17 \SetRowColor{white} `cosh(v)` & Hypebolic cosine \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 1) (cont)}} \tn % Row 18 \SetRowColor{LightBackground} `cospi(v)` & Cosine of a number multiplied by pi \tn % Row Count 2 (+ 2) % Row 19 \SetRowColor{white} `degrees(v)` & Converts radians into degrees \tn % Row Count 4 (+ 2) % Row 20 \SetRowColor{LightBackground} `erf(v)` & Mathematical error function \tn % Row Count 6 (+ 2) % Row 21 \SetRowColor{white} `erfc(v)` & Mathematical complementary error function \tn % Row Count 8 (+ 2) % Row 22 \SetRowColor{LightBackground} `exp(v)` & {\emph{e}} raised to a number \tn % Row Count 9 (+ 1) % Row 23 \SetRowColor{white} `exp10(v)` & 10 raised to a number \tn % Row Count 10 (+ 1) % Row 24 \SetRowColor{LightBackground} `exp2(v)` & 2 raised to a number \tn % Row Count 11 (+ 1) % Row 25 \SetRowColor{white} `expm1(v)` & {\emph{e}} raised to a number minus one: `(e \textasciicircum{} v) - 1` \tn % Row Count 13 (+ 2) % Row 26 \SetRowColor{LightBackground} `fabs(v)` & Absolute value of a float \tn % Row Count 15 (+ 2) % Row 27 \SetRowColor{white} `fdim(a, b)` & Positive difference between two values. If `a \textgreater{} b`, returns `(a - b)` otherwise returns `0f` \tn % Row Count 19 (+ 4) % Row 28 \SetRowColor{LightBackground} `floor(v)` & Smallest integer not greater than a value/ `(multiplicand1 * multiplicand2) + offset` \tn % Row Count 23 (+ 4) % Row 29 \SetRowColor{white} `fma(mul1, mul2, offset)` & Multiply and add \tn % Row Count 25 (+ 2) % Row 30 \SetRowColor{LightBackground} `fmax(a, b)` & Maximum of two floats \tn % Row Count 26 (+ 1) % Row 31 \SetRowColor{white} `fmin(a, b)` & Minimum of two floats \tn % Row Count 27 (+ 1) % Row 32 \SetRowColor{LightBackground} `fmod(num, den)` & Modulo \tn % Row Count 28 (+ 1) % Row 33 \SetRowColor{white} `fract(v, float* floor)` & Positive fractional part. `fract(2.3f, \&val)` returns `0.3f` and sets val to `2.f` \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 1) (cont)}} \tn % Row 34 \SetRowColor{LightBackground} `frexp(v, int* exponent)` & Binary mantissa and exponent \tn % Row Count 2 (+ 2) % Row 35 \SetRowColor{white} `half\_recip(v)` & Reciprocal computed to 16 bit precision \tn % Row Count 4 (+ 2) % Row 36 \SetRowColor{LightBackground} `half\_rsqrt(v)` & Reciprocal of a square root computed to 16 bit precision \tn % Row Count 7 (+ 3) % Row 37 \SetRowColor{white} `half\_sqrt(v)` & Square root computed to 16 bit precision \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.96117 cm} x{1.46464 cm} x{2.15119 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Predefined constants}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Type}} & {\bf{Name}} & {\bf{Value}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `float` & `M\_PI` & `3.141592... (pi)` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `float` & `M\_PI\_2` & `M\_PI / 2` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `float` & `M\_PI\_4` & `M\_PI / 4` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} `float` & `M\_1\_PI` & `1 / M\_PI` \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} `float` & `M\_2\_PI` & `2 / M\_PI` \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} `float` & \seqsplit{`M\_2\_SQRTPI`} & `2 / sqrt(M\_PI)` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} `float` & `M\_SQRT2` & `sqrt(2)` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} `float` & `M\_E` & `2.718281... (e)` \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} `float` & `M\_LN10` & `log\_e(10)` \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} `float` & `M\_LN2` & `log\_e(2)` \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} `float` & `M\_LOG10E` & `log\_10(M\_E)` \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} `float` & `M\_LOG2E` & `log\_2(M\_E)` \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} `float` & `M\_SQRT1\_2` & `1 / sqrt(2)` \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 2)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Definition}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `hypot(a, b)` & Hypotenuse \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `ldexp(mantissa, int exponent)` & Creates a floating point from mantissa and exponent. `mantissa * 2 \textasciicircum{} exponent` \tn % Row Count 6 (+ 4) % Row 3 \SetRowColor{white} `lgamma(v)` & Natural logarithm of the gamma function \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} `lgamma(v, int* \seqsplit{sign\_of\_gamma)`} & Natural logarithm of the gamma function. 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` \tn % Row Count 16 (+ 8) % Row 5 \SetRowColor{white} `log(v)` & Natural logarithm \tn % Row Count 17 (+ 1) % Row 6 \SetRowColor{LightBackground} `log10(v)` & Base 10 logarithm \tn % Row Count 18 (+ 1) % Row 7 \SetRowColor{white} `log1p(v)` & Natural logarithm of a value plus 1 \tn % Row Count 20 (+ 2) % Row 8 \SetRowColor{LightBackground} `log2(v)` & Base 2 logarithm \tn % Row Count 21 (+ 1) % Row 9 \SetRowColor{white} `logb(v)` & Base two exponent. `logb(8.5f)` returns `3.f` \tn % Row Count 24 (+ 3) % Row 10 \SetRowColor{LightBackground} `mad(mul1, mul2, offset)` & Multiply and add \tn % Row Count 26 (+ 2) % Row 11 \SetRowColor{white} `max(a, b)` & Maximum \tn % Row Count 27 (+ 1) % Row 12 \SetRowColor{LightBackground} `min(a, b)` & Minimum \tn % Row Count 28 (+ 1) % Row 13 \SetRowColor{white} `modf(v, float* integral\_part)` & Integral and fractional components. `modf(-3.72f)` will return `0.72f` and `integral\_part` will be set to `-3.f` \tn % Row Count 34 (+ 6) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 2) (cont)}} \tn % Row 14 \SetRowColor{LightBackground} `nan(uint v)` & Returns NaN \tn % Row Count 1 (+ 1) % Row 15 \SetRowColor{white} `nextafter(v, target)` & Next representable floating point number from v towards target \tn % Row Count 4 (+ 3) % Row 16 \SetRowColor{LightBackground} `pow(base, exp)` & Base raised to an exponent \tn % Row Count 6 (+ 2) % Row 17 \SetRowColor{white} `pown(base, int expt)` & Base raised to an integer exponent \tn % Row Count 8 (+ 2) % Row 18 \SetRowColor{LightBackground} `powr(base, exp)` & Positive base raised to an exponent \tn % Row Count 10 (+ 2) % Row 19 \SetRowColor{white} `radians(v)` & Converts degrees into radians \tn % Row Count 12 (+ 2) % Row 20 \SetRowColor{LightBackground} `remainder(num, den)` & Remainder of a division \tn % Row Count 14 (+ 2) % Row 21 \SetRowColor{white} `remquo(num, int* quotient)` & Remainder and quotient of a division \tn % Row Count 16 (+ 2) % Row 22 \SetRowColor{LightBackground} `rint(v)` & Round to even \tn % Row Count 17 (+ 1) % Row 23 \SetRowColor{white} `rootn(v, int n)` & Nth root \tn % Row Count 18 (+ 1) % Row 24 \SetRowColor{LightBackground} `round(v)` & Round away from zero \tn % Row Count 19 (+ 1) % Row 25 \SetRowColor{white} `rsqrt(v)` & Reciprocal of a square root \tn % Row Count 21 (+ 2) % Row 26 \SetRowColor{LightBackground} `sign(v)` & Sign of a value \tn % Row Count 22 (+ 1) % Row 27 \SetRowColor{white} `sin(v)` & Sine \tn % Row Count 23 (+ 1) % Row 28 \SetRowColor{LightBackground} `sincos(v, float* cos)` & Sine and cosine \tn % Row Count 25 (+ 2) % Row 29 \SetRowColor{white} `sinh(v)` & Hyperbolic sine \tn % Row Count 26 (+ 1) % Row 30 \SetRowColor{LightBackground} `sinpi(v)` & Sine of a number multiplied by pi \tn % Row Count 28 (+ 2) % Row 31 \SetRowColor{white} `sqrt(v)` & Square root \tn % Row Count 29 (+ 1) % Row 32 \SetRowColor{LightBackground} `step(edge, v)` & Returns `0.f` if `v \textless{} edge`, `1.f` otherwise \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Float functions (part 2) (cont)}} \tn % Row 33 \SetRowColor{LightBackground} `tan(v)` & Tangent \tn % Row Count 1 (+ 1) % Row 34 \SetRowColor{white} `tanh(v)` & Hyperbolic tangent \tn % Row Count 2 (+ 1) % Row 35 \SetRowColor{LightBackground} `tanpi(v)` & Tangent of a number multiplied by pi \tn % Row Count 4 (+ 2) % Row 36 \SetRowColor{white} `tgamma(v)` & Gamma function \tn % Row Count 5 (+ 1) % Row 37 \SetRowColor{LightBackground} `trunc(v)` & Truncates a floating point \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Integer functions (return `int`)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Definition}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `abs(v)` & Absolute value of an integer \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} `clamp(value, min, max)` & Restrain a value to a range ({\emph{min API 19}}) \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} `clz(value)` & Number of leading 0 bits \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} `ilogb(float v)` & Base two exponent \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} `max(a, b)` & Maximum value of two arguments \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} `min(a, b)` & Minimum value of two arguments \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} `rsRand(max)` & Pseudo-random number \tn % Row Count 13 (+ 1) % Row 8 \SetRowColor{LightBackground} `rsRand(min, max)` & Pseudo-random number \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Approximate float functions (`API \textgreater{}= 21`)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Following functions have stricter limits than precise ones. Please refer to \{\{link="https://android.googlesource.com/platform/frameworks/rs/+/marshmallow-mr1-release/api/rs\_math.spec"\}\}specs\{\{/link\}\} to see them.\{\{bb\}\}} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} {\bf{Definition}} & {\bf{Description}} \tn % Row Count 6 (+ 1) % Row 2 \SetRowColor{LightBackground} `native\_log2(v)` & Approximate base 2 logarithm (API 18) \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{`native\_powr(base}, exp)` & Approximate positive base raised to an exponent (API 18) \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} `native\_acos(v)` & Approximate inverse cosine \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{`native\_acosh(v)`} & Approximate inverse hyperbolic cosine \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{`native\_acospi(v)`} & Approximate inverse cosine divided by pi \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} `native\_asin(v)` & Approximate inverse sine \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{`native\_asinh(v)`} & Approximate inverse hyperbolic sine \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} \seqsplit{`native\_asinpi(v)`} & Approximate inverse sine divided by pi \tn % Row Count 23 (+ 2) % Row 10 \SetRowColor{LightBackground} `native\_atan(v)` & Approximate inverse tangent \tn % Row Count 25 (+ 2) % Row 11 \SetRowColor{white} \seqsplit{`native\_atan2(num}, den)` & Approximate inverse tangent of a ratio \tn % Row Count 27 (+ 2) % Row 12 \SetRowColor{LightBackground} \seqsplit{`native\_atan2pi(num}, den)` & Approximate inverse tangent of a ratio, divided by pi \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Approximate float functions (`API \textgreater{}= 21`) (cont)}} \tn % Row 13 \SetRowColor{LightBackground} \seqsplit{`native\_atanh(v)`} & Approximate inverse hyperbolic tangent \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} \seqsplit{`native\_atanpi(v)`} & Approximate inverse tangent divided by pi \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} `native\_cbrt(v)` & Approximate cube root \tn % Row Count 5 (+ 1) % Row 16 \SetRowColor{white} `native\_cos(v)` & Approximate cosine \tn % Row Count 6 (+ 1) % Row 17 \SetRowColor{LightBackground} `native\_cosh(v)` & Approximate hypebolic cosine \tn % Row Count 8 (+ 2) % Row 18 \SetRowColor{white} \seqsplit{`native\_cospi(v)`} & Approximate cosine of a number multiplied by pi \tn % Row Count 11 (+ 3) % Row 19 \SetRowColor{LightBackground} \seqsplit{`native\_divide(left}, right)` & Approximate division \tn % Row Count 13 (+ 2) % Row 20 \SetRowColor{white} `native\_exp(v)` & Approximate e raised to a number \tn % Row Count 15 (+ 2) % Row 21 \SetRowColor{LightBackground} \seqsplit{`native\_exp10(v)`} & Approximate 10 raised to a number \tn % Row Count 17 (+ 2) % Row 22 \SetRowColor{white} `native\_exp2(v)` & Approximate 2 raised to a number \tn % Row Count 19 (+ 2) % Row 23 \SetRowColor{LightBackground} \seqsplit{`native\_expm1(v)`} & Approximate e raised to a number minus one \tn % Row Count 21 (+ 2) % Row 24 \SetRowColor{white} `native\_hypot(a, b)` & Approximate hypotenuse \tn % Row Count 23 (+ 2) % Row 25 \SetRowColor{LightBackground} `native\_log(v)` & Approximate natural logarithm \tn % Row Count 25 (+ 2) % Row 26 \SetRowColor{white} \seqsplit{`native\_log10(v)`} & Approximate base 10 logarithm \tn % Row Count 27 (+ 2) % Row 27 \SetRowColor{LightBackground} \seqsplit{`native\_log1p(v)`} & Approximate natural logarithm of a value plus 1 \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Approximate float functions (`API \textgreater{}= 21`) (cont)}} \tn % Row 28 \SetRowColor{LightBackground} \seqsplit{`native\_recip(v)`} & Approximate reciprocal \tn % Row Count 1 (+ 1) % Row 29 \SetRowColor{white} `native\_rootn(v, int n)` & Approximate nth root \tn % Row Count 3 (+ 2) % Row 30 \SetRowColor{LightBackground} \seqsplit{`native\_rsqrt(v)`} & Approximate reciprocal of a square root \tn % Row Count 5 (+ 2) % Row 31 \SetRowColor{white} `native\_sin(v)` & Approximate sine \tn % Row Count 6 (+ 1) % Row 32 \SetRowColor{LightBackground} \seqsplit{`native\_sincos(v}, float* cos);` & Approximate sine and cosine \tn % Row Count 8 (+ 2) % Row 33 \SetRowColor{white} `native\_sinh(v)` & Approximate hyperbolic sine \tn % Row Count 10 (+ 2) % Row 34 \SetRowColor{LightBackground} \seqsplit{`native\_sinpi(v)`} & Approximate sine of a number multiplied by pi \tn % Row Count 13 (+ 3) % Row 35 \SetRowColor{white} `native\_sqrt(v)` & Approximate square root \tn % Row Count 15 (+ 2) % Row 36 \SetRowColor{LightBackground} `native\_tan(v)` & Approximate tangent \tn % Row Count 16 (+ 1) % Row 37 \SetRowColor{white} `native\_tanh(v)` & Approximate hyperbolic tangent \tn % Row Count 18 (+ 2) % Row 38 \SetRowColor{LightBackground} \seqsplit{`native\_tanpi(v)`} & Approximate tangent of a number multiplied by pi \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}