MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / log2

Method log2

extern/half/include/half.hpp:1431–1438  ·  view source on GitHub ↗

Binary logarithm implementation. \param arg function argument \return function value stored in single-preicision

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

exprClass · 0.85
log2Function · 0.85
logFunction · 0.85

Tested by

no test coverage detected