about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-09-09 14:35:04 +1000
committerGitHub <noreply@github.com>2025-09-09 14:35:04 +1000
commit598577911f8727e097558e34c1af9fa85b7879ba (patch)
treefdeb5845e5755fc8ebe7401686e68f6aa465078b
parent3bd603b2394a7d98426ec9263eae08a418544e92 (diff)
parent02602ef65125ac743cc0a61c5afe7c0c5acbad56 (diff)
Rollup merge of #146300 - bjoernager:f16-f128-sum-product, r=jhpratt
Implement `Sum` and `Product` for `f16` and `f128`.

Tracking issue: rust-lang/rust#116909.

This PR implements `core::iter::{Sum, Product}` for `f16` and `f128`.

I'm curious as to why these two traits aren't already implemented. I've been unable to find any information about it at all, so if there is anything that currently blocks them, I would appreciate if someone could fill me in.
-rw-r--r--library/core/src/iter/traits/accum.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/traits/accum.rs b/library/core/src/iter/traits/accum.rs
index 73122369b41..3b805139ded 100644
--- a/library/core/src/iter/traits/accum.rs
+++ b/library/core/src/iter/traits/accum.rs
@@ -203,7 +203,7 @@ macro_rules! float_sum_product {
 
 integer_sum_product! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }
 saturating_integer_sum_product! { u8 u16 u32 u64 u128 usize }
-float_sum_product! { f32 f64 }
+float_sum_product! { f16 f32 f64 f128 }
 
 #[stable(feature = "iter_arith_traits_result", since = "1.16.0")]
 impl<T, U, E> Sum<Result<U, E>> for Result<T, E>