Automatic Differentiation
 
Loading...
Searching...
No Matches
logit.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_LOGIT_HPP
2#define STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_LOGIT_HPP
3#ifdef STAN_OPENCL
4
6#include <string>
7
8namespace stan {
9namespace math {
10namespace opencl_kernels {
11
12// \cond
13static constexpr const char* logit_device_function
14 = "\n"
15 "#ifndef STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_LOGIT\n"
16 "#define STAN_MATH_OPENCL_KERNELS_DEVICE_FUNCTIONS_LOGIT\n" STRINGIFY(
17 // \endcond
52 double logit(double x) { return log(x) - log1m(x); }
53 // \cond
54 ) "\n#endif\n"; // NOLINT
55// \endcond
56
57} // namespace opencl_kernels
58} // namespace math
59} // namespace stan
60
61#endif
62#endif
double log1m(double a)
Calculates the natural logarithm of one minus the specified value.
Definition log1m.hpp:28
double logit(double x)
Return the log odds applied to the kernel generator expression.
Definition logit.hpp:52
fvar< T > log(const fvar< T > &x)
Definition log.hpp:15
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
#define STRINGIFY(...)
Definition stringify.hpp:9