lgamma, lgamma_r
lgamma, lgamma_r
2007-2011 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
3
lgamma, lgamma_r Log gamma functions.

##

gentype `lgamma` gentypex floatn `lgamma_r` floatn x __global intn *signp floatn `lgamma_r` floatn x __local intn *signp floatn `lgamma_r` floatn x __private intn *signp float `lgamma_r` float x __global int *signp float `lgamma_r` float x __local int *signp float `lgamma_r` float x __private int *signp doublen `lgamma_r` doublen x __global intn *signp doublen `lgamma_r` doublen x __local intn *signp doublen `lgamma_r` doublen x __private intn *signp double `lgamma_r` double x __global int *signp double `lgamma_r` double x __local int *signp double `lgamma_r` double x __private int *signp halfn `lgamma_r` halfn x __global intn *signp halfn `lgamma_r` halfn x __local intn *signp halfn `lgamma_r` halfn x __private intn *signp half `lgamma_r` half x __global int *signp half `lgamma_r` half x __local int *signp half `lgamma_r` half x __private int *signp

## Description

Returns the natural logarithm of the absolute value of the gamma function. The sign of the gamma function is returned in the `signp` argument of the `lgamma_r`.

An application that wants to use half and halfn types will need to include the `#pragma OPENCL EXTENSION cl_khr_fp16 : enable` directive. If extended with cl_khr_fp16, generic type name gentype also includes half and half{2|3|4|8|16}.

## Notes

&mathFunctionsInc;

## Specification

OpenCL Specification

## Also see

Math Functions

##