Skip to content

Add FastPow() function.#2886

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_875131085
Feb 27, 2026
Merged

Add FastPow() function.#2886
copybara-service[bot] merged 1 commit intomasterfrom
test_875131085

Conversation

@copybara-service
Copy link
Contributor

Add FastPow() function.
Valid Range: float32: base in (0, +FLT_MAX], exp * log(base) in [-25.0, +25.0]
float64: base in (0, +DBL_MAX], exp * log(base) in [-25.0, +25.0]
Max Relative Error for Valid Range: float32 : 0.27%, float64 : 0.22%
Notably faster than HwyPow()[since there is no direct implementation for this, implemented HwyPow() using Hwy Log() and Exp()) on f64(1.50x), f32x8(1.34x) and f64x2(1.27x).

 Valid Range: float32: base in (0, +FLT_MAX], exp * log(base) in [-25.0, +25.0]
              float64: base in (0, +DBL_MAX], exp * log(base) in [-25.0, +25.0]
 Max Relative Error for Valid Range: float32 : 0.27%, float64 : 0.22%
Notably faster than HwyPow()[since there is no direct implementation for this, implemented HwyPow() using Hwy Log() and Exp()) on f64(1.50x), f32x8(1.34x) and f64x2(1.27x).

PiperOrigin-RevId: 876162832
@copybara-service copybara-service bot merged commit a85bfa3 into master Feb 27, 2026
@copybara-service copybara-service bot deleted the test_875131085 branch February 27, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant