
Results
Herbie found 4 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 48.0%
Taylor expanded in y around 0 32.0%
unpow232.0%
unpow232.0%
hypot-def60.4%
Simplified60.4%
Final simplification60.4%
if z < 350 or 9.4999999999999997e56 < z < 8.80000000000000011e80Initial program 51.1%
Taylor expanded in z around 0 36.8%
unpow236.8%
unpow236.8%
hypot-def76.9%
Simplified76.9%
if 350 < z < 9.4999999999999997e56 or 8.80000000000000011e80 < z Initial program 36.3%
Taylor expanded in z around inf 60.6%
Final simplification73.4%
if z < 122 or 1.5e62 < z < 4e80Initial program 50.9%
Taylor expanded in x around -inf 19.0%
mul-1-neg19.0%
Simplified19.0%
if 122 < z < 1.5e62 or 4e80 < z Initial program 37.5%
Taylor expanded in z around inf 59.8%
Final simplification27.9%
Initial program 48.0%
Taylor expanded in z around inf 17.4%
Final simplification17.4%
herbie shell --seed 2023167
(FPCore (x y z)
:name "bug366 (missed optimization)"
:precision binary64
:herbie-target
(hypot x (hypot y z))
(sqrt (+ (* x x) (+ (* y y) (* z z)))))