diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2025-05-27 09:43:57 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2025-05-27 09:55:31 +0200 |
commit | 672569cee76a1927d14b5eb754a5ff0b9cee1bc8 (patch) | |
tree | e57c5c6baffcade8c7f0f8c61b44f66db4810a44 | |
parent | 447156e4d143d7f513c488dd0b44037524a01fba (diff) | |
download | gcc-672569cee76a1927d14b5eb754a5ff0b9cee1bc8.zip gcc-672569cee76a1927d14b5eb754a5ff0b9cee1bc8.tar.gz gcc-672569cee76a1927d14b5eb754a5ff0b9cee1bc8.tar.bz2 |
AVR: target/120441 - Fix f7_exp for |x| ≥ 512.
f7_exp limited exponents to 512, but 1023 * ln2 ≈ 709,
hence 1024 is a correct limit.
libgcc/config/avr/libf7/
PR target/120441
* libf7.c (f7_exp): Limit aa->expo to 10 (not to 9).
-rw-r--r-- | libgcc/config/avr/libf7/libf7.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgcc/config/avr/libf7/libf7.c b/libgcc/config/avr/libf7/libf7.c index a64554c..7d70804 100644 --- a/libgcc/config/avr/libf7/libf7.c +++ b/libgcc/config/avr/libf7/libf7.c @@ -1649,10 +1649,10 @@ void f7_exp (f7_t *cc, const f7_t *aa) return f7_set_nan (cc); /* The maximal exponent of 2 for a double is 1023, hence we may limit - to |A| < 1023 * ln2 ~ 709. We limit to 1024 ~ 1.99 * 2^9 */ + to |A| < 1023 * ln2 ~ 709. We limit to 1024 = 2^10 */ if (f7_class_inf (a_class) - || (f7_class_nonzero (a_class) && aa->expo >= 9)) + || (f7_class_nonzero (a_class) && aa->expo >= 10)) { if (f7_class_sign (a_class)) return f7_clr (cc); |