Binary logarithm implementation. \param arg function argument \return function value stored in single-preicision
| 1826 | /// \param arg function argument |
| 1827 | /// \return function value stored in single-preicision |
| 1828 | static expr log2(float arg) |
| 1829 | { |
| 1830 | #if HALF_ENABLE_CPP11_CMATH |
| 1831 | return expr(std::log2(arg)); |
| 1832 | #else |
| 1833 | return expr(static_cast<float>(std::log(static_cast<double>(arg)) * 1.4426950408889634073599246810019)); |
| 1834 | #endif |
| 1835 | } |
| 1836 | |
| 1837 | /// Square root implementation. |
| 1838 | /// \param arg function argument |