Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
wisbery committed Mar 22, 2024
1 parent cd91ef5 commit 97e3c7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/bid128_000.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ extern "C" {

//======================================================================================================================

/// Copies a 128-bit decimal floating-point operand x to a destination in the same format
/// changing the sign to positive.
/// Returns the absolute value of a 128-bit decimal floating-point number.
///
/// # Example
///
Expand Down Expand Up @@ -242,7 +241,7 @@ pub fn bid128_cos(x: BID128, round: u32, flags: &mut u32) -> BID128 {
unsafe { __bid128_cos(x, round, flags) }
}

/// Returns s result of decimal floating-point division.
/// Returns a result of decimal floating-point division.
pub fn bid128_div(x: BID128, y: BID128, round: u32, flags: &mut u32) -> BID128 {
unsafe { __bid128_div(x, y, round, flags) }
}
Expand Down Expand Up @@ -327,15 +326,15 @@ pub fn bid128_log(x: BID128, round: u32, flags: &mut u32) -> BID128 {
/// Returns the canonicalized floating-point number y if x < y,
/// x if y < x, the canonicalized floating-point number if one operand
/// is a floating-point number and the other a quiet NaN.
/// Otherwise it is either x or y, canonicalized.
/// Otherwise, it is either x or y, canonicalized.
pub fn bid128_maxnum(x: BID128, y: BID128, flags: &mut u32) -> BID128 {
unsafe { __bid128_maxnum(x, y, flags) }
}

/// Returns the canonicalized floating-point number x if x < y,
/// y if y < x, the canonicalized floating-point number if one operand
/// is a floating-point number and the other a quiet NaN.
/// Otherwise it is either x or y, canonicalized.
/// Otherwise, it is either x or y, canonicalized.
pub fn bid128_minnum(x: BID128, y: BID128, flags: &mut u32) -> BID128 {
unsafe { __bid128_minnum(x, y, flags) }
}
Expand Down Expand Up @@ -465,7 +464,7 @@ pub fn bid128_sub(x: BID128, y: BID128, round: u32, flags: &mut u32) -> BID128 {
}

/// Converts 128-bit decimal floating-point value to 32-bit signed integer
/// with rounding-to-zero mode' inexact exceptions are not signaled.
/// with rounding-to-zero mode; inexact exceptions are not signaled.
pub fn bid128_to_int32_int(x: BID128, flags: &mut u32) -> i32 {
unsafe { __bid128_to_int32_int(x, flags) }
}
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::bid128_000::bid128_quiet_to_string;
use std::fmt;
use std::fmt::{Debug, Display};

/// A structure representing a 128-bit decimal.
/// A structure representing a 128-bit floating-point decimal number.
#[repr(C, align(16))]
#[derive(Copy, Clone)]
pub struct BID128 {
Expand Down

0 comments on commit 97e3c7f

Please sign in to comment.