diff options
| author | Aaron Watry <awatry@gmail.com> | 2014-09-10 15:43:32 +0000 |
|---|---|---|
| committer | Aaron Watry <awatry@gmail.com> | 2014-09-10 15:43:32 +0000 |
| commit | 951ab64d19f275445b18ac6751e8f64f63866f82 (patch) | |
| tree | fd4e44bdf4906164ff74a713927f1a8570577ffb /libclc/generic/include/clc/math/asin.h | |
| parent | 268beab921232abb652b18eea3aef021dc29a518 (diff) | |
| download | bcm5719-llvm-951ab64d19f275445b18ac6751e8f64f63866f82.tar.gz bcm5719-llvm-951ab64d19f275445b18ac6751e8f64f63866f82.zip | |
math: Add asin implementation
asin(x) = atan2(x, sqrt( 1-x^2 ))
alternatively:
asin(x) = PI/2 - acos(x)
Use the atan2 implementation since it produces slightly shorter bitcode and
R600 machine code.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 217510
Diffstat (limited to 'libclc/generic/include/clc/math/asin.h')
| -rw-r--r-- | libclc/generic/include/clc/math/asin.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/math/asin.h b/libclc/generic/include/clc/math/asin.h new file mode 100644 index 00000000000..2a858721e95 --- /dev/null +++ b/libclc/generic/include/clc/math/asin.h @@ -0,0 +1,2 @@ +#define __CLC_BODY <clc/math/asin.inc> +#include <clc/math/gentype.inc> |

