Lines Matching refs:a

4  * The code in this source file is derived from release 2a of the SoftFloat
9 * the SoftFloat-2a license
14 * taken to be licensed under the Softfloat-2a license unless specifically
21 Arithmetic Package, Release 2a.
27 of this code was written as part of a project to build a fixed-point vector
115 | if the fraction represents a signalling NaN; otherwise false.
129 | The pattern for a default generated deconstructed floating-point NaN.
194 | Returns a quiet NaN from a signalling NaN for the deconstructed
225 | The pattern for a default generated extended double-precision NaN.
245 | The pattern for a default generated extended double-precision inf.
259 | Returns 1 if the half-precision floating-point value `a' is a quiet
268 uint16_t a = float16_val(a_);
270 return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF);
273 return ((a >> 9) & 0x3F) == 0x3F;
279 | Returns 1 if the bfloat16 value `a' is a quiet
288 uint16_t a = a_;
290 return (((a >> 6) & 0x1FF) == 0x1FE) && (a & 0x3F);
292 return ((a >> 6) & 0x1FF) == 0x1FF;
298 | Returns 1 if the half-precision floating-point value `a' is a signaling
307 uint16_t a = float16_val(a_);
309 return ((a >> 9) & 0x3F) == 0x3F;
311 return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF);
317 | Returns 1 if the bfloat16 value `a' is a signaling
326 uint16_t a = a_;
328 return ((a >> 6) & 0x1FF) == 0x1FF;
330 return (((a >> 6) & 0x1FF) == 0x1FE) && (a & 0x3F);
336 | Returns 1 if the single-precision floating-point value `a' is a quiet
345 uint32_t a = float32_val(a_);
347 return (((a >> 22) & 0x1FF) == 0x1FE) && (a & 0x003FFFFF);
349 return ((uint32_t)(a << 1) >= 0xFF800000);
355 | Returns 1 if the single-precision floating-point value `a' is a signaling
364 uint32_t a = float32_val(a_);
366 return ((uint32_t)(a << 1) >= 0xFF800000);
368 return (((a >> 22) & 0x1FF) == 0x1FE) && (a & 0x003FFFFF);
374 | Select which NaN to propagate for a two-input operation.
378 | two NaNs and should return 0 to select NaN a and 1 for NaN b.
383 | aIsLargerSignificand is only valid if both a and b are NaNs
384 | of some kind, and is true if a has the larger significand,
385 | or if both a and b have the same significand but a is
404 * a sNaN, a new qNaN has to be generated. This is done in
433 * If either operand, but not both operands, of an operation is a
437 * If either operand to an operation is a signaling NaN (SNaN), then the
441 * set, setting the SNaN bit in the operand to a one converts the SNaN to
442 * a nonsignaling NaN. The operation then continues as described in the
484 * SNaN and a non-NaN => return the SNaN, silenced
485 * QNaN and a non-NaN => return the QNaN
508 | Select which NaN to propagate for a three-input operation.
511 | Return values : 0 : a; 1 : b; 2 : c; 3 : default-NaN
526 * puts the operands to a fused mac operation (a*b)+c in the order c,a,b.
551 /* Prefer sNaN over qNaN, in the a, b, c order. */
574 /* Prefer sNaN over qNaN, in the c, a, b order. */
598 /* Prefer sNaN over qNaN, in the c, a, b order. */
615 * a default NaN
622 /* If fRA is a NaN return it; otherwise if fRB is a NaN return it;
685 /* A default implementation: prefer a to b to c.
699 | Returns 1 if the double-precision floating-point value `a' is a quiet
708 uint64_t a = float64_val(a_);
710 return (((a >> 51) & 0xFFF) == 0xFFE)
711 && (a & 0x0007FFFFFFFFFFFFULL);
713 return ((a << 1) >= 0xFFF0000000000000ULL);
719 | Returns 1 if the double-precision floating-point value `a' is a signaling
728 uint64_t a = float64_val(a_);
730 return ((a << 1) >= 0xFFF0000000000000ULL);
732 return (((a >> 51) & 0xFFF) == 0xFFE)
733 && (a & UINT64_C(0x0007FFFFFFFFFFFF));
739 | Returns 1 if the extended double-precision floating-point value `a' is a
744 int floatx80_is_quiet_nan(floatx80 a, float_status *status)
747 return floatx80_is_any_nan(a);
752 aLow = a.low & ~0x4000000000000000ULL;
753 return ((a.high & 0x7FFF) == 0x7FFF)
755 && (a.low == aLow);
757 return ((a.high & 0x7FFF) == 0x7FFF)
758 && (UINT64_C(0x8000000000000000) <= ((uint64_t)(a.low << 1)));
764 | Returns 1 if the extended double-precision floating-point value `a' is a
769 int floatx80_is_signaling_nan(floatx80 a, float_status *status)
775 return ((a.high & 0x7FFF) == 0x7FFF)
776 && ((a.low << 1) >= 0x8000000000000000ULL);
780 aLow = a.low & ~UINT64_C(0x4000000000000000);
781 return ((a.high & 0x7FFF) == 0x7FFF)
783 && (a.low == aLow);
789 | Returns a quiet NaN from a signalling NaN for the extended double-precision
790 | floating point value `a'.
793 floatx80 floatx80_silence_nan(floatx80 a, float_status *status)
797 a.low |= UINT64_C(0xC000000000000000);
798 return a;
802 | Takes two extended double-precision floating-point values `a' and `b', one
803 | of which is a NaN, and returns the appropriate NaN result. If either `a' or
804 | `b' is a signaling NaN, the invalid exception is raised.
807 floatx80 propagateFloatx80NaN(floatx80 a, floatx80 b, float_status *status)
813 a_cls = (!floatx80_is_any_nan(a)
815 : floatx80_is_signaling_nan(a, status)
832 if (a.low < b.low) {
834 } else if (b.low < a.low) {
837 aIsLargerSignificand = (a.high < b.high) ? 1 : 0;
847 return floatx80_silence_nan(a, status);
849 return a;
854 | Returns 1 if the quadruple-precision floating-point value `a' is a quiet
858 bool float128_is_quiet_nan(float128 a, float_status *status)
861 return float128_is_any_nan(a);
864 return (((a.high >> 47) & 0xFFFF) == 0xFFFE)
865 && (a.low || (a.high & 0x00007FFFFFFFFFFFULL));
867 return ((a.high << 1) >= 0xFFFF000000000000ULL)
868 && (a.low || (a.high & 0x0000FFFFFFFFFFFFULL));
874 | Returns 1 if the quadruple-precision floating-point value `a' is a
878 bool float128_is_signaling_nan(float128 a, float_status *status)
884 return ((a.high << 1) >= 0xFFFF000000000000ULL)
885 && (a.low || (a.high & 0x0000FFFFFFFFFFFFULL));
887 return (((a.high >> 47) & 0xFFFF) == 0xFFFE)
888 && (a.low || (a.high & UINT64_C(0x00007FFFFFFFFFFF)));