Binary logarithm implementation. \param arg function argument \return function value stored in single-preicision
| 1429 | /// \param arg function argument |
| 1430 | /// \return function value stored in single-preicision |
| 1431 | static expr log2(float arg) |
| 1432 | { |
| 1433 | #if HALF_ENABLE_CPP11_CMATH |
| 1434 | return expr(std::log2(arg)); |
| 1435 | #else |
| 1436 | return expr(static_cast<float>(std::log(static_cast<double>(arg))*1.4426950408889634073599246810019)); |
| 1437 | #endif |
| 1438 | } |
| 1439 | |
| 1440 | /// Square root implementation. |
| 1441 | /// \param arg function argument |