Skip to content

Commit

Permalink
· bid_to_dpd128 & bid_dpd_to_bid128
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosga committed Mar 3, 2024
1 parent 56eff8c commit 0a03a98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bid_dpd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub (crate) fn bid_to_dpd128(ba: &BID_UINT128) -> BID_UINT128 {
#[cfg(target_endian = "big")]
BID_SWAP128(&res);

return res;
res
}

/// Convert a 128-bit decimal floating-point value encoded in DPD format
Expand Down Expand Up @@ -249,5 +249,5 @@ pub (crate) fn bid_dpd_to_bid128(da: &BID_UINT128) -> BID_UINT128 {
#[cfg(target_endian = "big")]
BID_SWAP128(&res);

return res;
res
}
4 changes: 2 additions & 2 deletions src/bid_inline_add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ pub (crate) fn __get_dec_digits64(X: &BID_UINT128) -> i32 {
}
// get number of decimal digits in the coeff_x
digits_x = BID_ESTIMATE_DECIMAL_DIGITS[bin_expon_cx + 64];
if __unsigned_compare_ge_128(&X, &BID_POWER10_TABLE_128[digits_x as usize]) {
if __unsigned_compare_ge_128(X, &BID_POWER10_TABLE_128[digits_x as usize]) {
digits_x += 1;
}
return digits_x;
digits_x
}

0 comments on commit 0a03a98

Please sign in to comment.