
Results
Herbie found 3 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 38.9%
Simplified38.9%
Taylor expanded in g around inf 21.9%
distribute-rgt1-in21.9%
metadata-eval21.9%
mul0-lft21.9%
metadata-eval21.9%
Simplified21.9%
Taylor expanded in g around inf 75.0%
associate-*r/75.0%
cbrt-div95.9%
neg-mul-195.9%
Applied egg-rr95.9%
Final simplification95.9%
Initial program 38.9%
Simplified38.9%
Taylor expanded in g around inf 21.9%
distribute-rgt1-in21.9%
metadata-eval21.9%
mul0-lft21.9%
metadata-eval21.9%
Simplified21.9%
Taylor expanded in g around inf 75.0%
expm1-log1p-u47.2%
expm1-udef25.7%
add-sqr-sqrt24.5%
sqrt-unprod14.9%
mul-1-neg14.9%
mul-1-neg14.9%
sqr-neg14.9%
sqrt-unprod1.0%
add-sqr-sqrt1.3%
Applied egg-rr1.3%
expm1-def1.0%
expm1-log1p1.3%
Simplified1.3%
Final simplification1.3%
Initial program 38.9%
Simplified38.9%
Taylor expanded in g around inf 21.9%
distribute-rgt1-in21.9%
metadata-eval21.9%
mul0-lft21.9%
metadata-eval21.9%
Simplified21.9%
Taylor expanded in g around inf 75.0%
cbrt-prod75.0%
metadata-eval75.0%
metadata-eval75.0%
add-cbrt-cube75.0%
Applied egg-rr75.0%
neg-mul-175.0%
Simplified75.0%
Final simplification75.0%
herbie shell --seed 2023167
(FPCore (g h a)
:name "2-ancestry mixing, positive discriminant"
:precision binary64
(+ (cbrt (* (/ 1.0 (* 2.0 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1.0 (* 2.0 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))