


Bits error versus re



Bits error versus im



Bits error versus base
Results
Initial program 31.0
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied associate-/l*0.4
rmApplied div-inv0.5
Applied associate-/r*0.5
rmApplied div-inv0.5
Final simplification0.5
herbie shell --seed 2019010 +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: 46.6s)Debug log
| 42.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 2 expressions with local error:
| 0.3b | (/ (log (hypot re im)) (log base)) |
| 0.0b | (hypot re im) |
| 12× | times-frac |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 6× | pow1 |
| 4× | associate-/l* |
| 4× | log-pow |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 3× | associate-/r* |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | expm1-log1p-u |
| 1× | div-inv |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | hypot-udef |
| 1× | cbrt-undiv |
| 5.0ms | (/ (log (hypot re im)) (log base)) |
| 0.0ms | (hypot re im) |
| 87.0ms | (/ (log (hypot re im)) (log base)) |
| 25.0ms | (hypot re im) |
| 250.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 103.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)))) (* (cbrt (log base)) (cbrt (log base)))) |
| 15.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) 1) |
| 8.0ms | (/ (log (/ 1 re)) (log (/ 1 base))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.4b | (* (log (hypot re im)) (/ 1 (log base))) |
| 0.3b | (/ 1 (log base)) |
| 0.0b | (hypot re im) |
| 8× | add-exp-log |
| 7× | pow1 |
| 6× | add-cube-cbrt |
| 6× | *-un-lft-identity |
| 6× | add-sqr-sqrt |
| 5× | add-cbrt-cube |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | associate-/r* |
| 3× | expm1-log1p-u |
| 2× | div-inv |
| 2× | prod-exp |
| 2× | rec-exp |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | un-div-inv |
| 1× | log-pow |
| 1× | associate-*r/ |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | hypot-udef |
| 5.0ms | (* (log (hypot re im)) (/ 1 (log base))) |
| 1.0ms | (/ 1 (log base)) |
| 0.0ms | (hypot re im) |
| 201.0ms | (/ 1 (log base)) |
| 83.0ms | (* (log (hypot re im)) (/ 1 (log base))) |
| 39.0ms | (hypot re im) |
| 277.0ms | (* (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im))) (* (* (/ 1 (log base)) (/ 1 (log base))) (/ 1 (log base)))) |
| 222.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 41.0ms | (/ 1 (- (log -1) (log (/ -1 base)))) |
| 33.0ms | (+ (log (log (hypot re im))) (log (/ 1 (log base)))) |
| 29.0ms | (* (log (hypot re im)) (/ 1 (log base))) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.4b | (/ (log base) (log (hypot re im))) |
| 0.3b | (/ 1 (/ (log base) (log (hypot re im)))) |
| 0.0b | (hypot re im) |
| 24× | times-frac |
| 20× | add-cube-cbrt |
| 20× | *-un-lft-identity |
| 20× | associate-/r* |
| 20× | add-sqr-sqrt |
| 11× | pow1 |
| 8× | add-exp-log |
| 7× | log-pow |
| 5× | add-cbrt-cube |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | div-inv |
| 3× | log1p-expm1-u |
| 3× | expm1-log1p-u |
| 2× | div-exp |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | rec-exp |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | associate-/r/ |
| 1× | hypot-udef |
| 1× | cbrt-undiv |
| 7.0ms | (/ (log base) (log (hypot re im))) |
| 3.0ms | (/ 1 (/ (log base) (log (hypot re im)))) |
| 0.0ms | (hypot re im) |
| 159.0ms | (/ (log base) (log (hypot re im))) |
| 144.0ms | (/ 1 (/ (log base) (log (hypot re im)))) |
| 29.0ms | (hypot re im) |
| 1.0s | (* -1 (/ (- (log -1) (log (/ -1 base))) (log (/ -1 re)))) |
| 226.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 123.0ms | (/ (* (* (log base) (log base)) (log base)) (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im)))) |
| 20.0ms | (/ (* (cbrt (log base)) (cbrt (log base))) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))) |
| 16.0ms | (/ (* (cbrt (log base)) (cbrt (log base))) 1) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.4b | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
| 0.3b | (/ 1 (log base)) |
| 0.3b | (/ 1 (log (hypot re im))) |
| 0.0b | (hypot re im) |
| 16× | add-cube-cbrt |
| 16× | times-frac |
| 16× | *-un-lft-identity |
| 16× | add-sqr-sqrt |
| 14× | add-exp-log |
| 13× | div-inv |
| 11× | associate-/r* |
| 7× | pow1 |
| 6× | add-cbrt-cube |
| 6× | rec-exp |
| 4× | add-log-exp |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | div-exp |
| 4× | expm1-log1p-u |
| 3× | frac-2neg |
| 3× | clear-num |
| 2× | inv-pow |
| 2× | pow-flip |
| 1× | associate-/l/ |
| 1× | log-pow |
| 1× | associate-/r/ |
| 1× | hypot-udef |
| 1× | cbrt-undiv |
| 8.0ms | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
| 2.0ms | (/ 1 (log (hypot re im))) |
| 2.0ms | (/ 1 (log base)) |
| 0.0ms | (hypot re im) |
| 176.0ms | (/ 1 (log base)) |
| 162.0ms | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
| 79.0ms | (/ 1 (log (hypot re im))) |
| 38.0ms | (hypot re im) |
| 1.1s | (/ (* (* (/ 1 (log base)) (/ 1 (log base))) (/ 1 (log base))) (* (* (/ 1 (log (hypot re im))) (/ 1 (log (hypot re im)))) (/ 1 (log (hypot re im))))) |
| 203.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 93.0ms | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
| 58.0ms | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
| 57.0ms | (/ (/ 1 (log base)) (/ 1 (log (hypot re im)))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 0b
0% (0.4b remaining)
Error of 0.5b against oracle of 0.0b and baseline of 0.5b