Lines Matching +full:1 +full:a

16  * of this code was written as part of a project to build a fixed-point vector
29 * (1) they include prominent notice that the work is derivative, and (2) they
42 #define LIT64( a ) a##LL argument
71 bits64 extractFloat64Frac(float64 a);
72 flag extractFloat64Sign(float64 a);
73 int16 extractFloat64Exp(float64 a);
74 int16 extractFloat32Exp(float32 a);
75 flag extractFloat32Sign(float32 a);
76 bits32 extractFloat32Frac(float32 a);
78 void shift64RightJamming(bits64 a, int16 count, bits64 * zPtr);
80 void shift32RightJamming(bits32 a, int16 count, bits32 * zPtr);
81 float64 float64_sub(float64 a, float64 b);
82 float32 float32_sub(float32 a, float32 b);
83 float32 float32_add(float32 a, float32 b);
84 float64 float64_add(float64 a, float64 b);
85 float64 float64_div(float64 a, float64 b);
86 float32 float32_div(float32 a, float32 b);
87 float32 float32_mul(float32 a, float32 b);
88 float64 float64_mul(float64 a, float64 b);
89 float32 float64_to_float32(float64 a);
94 void mul64To128(bits64 a, bits64 b, bits64 * z0Ptr, bits64 * z1Ptr);
96 static int8 countLeadingZeros32(bits32 a);
97 static int8 countLeadingZeros64(bits64 a);
100 static float64 subFloat64Sigs(float64 a, float64 b, flag zSign);
101 static float64 addFloat64Sigs(float64 a, float64 b, flag zSign);
106 static float32 subFloat32Sigs(float32 a, float32 b, flag zSign);
107 static float32 addFloat32Sigs(float32 a, float32 b, flag zSign);
114 bits64 extractFloat64Frac(float64 a) in extractFloat64Frac() argument
116 return a & LIT64(0x000FFFFFFFFFFFFF); in extractFloat64Frac()
119 flag extractFloat64Sign(float64 a) in extractFloat64Sign() argument
121 return a >> 63; in extractFloat64Sign()
124 int16 extractFloat64Exp(float64 a) in extractFloat64Exp() argument
126 return (a >> 52) & 0x7FF; in extractFloat64Exp()
129 int16 extractFloat32Exp(float32 a) in extractFloat32Exp() argument
131 return (a >> 23) & 0xFF; in extractFloat32Exp()
134 flag extractFloat32Sign(float32 a) in extractFloat32Sign() argument
136 return a >> 31; in extractFloat32Sign()
139 bits32 extractFloat32Frac(float32 a) in extractFloat32Frac() argument
141 return a & 0x007FFFFF; in extractFloat32Frac()
149 void shift64RightJamming(bits64 a, int16 count, bits64 * zPtr) in shift64RightJamming() argument
154 z = a; in shift64RightJamming()
156 z = (a >> count) | ((a << ((-count) & 63)) != 0); in shift64RightJamming()
158 z = (a != 0); in shift64RightJamming()
163 static int8 countLeadingZeros32(bits32 a) in countLeadingZeros32() argument
170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, in countLeadingZeros32()
171 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, in countLeadingZeros32()
172 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, in countLeadingZeros32()
173 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, in countLeadingZeros32()
186 if (a < 0x10000) { in countLeadingZeros32()
188 a <<= 16; in countLeadingZeros32()
190 if (a < 0x1000000) { in countLeadingZeros32()
192 a <<= 8; in countLeadingZeros32()
194 shiftCount += countLeadingZerosHigh[a >> 24]; in countLeadingZeros32()
199 static int8 countLeadingZeros64(bits64 a) in countLeadingZeros64() argument
204 if (a < ((bits64) 1) << 32) { in countLeadingZeros64()
207 a >>= 32; in countLeadingZeros64()
209 shiftCount += countLeadingZeros32(a); in countLeadingZeros64()
218 shiftCount = countLeadingZeros64(zSig) - 1; in normalizeRoundAndPackFloat64()
224 static float64 subFloat64Sigs(float64 a, float64 b, flag zSign) in subFloat64Sigs() argument
230 aSig = extractFloat64Frac(a); in subFloat64Sigs()
231 aExp = extractFloat64Exp(a); in subFloat64Sigs()
242 aExp = 1; in subFloat64Sigs()
243 bExp = 1; in subFloat64Sigs()
252 return packFloat64(zSign ^ 1, 0x7FF, 0); in subFloat64Sigs()
264 zSign ^= 1; in subFloat64Sigs()
268 return a; in subFloat64Sigs()
285 static float64 addFloat64Sigs(float64 a, float64 b, flag zSign) in addFloat64Sigs() argument
291 aSig = extractFloat64Frac(a); in addFloat64Sigs()
292 aExp = extractFloat64Exp(a); in addFloat64Sigs()
300 return a; in addFloat64Sigs()
322 return a; in addFloat64Sigs()
331 zSig = (aSig + bSig) << 1; in addFloat64Sigs()
347 void shift32RightJamming(bits32 a, int16 count, bits32 * zPtr) in shift32RightJamming() argument
351 z = a; in shift32RightJamming()
353 z = (a >> count) | ((a << ((-count) & 31)) != 0); in shift32RightJamming()
355 z = (a != 0); in shift32RightJamming()
383 isTiny = (zExp < -1) in roundAndPackFloat32()
406 shiftCount = countLeadingZeros32(zSig) - 1; in normalizeRoundAndPackFloat32()
434 isTiny = (zExp < -1) in roundAndPackFloat64()
454 static float32 subFloat32Sigs(float32 a, float32 b, flag zSign) in subFloat32Sigs() argument
460 aSig = extractFloat32Frac(a); in subFloat32Sigs()
461 aExp = extractFloat32Exp(a); in subFloat32Sigs()
472 aExp = 1; in subFloat32Sigs()
473 bExp = 1; in subFloat32Sigs()
482 return packFloat32(zSign ^ 1, 0xFF, 0); in subFloat32Sigs()
494 zSign ^= 1; in subFloat32Sigs()
498 return a; in subFloat32Sigs()
516 static float32 addFloat32Sigs(float32 a, float32 b, flag zSign) in addFloat32Sigs() argument
522 aSig = extractFloat32Frac(a); in addFloat32Sigs()
523 aExp = extractFloat32Exp(a); in addFloat32Sigs()
531 return a; in addFloat32Sigs()
553 return a; in addFloat32Sigs()
562 zSig = (aSig + bSig) << 1; in addFloat32Sigs()
573 float64 float64_sub(float64 a, float64 b) in float64_sub() argument
577 aSign = extractFloat64Sign(a); in float64_sub()
580 return subFloat64Sigs(a, b, aSign); in float64_sub()
582 return addFloat64Sigs(a, b, aSign); in float64_sub()
587 float32 float32_sub(float32 a, float32 b) in float32_sub() argument
591 aSign = extractFloat32Sign(a); in float32_sub()
594 return subFloat32Sigs(a, b, aSign); in float32_sub()
596 return addFloat32Sigs(a, b, aSign); in float32_sub()
601 float32 float32_add(float32 a, float32 b) in float32_add() argument
605 aSign = extractFloat32Sign(a); in float32_add()
608 return addFloat32Sigs(a, b, aSign); in float32_add()
610 return subFloat32Sigs(a, b, aSign); in float32_add()
615 float64 float64_add(float64 a, float64 b) in float64_add() argument
619 aSign = extractFloat64Sign(a); in float64_add()
622 return addFloat64Sigs(a, b, aSign); in float64_add()
624 return subFloat64Sigs(a, b, aSign); in float64_add()
635 *zExpPtr = 1 - shiftCount; in normalizeFloat64Subnormal()
682 void mul64To128(bits64 a, bits64 b, bits64 * z0Ptr, bits64 * z1Ptr) in mul64To128() argument
687 aLow = a; in mul64To128()
688 aHigh = a >> 32; in mul64To128()
712 *zExpPtr = 1 - shiftCount; in normalizeFloat32Subnormal()
716 float64 float64_div(float64 a, float64 b) in float64_div() argument
724 aSig = extractFloat64Frac(a); in float64_div()
725 aExp = extractFloat64Exp(a); in float64_div()
726 aSign = extractFloat64Sign(a); in float64_div()
757 aSig >>= 1; in float64_div()
774 float32 float32_div(float32 a, float32 b) in float32_div() argument
781 aSig = extractFloat32Frac(a); in float32_div()
782 aExp = extractFloat32Exp(a); in float32_div()
783 aSign = extractFloat32Sign(a); in float32_div()
811 aSig >>= 1; in float32_div()
824 float32 float32_mul(float32 a, float32 b) in float32_mul() argument
832 aSig = extractFloat32Frac(a); in float32_mul()
833 aExp = extractFloat32Exp(a); in float32_mul()
834 aSign = extractFloat32Sign(a); in float32_mul()
857 if (0 <= (signed int)(zSig << 1)) { in float32_mul()
858 zSig <<= 1; in float32_mul()
865 float64 float64_mul(float64 a, float64 b) in float64_mul() argument
871 aSig = extractFloat64Frac(a); in float64_mul()
872 aExp = extractFloat64Exp(a); in float64_mul()
873 aSign = extractFloat64Sign(a); in float64_mul()
897 if (0 <= (signed long long int)(zSig0 << 1)) { in float64_mul()
898 zSig0 <<= 1; in float64_mul()
907 * `a' to the single-precision floating-point format. The conversion is
912 float32 float64_to_float32(float64 a) in float64_to_float32() argument
919 aSig = extractFloat64Frac( a ); in float64_to_float32()
920 aExp = extractFloat64Exp( a ); in float64_to_float32()
921 aSign = extractFloat64Sign( a ); in float64_to_float32()