Skip to content

Commit

Permalink
remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bksaiki committed Mar 8, 2024
1 parent 4562027 commit cf2b0c8
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions src/ieee754/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,55 +529,4 @@ impl RoundingContext for IEEE754Context {
self.round_finalize(unbounded, tiny_pre, tiny_post, inexact, carry)
}
}

// fn format_round(&self, val: &Self::Format) -> Self::Format {
// match &val.num {
// IEEE754Val::Zero(s) => {
// // +/-0 is preserved
// IEEE754 {
// num: IEEE754Val::Zero(*s),
// flags: Default::default(),
// ctx: self.clone(),
// }
// }
// IEEE754Val::Infinity(s) => {
// // +/-Inf is preserved
// IEEE754 {
// num: IEEE754Val::Infinity(*s),
// flags: Default::default(),
// ctx: self.clone(),
// }
// }
// IEEE754Val::Nan(s, _, payload) => {
// // NaN
// // rounding truncates the payload
// // always quiets the result
// let offset = self.max_p() as isize - val.ctx.max_p() as isize;
// let payload = match offset.cmp(&0) {
// std::cmp::Ordering::Less => {
// // truncation: chop off the lower bits
// Integer::from(payload >> -offset)
// }
// std::cmp::Ordering::Greater => {
// // padding
// Integer::from(payload << offset)
// }
// std::cmp::Ordering::Equal => {
// // payload is preserved exactly
// payload.clone()
// }
// };

// IEEE754 {
// num: IEEE754Val::Nan(*s, true, payload),
// flags: Default::default(),
// ctx: self.clone(),
// }
// }
// _ => {
// // finite, non-zero
// self.round_finite(val)
// }
// }
// }
}

0 comments on commit cf2b0c8

Please sign in to comment.