|
inlineconstexpr |
Parameters
x, y: floating values.c: Conditional expression masking the operation.m: Logical value masking the operation.Return value
x and y are both zero or infinites, Nan is returned (this is not standard conforming)y is \(\pm0\) and x is strictly negative or \(-0\), \(\pm\pi\) is returnedy is \(\pm0\) and x is strictly positive or \(+0\), \(\pm0\) is returnedy is \(\pm\infty\) and x is finite, \(\pm\frac\pi2\) is returnedx is \(\pm0\) and y is strictly negative, \(-\frac\pi2\) is returnedx is \(\pm0\) and y is strictly positive, \(+\frac\pi2\) is returnedx is \(-\infty\) and y is finite and positive, \(+\pi\) is returnedx is \(-\infty\) and y is finite and negative, \(-\pi\) is returnedx is \(+\infty\) and y is finite and positive, \(+0\) is returnedx is \(+\infty\) and y is finite and negative, \(-0\) is returnedx is Nan or y is Nan, Nan is returnedThe call will return a NaN if x and y are both either null or infinite: this result is not IEEE conformant, but allows to simplify (and speed) the implementation. In all other cases, the result is standard conformant.
y is \(\pm\infty\) and x is \(-\infty\), \(\pm\frac{3\pi}4\) is returnedy is \(\pm\infty\) and x is \(+\infty\), \(\pm\frac{\pi}4\) is returnedx is \(\pm0\) and y is \(\pm-0\), \(-\frac\pi2\) is returnedx is \(\pm0\) and y is \(\pm+0\), \(+\frac\pi2\) is returned