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

Method frexp

extern/half/include/half.hpp:1688–1695  ·  view source on GitHub ↗

Decompression implementation. \param arg number to decompress \param exp address to store exponent at \return normalized significant

Source from the content-addressed store, hash-verified

1686 /// \param exp address to store exponent at
1687 /// \return normalized significant
1688 static half frexp(half arg, int *exp)
1689 {
1690 int m = arg.data_ & 0x7FFF, e = -14;
1691 if(m >= 0x7C00 || !m)
1692 return *exp = 0, arg;
1693 for(; m<0x400; m<<=1,--e) ;
1694 return *exp = e+(m>>10), half(binary, (arg.data_&0x8000)|0x3800|(m&0x3FF));
1695 }
1696
1697 /// Decompression implementation.
1698 /// \param arg number to decompress

Callers

nothing calls this directly

Calls 1

halfClass · 0.70

Tested by

no test coverage detected