


Bits error versus re



Bits error versus im



Bits error versus base
Results
Initial program 31.3
Simplified0.4
rmApplied pow10.4
Applied log-pow0.4
Applied associate-/l*0.4
rmApplied associate-/r/0.4
rmApplied associate-*l/0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019016 +o rules:numerics
(FPCore (re im base)
:name "math.log/2 on complex, real part"
(/ (+ (* (log (sqrt (+ (* re re) (* im im)))) (log base)) (* (atan2 im re) 0)) (+ (* (log base) (log base)) (* 0 0))))
Time bar (total: 44.6s)Debug log
| 941× | (pre true 80) |
| 457× | (body nan 80) |
| 256× | (body real 80) |
| 228× | (body exit 10240) |
| 83.0ms | (/ (+ (* (log (sqrt (+ (* re re) (* im im)))) (log base)) (* (atan2 im re) 0)) (+ (* (log base) (log base)) (* 0 0))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.3b
Found 1 expressions with local error:
| 0.3b | (/ (log (hypot re im)) (log base)) |
| 12× | times-frac |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 5× | pow1 |
| 4× | associate-/l* |
| 4× | log-pow |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | associate-/r* |
| 1× | add-log-exp |
| 1× | div-inv |
| 1× | log1p-expm1-u |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 1× | expm1-log1p-u |
| 10.0ms | (/ (log (hypot re im)) (log base)) |
| 138.0ms | (/ (log (hypot re im)) (log base)) |
| 275.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 107.0ms | (/ (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im))) (* (* (log base) (log base)) (log base))) |
| 18.0ms | (/ (log (/ 1 re)) (log (/ 1 base))) |
| 17.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) (* (cbrt (log base)) (cbrt (log base)))) |
| 11.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) 1) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.4b | (/ (log base) (log (hypot re im))) |
| 0.3b | (/ 1 (/ (log base) (log (hypot re im)))) |
| 24× | times-frac |
| 20× | associate-/r* |
| 19× | add-cube-cbrt |
| 19× | *-un-lft-identity |
| 19× | add-sqr-sqrt |
| 10× | pow1 |
| 7× | log-pow |
| 7× | add-exp-log |
| 4× | add-cbrt-cube |
| 3× | associate-/l* |
| 3× | div-inv |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | div-exp |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | rec-exp |
| 2× | expm1-log1p-u |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | associate-/r/ |
| 1× | cbrt-undiv |
| 4.0ms | (/ (log base) (log (hypot re im))) |
| 2.0ms | (/ 1 (/ (log base) (log (hypot re im)))) |
| 167.0ms | (/ 1 (/ (log base) (log (hypot re im)))) |
| 149.0ms | (/ (log base) (log (hypot re im))) |
| 933.0ms | (* -1 (/ (- (log -1) (log (/ -1 base))) (log (/ -1 re)))) |
| 215.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 124.0ms | (/ (* (* (log base) (log base)) (log base)) (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im)))) |
| 17.0ms | (/ (log (/ 1 re)) (log (/ 1 base))) |
| 17.0ms | (/ (* (cbrt (log base)) (cbrt (log base))) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.3b | (* (/ 1 (log base)) (log (hypot re im))) |
| 0.3b | (/ 1 (log base)) |
| 7× | add-cube-cbrt |
| 7× | add-exp-log |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | log-prod |
| 6× | pow1 |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 4× | add-cbrt-cube |
| 3× | distribute-lft-in |
| 3× | associate-/r* |
| 3× | distribute-rgt-in |
| 2× | add-log-exp |
| 2× | div-inv |
| 2× | log1p-expm1-u |
| 2× | prod-exp |
| 2× | rec-exp |
| 2× | expm1-log1p-u |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | log-pow |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | clear-num |
| 5.0ms | (* (/ 1 (log base)) (log (hypot re im))) |
| 1.0ms | (/ 1 (log base)) |
| 205.0ms | (/ 1 (log base)) |
| 121.0ms | (* (/ 1 (log base)) (log (hypot re im))) |
| 238.0ms | (* (* (* (/ 1 (log base)) (/ 1 (log base))) (/ 1 (log base))) (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im)))) |
| 163.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 40.0ms | (/ 1 (- (log -1) (log (/ -1 base)))) |
| 22.0ms | (* (log (cbrt (hypot re im))) (/ 1 (log base))) |
| 20.0ms | (+ (log (/ 1 (log base))) (log (log (hypot re im)))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 0b
Found 1 expressions with local error:
| 0.3b | (/ (log (hypot re im)) (log base)) |
| 12× | times-frac |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 5× | pow1 |
| 4× | associate-/l* |
| 4× | log-pow |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | associate-/r* |
| 1× | add-log-exp |
| 1× | div-inv |
| 1× | log1p-expm1-u |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 1× | expm1-log1p-u |
| 11.0ms | (/ (log (hypot re im)) (log base)) |
| 113.0ms | (/ (log (hypot re im)) (log base)) |
| 201.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 92.0ms | (/ (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im))) (* (* (log base) (log base)) (log base))) |
| 20.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) 1) |
| 17.0ms | (/ (log (/ 1 re)) (log (/ 1 base))) |
| 16.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) (* (cbrt (log base)) (cbrt (log base)))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 0b
0% (0.3b remaining)
Error of 0.4b against oracle of 0.0b and baseline of 0.4b
| 31577× | (pre true 80) |
| 15613× | (body nan 80) |
| 8000× | (body real 80) |
| 7964× | (body exit 10240) |