8000 Add basic docstrings to some functions by JSorngard · Pull Request #337 · rust-lang/libm · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Add basic docstrings to some functions #337

Merged
merged 12 commits into from
Oct 28, 2024
Merged
Prev Previous commit
Next Next commit
Specify argument bit-size for pow functions
  • Loading branch information
JSorngard committed Oct 28, 2024
commit 7d6bbdc36bf6a1047a48667a1a4fb26cc85aecbb
2 changes: 1 addition & 1 deletion src/math/pow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const IVLN2: f64 = 1.44269504088896338700e+00; /* 0x3ff71547_652b82fe =1/ln2 */
const IVLN2_H: f64 = 1.44269502162933349609e+00; /* 0x3ff71547_60000000 =24b 1/ln2*/
const IVLN2_L: f64 = 1.92596299112661746887e-08; /* 0x3e54ae0b_f85ddf44 =1/ln2 tail*/

/// Returns `x` to the power of `y`.
/// Returns `x` to the power of `y` (f64).
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn pow(x: f64, y: f64) -> f64 {
let t1: f64;
Expand Down
2 changes: 1 addition & 1 deletion src/math/powf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const IVLN2: f32 = 1.4426950216e+00;
const IVLN2_H: f32 = 1.4426879883e+00;
const IVLN2_L: f32 = 7.0526075433e-06;

/// Returns `x` to the power of `y`.
/// Returns `x` to the power of `y` (f32).
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn powf(x: f32, y: f32) -> f32 {
let mut z: f32;
Expand Down
0