
Results
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 100.0%
Final simplification100.0%
if (exp.f64 re) < 0.0Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if 0.0 < (exp.f64 re) < 1.0009999999999999Initial program 100.0%
Taylor expanded in re around 0 98.0%
if 1.0009999999999999 < (exp.f64 re) Initial program 100.0%
Taylor expanded in im around 0 82.9%
Final simplification94.1%
if re < -85Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -85 < re < 0.00145Initial program 100.0%
Taylor expanded in re around 0 99.5%
*-rgt-identity99.5%
*-commutative99.5%
associate-*l*99.5%
distribute-lft-out99.5%
distribute-lft-out99.5%
associate-+l+99.5%
+-commutative99.5%
*-commutative99.5%
unpow299.5%
Simplified99.5%
if 0.00145 < re < 1.84999999999999997e154Initial program 100.0%
Taylor expanded in im around 0 78.9%
if 1.84999999999999997e154 < re Initial program 100.0%
Taylor expanded in re around 0 100.0%
*-rgt-identity100.0%
*-commutative100.0%
associate-*l*100.0%
distribute-lft-out100.0%
distribute-lft-out100.0%
associate-+l+100.0%
+-commutative100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*r*100.0%
associate-*r*100.0%
Simplified100.0%
Final simplification96.6%
if re < -1Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -1 < re < 1.9000000000000001e-4Initial program 100.0%
Taylor expanded in re around 0 99.2%
+-commutative99.2%
*-rgt-identity99.2%
distribute-lft-out99.2%
Simplified99.2%
if 1.9000000000000001e-4 < re < 1.84999999999999997e154Initial program 100.0%
Taylor expanded in im around 0 78.9%
if 1.84999999999999997e154 < re Initial program 100.0%
Taylor expanded in re around 0 100.0%
*-rgt-identity100.0%
*-commutative100.0%
associate-*l*100.0%
distribute-lft-out100.0%
distribute-lft-out100.0%
associate-+l+100.0%
+-commutative100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in re around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*r*100.0%
associate-*r*100.0%
Simplified100.0%
Final simplification96.5%
if re < -1Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -1 < re < 4.00000000000000033e-5Initial program 100.0%
Taylor expanded in re around 0 99.2%
+-commutative99.2%
*-rgt-identity99.2%
distribute-lft-out99.2%
Simplified99.2%
if 4.00000000000000033e-5 < re Initial program 100.0%
Taylor expanded in im around 0 82.9%
Final simplification94.6%
if re < -54Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -54 < re < 14.199999999999999Initial program 99.9%
Taylor expanded in re around 0 96.7%
if 14.199999999999999 < re Initial program 100.0%
Taylor expanded in re around 0 53.7%
*-rgt-identity53.7%
*-commutative53.7%
associate-*l*53.7%
distribute-lft-out53.7%
distribute-lft-out53.7%
associate-+l+53.7%
+-commutative53.7%
*-commutative53.7%
unpow253.7%
Simplified53.7%
Taylor expanded in re around inf 53.7%
*-commutative53.7%
unpow253.7%
associate-*r*53.7%
associate-*r*53.7%
Simplified53.7%
Taylor expanded in im around 0 55.4%
associate-*r*55.4%
*-commutative55.4%
unpow255.4%
associate-*r*55.4%
Simplified55.4%
Final simplification85.7%
if re < -1Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -1 < re < 2.7000000000000002Initial program 99.9%
Taylor expanded in re around 0 98.1%
+-commutative98.1%
*-rgt-identity98.1%
distribute-lft-out98.1%
Simplified98.1%
Taylor expanded in im around 0 57.3%
if 2.7000000000000002 < re Initial program 100.0%
Taylor expanded in re around 0 53.7%
*-rgt-identity53.7%
*-commutative53.7%
associate-*l*53.7%
distribute-lft-out53.7%
distribute-lft-out53.7%
associate-+l+53.7%
+-commutative53.7%
*-commutative53.7%
unpow253.7%
Simplified53.7%
Taylor expanded in re around inf 53.7%
*-commutative53.7%
unpow253.7%
associate-*r*53.7%
associate-*r*53.7%
Simplified53.7%
Taylor expanded in im around 0 55.4%
associate-*r*55.4%
*-commutative55.4%
unpow255.4%
associate-*r*55.4%
Simplified55.4%
Final simplification68.9%
if re < -66Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -66 < re < 1Initial program 99.9%
Taylor expanded in im around 0 58.4%
Taylor expanded in re around 0 56.9%
if 1 < re Initial program 100.0%
Taylor expanded in re around 0 4.4%
+-commutative4.4%
*-rgt-identity4.4%
distribute-lft-out4.4%
Simplified4.4%
Taylor expanded in im around 0 18.9%
Taylor expanded in re around inf 18.9%
Final simplification58.2%
if re < -1Initial program 100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
log1p-udef100.0%
add-exp-log100.0%
Applied egg-rr100.0%
Taylor expanded in im around 0 100.0%
if -1 < re Initial program 100.0%
Taylor expanded in re around 0 60.2%
+-commutative60.2%
*-rgt-identity60.2%
distribute-lft-out60.2%
Simplified60.2%
Taylor expanded in im around 0 41.8%
Final simplification58.4%
if re < 1Initial program 100.0%
Taylor expanded in im around 0 75.1%
Taylor expanded in re around 0 35.7%
if 1 < re Initial program 100.0%
Taylor expanded in re around 0 4.4%
+-commutative4.4%
*-rgt-identity4.4%
distribute-lft-out4.4%
Simplified4.4%
Taylor expanded in im around 0 18.9%
Taylor expanded in re around inf 18.9%
Final simplification30.8%
Initial program 100.0%
Taylor expanded in im around 0 77.2%
Taylor expanded in re around 0 26.3%
Final simplification26.3%
herbie shell --seed 2023167
(FPCore (re im)
:name "math.exp on complex, imaginary part"
:precision binary64
(* (exp re) (sin im)))