1 #ifndef DataFormatsMathAPPROX_ATAN2_H 2 #define DataFormatsMathAPPROX_ATAN2_H 47 return x * (
float(-0xf.8eed2p-4) +
x*
x *
float(0x3.1238p-4)) ;
53 return x * (
float(-0xf.ecfc8p-4) +
z * (
float(0x4.9e79dp-4) +
z *
float(-0
x1.44f924p-4) ) );
83 return x * (
float(-0xf.ffff4p-4) +
z * (
float(0x5.552f9p-4 +
z * (
float(-0x3.30f728p-4) +
z * (
float(0
x2.39826p-4) +
z * (
float(-0
x1.8a880cp-4) +
z * (
float(0xe.484d6p-8) +
z * (
float(-0x5.93d5p-8) +
z *
float(0
x1.0875dcp-8)))))))));
90 constexpr float pi4f = 3.1415926535897932384626434/4;
91 constexpr float pi34f = 3.1415926535897932384626434*3/4;
96 auto angle = (x>=0) ? pi4f : pi34f;
97 angle += approx_atan2f_P<DEGREE>(
r);
106 return unsafe_atan2f_impl<DEGREE>(
y,
x);
113 return unsafe_atan2f_impl<DEGREE>(
y, (y==0.f)&(x==0.
f) ? 0.2f :
x);
132 return x * (-664694912.f +
z * 131209024.f);
138 return x * (-680392064.f +
z * (197338400.f +
z * (-54233256.f)));
144 return x * (-683027840.f +
z * (219543904.f +
z * (-99981040.f +
z * 26649684.f)));
150 return x * (-683473920.f +
z * (225785056.f +
z * (-123151184.f +
z * (58210592.f +
z * (-14249276.f)))));
156 return x * (-683549696.f +
z * (227369312.f +
z * (-132297008.f +
z * (79584144.f +
z * (-35987016.f +
z * 8010488.f)))));
162 return x * (-683562624.f +
z * (227746080.f +
z * (-135400128.f +
z * (90460848.f +
z * (-54431464.f +
z * (22973256.f +
z * (-4657049.f)))))));
167 return x * (-683562624.f +
z * (227746080.f +
z * (-135400128.f +
z * (90460848.f +
z * (-54431464.f +
z * (22973256.f +
z * (-4657049.f)))))));
182 auto angle = (x>=0) ? pi4 : pi34;
183 angle +=
int(approx_atan2i_P<DEGREE>(
r));
194 return unsafe_atan2i_impl<DEGREE>(
y,
x);
208 return x * ((-10142.439453125f) +
z * 2002.0908203125
f);
213 return x * ((-10381.9609375f) +
z * ((3011.1513671875
f) +
z * (-827.538330078125f)));
218 return x * ((-10422.177734375f) +
z * (3349.97412109375
f +
z * ((-1525.589599609375
f) +
z * 406.64190673828125f))) ;
223 return x * ((-10428.984375f) +
z * (3445.20654296875
f +
z * ((-1879.137939453125
f) +
z * (888.22314453125f +
z * (-217.42669677734375f)))));
233 constexpr short pi34 = short(3*maxshort/4);
238 auto angle = (x>=0) ? pi4 : pi34;
239 angle += short(approx_atan2s_P<DEGREE>(
r));
248 return unsafe_atan2s_impl<DEGREE>(
y,
x);
259 return std::round(x*p2i);
278 return std::round(x*p2i);
constexpr float approx_atan2f_P< 13 >(float x)
constexpr short phi2short(float x)
constexpr int unsafe_atan2i(float y, float x)
constexpr float approx_atan2s_P< 3 >(float x)
constexpr float approx_atan2i_P< 9 >(float x)
constexpr float approx_atan2f_P< 15 >(float x)
constexpr float approx_atan2i_P< 3 >(float x)
constexpr float approx_atan2s_P< 7 >(float x)
constexpr float safe_atan2f(float y, float x)
constexpr float approx_atan2f_P< 7 >(float x)
constexpr float unsafe_atan2f(float y, float x)
constexpr double int2dphi(int x)
constexpr short unsafe_atan2s_impl(float y, float x)
constexpr float approx_atan2s_P(float x)
constexpr float approx_atan2f_P< 5 >(float x)
constexpr float approx_atan2f_P(float x)
Abs< T >::type abs(const T &t)
constexpr float approx_atan2i_P< 15 >(float x)
constexpr float approx_atan2s_P< 9 >(float x)
constexpr float int2phi(int x)
constexpr float approx_atan2i_P(float x)
constexpr float approx_atan2i_P< 7 >(float x)
constexpr short unsafe_atan2s(float y, float x)
constexpr float approx_atan2i_P< 5 >(float x)
constexpr float short2phi(short x)
constexpr float approx_atan2f_P< 11 >(float x)
constexpr float approx_atan2s_P< 5 >(float x)
constexpr float approx_atan2i_P< 11 >(float x)
constexpr float unsafe_atan2f_impl(float y, float x)
constexpr float approx_atan2f_P< 9 >(float x)
constexpr int phi2int(float x)
constexpr float approx_atan2i_P< 13 >(float x)
constexpr int unsafe_atan2i_impl(float y, float x)
constexpr float approx_atan2f_P< 3 >(float x)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)