Skip to content

Commit

Permalink
add test for i_fast_sum_in_place
Browse files Browse the repository at this point in the history
  • Loading branch information
bsteinb committed Jul 15, 2024
1 parent 56de041 commit 03bb602
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/sum/ifastsum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,16 @@ where
}
}
}

#[cfg(test)]
mod test {
use super::i_fast_sum_in_place;

#[test]
fn issue_5() {
let a: f32 = 4194304.0;
let b: f32 = 4194304.5;
let s = i_fast_sum_in_place(&mut [a, b]);
assert_eq!(s, 8388608.0);
}
}

0 comments on commit 03bb602

Please sign in to comment.