


Bits error versus re



Bits error versus im



Bits error versus base
Results
Initial program 30.9
Simplified0.3
rmApplied div-inv0.4
Final simplification0.4
herbie shell --seed 2019022 +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: 1.3m)Debug log
| 761.0ms | 279× | body | 10240 | exit |
| 138.0ms | 556× | body | 80 | nan |
| 51.0ms | 256× | body | 80 | valid |
| 67.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 |
| 5.0ms | (/ (log (hypot re im)) (log base)) |
| 90.0ms | (/ (log (hypot re im)) (log base)) |
| 197.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 123.0ms | (/ (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im))) (* (* (log base) (log base)) (log base))) |
| 30.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) (* (cbrt (log base)) (cbrt (log base)))) |
| 12.0ms | (/ (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im)))) 1) |
| 9.0ms | (/ (log (/ 1 re)) (log (/ 1 base))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.3b | (* (log (hypot re im)) (/ 1 (log base))) |
| 0.2b | (/ 1 (log base)) |
| 7× | add-exp-log |
| 6× | pow1 |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 4× | add-cbrt-cube |
| 3× | associate-/r* |
| 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× | un-div-inv |
| 1× | log-pow |
| 1× | associate-*r/ |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | clear-num |
| 5.0ms | (* (log (hypot re im)) (/ 1 (log base))) |
| 1.0ms | (/ 1 (log base)) |
| 190.0ms | (/ 1 (log base)) |
| 92.0ms | (* (log (hypot re im)) (/ 1 (log base))) |
| 241.0ms | (* (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im))) (* (* (/ 1 (log base)) (/ 1 (log base))) (/ 1 (log base)))) |
| 173.0ms | (* -1 (/ (log (/ -1 re)) (- (log -1) (log (/ -1 base))))) |
| 36.0ms | (/ 1 (- (log -1) (log (/ -1 base)))) |
| 34.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 4 expressions with local error:
| 0.7b | (pow (log base) 3) |
| 0.5b | (cbrt (/ (* (log (hypot re im)) (log (hypot re im))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 0.5b | (* (log (hypot re im)) (log (hypot re im))) |
| 0.3b | (/ (pow (log base) 3) (log (hypot re im))) |
| 136× | times-frac |
| 62× | add-cube-cbrt |
| 62× | *-un-lft-identity |
| 62× | add-sqr-sqrt |
| 53× | cbrt-prod |
| 35× | pow1 |
| 30× | cube-prod |
| 30× | unpow-prod-down |
| 25× | log-pow |
| 12× | add-exp-log |
| 11× | associate-/l* |
| 10× | unpow3 |
| 10× | cube-mult |
| 9× | add-cbrt-cube |
| 6× | log-prod |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 4× | associate-/r* |
| 4× | expm1-log1p-u |
| 3× | div-inv |
| 3× | div-exp |
| 3× | distribute-lft-in |
| 3× | distribute-rgt-in |
| 2× | pow-exp |
| 2× | pow-to-exp |
| 1× | rem-cube-cbrt |
| 1× | cbrt-unprod |
| 1× | pow-prod-up |
| 1× | *-commutative |
| 1× | associate-/r/ |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | pow1/3 |
| 1× | pow-plus |
| 1× | frac-2neg |
| 1× | pow-pow |
| 1× | clear-num |
| 1× | cbrt-div |
| 1× | cbrt-undiv |
| 1× | pow2 |
| 5.0ms | (* (log (hypot re im)) (log (hypot re im))) |
| 5.0ms | (/ (pow (log base) 3) (log (hypot re im))) |
| 3.0ms | (cbrt (/ (* (log (hypot re im)) (log (hypot re im))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 1.0ms | (pow (log base) 3) |
| 236.0ms | (pow (log base) 3) |
| 206.0ms | (/ (pow (log base) 3) (log (hypot re im))) |
| 121.0ms | (cbrt (/ (* (log (hypot re im)) (log (hypot re im))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 79.0ms | (* (log (hypot re im)) (log (hypot re im))) |
| 534.0ms | (cbrt (/ (log (hypot re im)) (/ (pow (* (cbrt (log base)) (cbrt (log base))) 3) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))))) |
| 381.0ms | (pow (- (log -1) (log (/ -1 base))) 3) |
| 352.0ms | (/ (* (* (pow (log base) 3) (pow (log base) 3)) (pow (log base) 3)) (* (* (log (hypot re im)) (log (hypot re im))) (log (hypot re im)))) |
| 335.0ms | (/ (pow (* (cbrt (log base)) (cbrt (log base))) 3) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))) |
| 314.0ms | (/ (pow (* (cbrt (log base)) (cbrt (log base))) 3) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.7b | (pow (log base) 3) |
| 0.6b | (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) |
| 0.5b | (cbrt (/ (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 0.5b | (* (log (hypot re im)) (log (hypot re im))) |
| 368× | times-frac |
| 245× | cbrt-prod |
| 159× | add-cube-cbrt |
| 159× | *-un-lft-identity |
| 159× | add-sqr-sqrt |
| 113× | pow1 |
| 51× | cube-prod |
| 51× | unpow-prod-down |
| 46× | log-pow |
| 24× | pow-prod-up |
| 19× | add-exp-log |
| 19× | pow-prod-down |
| 19× | add-cbrt-cube |
| 18× | log-prod |
| 17× | unpow3 |
| 17× | cube-mult |
| 15× | distribute-lft-in |
| 15× | distribute-rgt-in |
| 13× | pow-plus |
| 10× | pow2 |
| 9× | cbrt-unprod |
| 9× | prod-exp |
| 5× | div-inv |
| 5× | associate-*l* |
| 5× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 2× | *-commutative |
| 1× | rem-cube-cbrt |
| 1× | associate-/r/ |
| 1× | pow-exp |
| 1× | pow1/3 |
| 1× | pow-pow |
| 1× | cbrt-div |
| 1× | pow-to-exp |
| 20.0ms | (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) |
| 5.0ms | (* (log (hypot re im)) (log (hypot re im))) |
| 3.0ms | (cbrt (/ (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 1.0ms | (pow (log base) 3) |
| 172.0ms | (pow (log base) 3) |
| 115.0ms | (cbrt (/ (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))) (/ (pow (log base) 3) (log (hypot re im))))) |
| 112.0ms | (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) |
| 76.0ms | (* (log (hypot re im)) (log (hypot re im))) |
| 458.0ms | (pow (- (log -1) (log (/ -1 base))) 3) |
| 453.0ms | (cbrt (/ (* (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im)))))) (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))))) (/ (pow (sqrt (log base)) 3) 1))) |
| 433.0ms | (cbrt (/ (* (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im)))))) (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))))) (/ (pow (sqrt (log base)) 3) 1))) |
| 407.0ms | (cbrt (/ (* (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im)))))) (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))))) (/ (* (cbrt (pow (log base) 3)) (cbrt (pow (log base) 3))) (* (cbrt (log (hypot re im))) (cbrt (log (hypot re im))))))) |
| 392.0ms | (cbrt (/ (* (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im)))))) (cbrt (cbrt (* (* (* (log (hypot re im)) (log (hypot re im))) (* (log (hypot re im)) (log (hypot re im)))) (* (log (hypot re im)) (log (hypot re im))))))) (/ (pow (sqrt (log base)) 3) 1))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 0b
0% (0.4b remaining)
Error of 0.4b against oracle of 0.0b and baseline of 0.4b
| 27.8s | 7990× | body | 10240 | exit |
| 5.3s | 16018× | body | 80 | nan |
| 2.3s | 8000× | body | 80 | valid |