
Results
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
if c < -1.1499999999999999e81 or 1.00000000000000007e70 < c Initial program 35.5%
Taylor expanded in c around inf 72.3%
unpow272.3%
times-frac82.7%
Simplified82.7%
clear-num83.6%
un-div-inv83.6%
Applied egg-rr83.6%
if -1.1499999999999999e81 < c < -2.1999999999999999e-97 or 2.2000000000000001e-80 < c < 1.00000000000000007e70Initial program 87.9%
if -2.1999999999999999e-97 < c < 2.2000000000000001e-80Initial program 67.7%
*-un-lft-identity67.7%
add-sqr-sqrt67.7%
times-frac67.7%
hypot-def67.7%
fma-def67.7%
hypot-def83.5%
Applied egg-rr83.5%
Taylor expanded in c around 0 58.5%
Taylor expanded in c around 0 93.5%
Final simplification88.2%
if (/.f64 (+.f64 (*.f64 a c) (*.f64 b d)) (+.f64 (*.f64 c c) (*.f64 d d))) < +inf.0Initial program 77.7%
*-un-lft-identity77.7%
add-sqr-sqrt77.7%
times-frac77.8%
hypot-def77.8%
fma-def77.8%
hypot-def93.9%
Applied egg-rr93.9%
if +inf.0 < (/.f64 (+.f64 (*.f64 a c) (*.f64 b d)) (+.f64 (*.f64 c c) (*.f64 d d))) Initial program 0.0%
Taylor expanded in c around inf 45.6%
unpow245.6%
times-frac56.9%
Simplified56.9%
clear-num56.9%
un-div-inv57.0%
Applied egg-rr57.0%
Final simplification85.8%
if c < -2.2e22 or -1.8499999999999998e-71 < c < -1.5499999999999999e-94 or 5.2000000000000001e67 < c Initial program 45.7%
Taylor expanded in c around inf 71.0%
if -2.2e22 < c < -1.8499999999999998e-71 or -1.5499999999999999e-94 < c < 5.2000000000000001e67Initial program 74.0%
*-un-lft-identity74.0%
add-sqr-sqrt74.0%
times-frac74.0%
hypot-def74.0%
fma-def74.0%
hypot-def85.4%
Applied egg-rr85.4%
Taylor expanded in c around 0 50.6%
Taylor expanded in c around 0 81.8%
Final simplification76.8%
if c < -1.49999999999999996e-21 or -6.8000000000000002e-67 < c < -1.5000000000000001e-94 or 5.00000000000000027e31 < c Initial program 51.6%
Taylor expanded in c around inf 71.0%
unpow271.0%
times-frac77.7%
Simplified77.7%
if -1.49999999999999996e-21 < c < -6.8000000000000002e-67 or -1.5000000000000001e-94 < c < 5.00000000000000027e31Initial program 71.2%
*-un-lft-identity71.2%
add-sqr-sqrt71.2%
times-frac71.2%
hypot-def71.2%
fma-def71.2%
hypot-def84.2%
Applied egg-rr84.2%
Taylor expanded in c around 0 54.8%
Taylor expanded in c around 0 86.4%
Final simplification81.7%
if c < -1.45e-21 or -3.3999999999999998e-61 < c < -1.5499999999999999e-94 or 6.4000000000000001e31 < c Initial program 51.6%
Taylor expanded in c around inf 71.0%
unpow271.0%
times-frac77.7%
Simplified77.7%
clear-num78.3%
un-div-inv78.4%
Applied egg-rr78.4%
if -1.45e-21 < c < -3.3999999999999998e-61 or -1.5499999999999999e-94 < c < 6.4000000000000001e31Initial program 71.2%
*-un-lft-identity71.2%
add-sqr-sqrt71.2%
times-frac71.2%
hypot-def71.2%
fma-def71.2%
hypot-def84.2%
Applied egg-rr84.2%
Taylor expanded in c around 0 54.8%
Taylor expanded in c around 0 86.4%
Final simplification82.1%
if c < -6.7999999999999997e-22 or -1.89999999999999997e-60 < c < -1.84999999999999993e-96 or 5.39999999999999971e31 < c Initial program 51.6%
Taylor expanded in c around inf 71.0%
unpow271.0%
times-frac77.7%
Simplified77.7%
clear-num78.3%
un-div-inv78.4%
Applied egg-rr78.4%
if -6.7999999999999997e-22 < c < -1.89999999999999997e-60Initial program 69.5%
Taylor expanded in c around 0 86.8%
unpow286.8%
times-frac86.8%
Simplified86.8%
if -1.84999999999999993e-96 < c < 5.39999999999999971e31Initial program 71.3%
*-un-lft-identity71.3%
add-sqr-sqrt71.3%
times-frac71.3%
hypot-def71.3%
fma-def71.3%
hypot-def84.1%
Applied egg-rr84.1%
Taylor expanded in c around 0 53.7%
Taylor expanded in c around 0 86.4%
Final simplification82.1%
if c < -1.62000000000000009e-15 or -4.69999999999999988e-68 < c < -1.02000000000000004e-97 or 1.02e68 < c Initial program 49.0%
Taylor expanded in c around inf 68.4%
if -1.62000000000000009e-15 < c < -4.69999999999999988e-68 or -1.02000000000000004e-97 < c < 2.0999999999999999e-164 or 2.69999999999999988e-89 < c < 1.02e68Initial program 71.8%
Taylor expanded in c around 0 69.9%
if 2.0999999999999999e-164 < c < 2.69999999999999988e-89Initial program 80.2%
*-un-lft-identity80.2%
add-sqr-sqrt80.2%
times-frac80.6%
hypot-def80.6%
fma-def80.6%
hypot-def90.1%
Applied egg-rr90.1%
Taylor expanded in c around 0 51.2%
Taylor expanded in c around 0 90.7%
Taylor expanded in d around 0 62.7%
unpow262.7%
associate-/l*62.7%
associate-*r/72.3%
Simplified72.3%
Final simplification69.2%
if c < -1.95e124 or 5.49999999999999968e67 < c Initial program 35.2%
Taylor expanded in c around inf 75.4%
if -1.95e124 < c < -8.1999999999999996e-98Initial program 84.1%
Taylor expanded in a around inf 56.5%
associate-/l*62.8%
associate-/r/62.9%
unpow262.9%
unpow262.9%
fma-udef62.9%
Simplified62.9%
fma-udef62.9%
Applied egg-rr62.9%
if -8.1999999999999996e-98 < c < 5.49999999999999968e67Initial program 72.0%
*-un-lft-identity72.0%
add-sqr-sqrt72.0%
times-frac71.9%
hypot-def71.9%
fma-def71.9%
hypot-def84.1%
Applied egg-rr84.1%
Taylor expanded in c around 0 51.2%
Taylor expanded in c around 0 83.8%
Final simplification77.1%
if c < -1.45000000000000009e-15 or -4.20000000000000016e-68 < c < -1.34999999999999993e-97 or 5.49999999999999968e67 < c Initial program 49.0%
Taylor expanded in c around inf 68.4%
if -1.45000000000000009e-15 < c < -4.20000000000000016e-68 or -1.34999999999999993e-97 < c < 5.49999999999999968e67Initial program 72.5%
Taylor expanded in c around 0 66.8%
Final simplification67.6%
Initial program 60.7%
Taylor expanded in c around inf 44.0%
Final simplification44.0%
herbie shell --seed 2023167
(FPCore (a b c d)
:name "Complex division, real part"
:precision binary64
:herbie-target
(if (< (fabs d) (fabs c)) (/ (+ a (* b (/ d c))) (+ c (* d (/ d c)))) (/ (+ b (* a (/ c d))) (+ d (* c (/ c d)))))
(/ (+ (* a c) (* b d)) (+ (* c c) (* d d))))