Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docstrings to exp10 functions
  • Loading branch information
JSorngard authored and tgross35 committed Nov 1, 2024
commit f5a6ad11fa97a69f53b3d6448a2b54a88c7f6d21
1 change: 1 addition & 0 deletions src/math/exp10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const P10: &[f64] = &[
1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
];

/// Calculates 10 raised to the power of `x` (f64).
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn exp10(x: f64) -> f64 {
let (mut y, n) = modf(x);
Expand Down
1 change: 1 addition & 0 deletions src/math/exp10f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const LN10_F64: f64 = 3.32192809488736234787031942948939;
const P10: &[f32] =
&[1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7];

/// Calculates 10 raised to the power of `x` (f32).
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
pub fn exp10f(x: f32) -> f32 {
let (mut y, n) = modff(x);
Expand Down