Lines Matching refs:r
75 spx_float_t r = {0,0}; in PSEUDOFLOAT() local
76 return r; in PSEUDOFLOAT()
82 spx_float_t r; in PSEUDOFLOAT() local
83 r.m = -x; in PSEUDOFLOAT()
84 r.e = e; in PSEUDOFLOAT()
85 return r; in PSEUDOFLOAT()
89 spx_float_t r; in PSEUDOFLOAT() local
90 r.m = x; in PSEUDOFLOAT()
91 r.e = e; in PSEUDOFLOAT()
92 return r; in PSEUDOFLOAT()
99 spx_float_t r; in FLOAT_ADD() local
106 r.m = ((a).m>>1) + ((b).m>>MIN(15,(a).e-(b).e+1)); in FLOAT_ADD()
107 r.e = (a).e+1; in FLOAT_ADD()
111 r.m = ((b).m>>1) + ((a).m>>MIN(15,(b).e-(a).e+1)); in FLOAT_ADD()
112 r.e = (b).e+1; in FLOAT_ADD()
114 if (r.m>0) in FLOAT_ADD()
116 if (r.m<16384) in FLOAT_ADD()
118 r.m<<=1; in FLOAT_ADD()
119 r.e-=1; in FLOAT_ADD()
122 if (r.m>-16384) in FLOAT_ADD()
124 r.m<<=1; in FLOAT_ADD()
125 r.e-=1; in FLOAT_ADD()
129 return r; in FLOAT_ADD()
134 spx_float_t r; in FLOAT_SUB() local
141 r.m = ((a).m>>1) - ((b).m>>MIN(15,(a).e-(b).e+1)); in FLOAT_SUB()
142 r.e = (a).e+1; in FLOAT_SUB()
146 r.m = ((a).m>>MIN(15,(b).e-(a).e+1)) - ((b).m>>1); in FLOAT_SUB()
147 r.e = (b).e+1; in FLOAT_SUB()
149 if (r.m>0) in FLOAT_SUB()
151 if (r.m<16384) in FLOAT_SUB()
153 r.m<<=1; in FLOAT_SUB()
154 r.e-=1; in FLOAT_SUB()
157 if (r.m>-16384) in FLOAT_SUB()
159 r.m<<=1; in FLOAT_SUB()
160 r.e-=1; in FLOAT_SUB()
164 return r; in FLOAT_SUB()
187 spx_float_t r; in FLOAT_MULT() local
188 r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15); in FLOAT_MULT()
189 r.e = (a).e+(b).e+15; in FLOAT_MULT()
190 if (r.m>0) in FLOAT_MULT()
192 if (r.m<16384) in FLOAT_MULT()
194 r.m<<=1; in FLOAT_MULT()
195 r.e-=1; in FLOAT_MULT()
198 if (r.m>-16384) in FLOAT_MULT()
200 r.m<<=1; in FLOAT_MULT()
201 r.e-=1; in FLOAT_MULT()
205 return r; in FLOAT_MULT()
210 spx_float_t r; in FLOAT_AMULT() local
211 r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15); in FLOAT_AMULT()
212 r.e = (a).e+(b).e+15; in FLOAT_AMULT()
213 return r; in FLOAT_AMULT()
219 spx_float_t r; in FLOAT_SHL() local
220 r.m = a.m; in FLOAT_SHL()
221 r.e = a.e+b; in FLOAT_SHL()
222 return r; in FLOAT_SHL()
249 spx_float_t r; in FLOAT_MUL32U() local
258 r.m = MULT16_16_Q15(a,b); in FLOAT_MUL32U()
259 r.e = e1+e2-13; in FLOAT_MUL32U()
260 return r; in FLOAT_MUL32U()
267 spx_float_t r; in FLOAT_DIV32_FLOAT() local
279 r.m = DIV32_16(a,b.m); in FLOAT_DIV32_FLOAT()
280 r.e = e-b.e; in FLOAT_DIV32_FLOAT()
281 return r; in FLOAT_DIV32_FLOAT()
289 spx_float_t r; in FLOAT_DIV32() local
308 r.m = DIV32_16(a,b); in FLOAT_DIV32()
309 r.e = e; in FLOAT_DIV32()
310 return r; in FLOAT_DIV32()
318 spx_float_t r; in FLOAT_DIVU() local
332 r.m = DIV32_16(num,b.m); in FLOAT_DIVU()
333 r.e = a.e-b.e-15+e; in FLOAT_DIVU()
334 return r; in FLOAT_DIVU()
339 spx_float_t r; in FLOAT_SQRT() local
342 r.e = a.e - 14; in FLOAT_SQRT()
343 if (r.e & 1) in FLOAT_SQRT()
345 r.e -= 1; in FLOAT_SQRT()
348 r.e >>= 1; in FLOAT_SQRT()
349 r.m = spx_sqrt(m); in FLOAT_SQRT()
350 return r; in FLOAT_SQRT()