MCPcopy Create free account
hub / github.com/apache/singa / tangent_post

Function tangent_post

include/half.hpp:1767–1777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1765 /// \exception FE_UNDERFLOW on underflows
1766 /// \exception FE_INEXACT if no other exception occurred
1767 template<std::float_round_style R> unsigned int tangent_post(uint32 my, uint32 mx, int exp, unsigned int sign = 0)
1768 {
1769 int i = my >= mx, s;
1770 exp += i;
1771 if(exp > 29)
1772 return overflow<R>(sign);
1773 if(exp < -11)
1774 return underflow<R>(sign);
1775 uint32 m = divide64(my>>(i+1), mx, s);
1776 return fixed2half<R,30,false,false,true>(m, exp, sign, s);
1777 }
1778
1779 /// Area function and postprocessing.
1780 /// This computes the value directly in Q2.30 using the representation `asinh|acosh(x) = log(x+sqrt(x^2+|-1))`.

Callers

nothing calls this directly

Calls 1

divide64Function · 0.85

Tested by

no test coverage detected