



Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 33.3 |
|---|---|
| Target | 20.6 |
| Herbie | 10.1 |
if b < -3.4363098102745e-82Initial program 51.8
rmApplied *-commutative51.8
Taylor expanded around -inf 9.8
Simplified9.8
if -3.4363098102745e-82 < b < 5.825682153804059e+126Initial program 12.3
rmApplied *-commutative12.3
rmApplied div-sub12.3
rmApplied div-inv12.4
if 5.825682153804059e+126 < b Initial program 51.6
rmApplied *-commutative51.6
rmApplied div-sub51.6
Taylor expanded around inf 2.8
Final simplification10.1
herbie shell --seed 2019018
(FPCore (a b c)
:name "quadm (p42, negative)"
:herbie-target
(if (< b 0) (/ c (* a (/ (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)))) (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)))
(/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)))
Time bar (total: 19.6s)Debug log
| 27.0ms | 31× | body | 2560 | valid |
| 17.0ms | 188× | body | 80 | valid |
| 12.0ms | 27× | body | 1280 | valid |
| 9.0ms | 103× | body | 80 | nan |
| 6.0ms | 17× | body | 640 | valid |
| 2.0ms | 6× | body | 320 | valid |
| 1.0ms | 2× | body | 5120 | valid |
| 1.0ms | 5× | body | 160 | valid |
| 91.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 32.3b
Found 4 expressions with local error:
| 19.5b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 1.1b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.1b | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 0.0b | (* 4 (* a c)) |
| 20× | add-sqr-sqrt |
| 13× | *-un-lft-identity |
| 7× | add-cube-cbrt |
| 6× | difference-of-squares |
| 6× | add-log-exp |
| 6× | associate-/l* |
| 6× | sqrt-prod |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | times-frac |
| 4× | pow1 |
| 3× | distribute-lft-out-- |
| 3× | flip-- |
| 3× | flip3-- |
| 2× | associate-/l/ |
| 2× | sqrt-div |
| 1× | div-inv |
| 1× | *-commutative |
| 1× | associate-*r* |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | cbrt-undiv |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 30.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 20.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 4.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 2.0ms | (* 4 (* a c)) |
| 87.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 64.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 57.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 19.0ms | (* 4 (* a c)) |
| 364.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 249.0ms | (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) |
| 236.0ms | (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) |
| 188.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 90.0ms | (- b (* 2 (/ (* a c) b))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 5.9b
Found 4 expressions with local error:
| 19.5b | (sqrt (- (* b b) (* (* a c) 4))) |
| 1.1b | (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) |
| 0.1b | (/ (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) (* 2 a)) |
| 0.0b | (* (* a c) 4) |
| 20× | add-sqr-sqrt |
| 13× | *-un-lft-identity |
| 7× | add-cube-cbrt |
| 6× | difference-of-squares |
| 6× | add-log-exp |
| 6× | associate-/l* |
| 6× | sqrt-prod |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | times-frac |
| 4× | pow1 |
| 3× | distribute-lft-out-- |
| 3× | flip-- |
| 3× | flip3-- |
| 2× | associate-/l/ |
| 2× | sqrt-div |
| 1× | div-inv |
| 1× | *-commutative |
| 1× | associate-*l* |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | cbrt-undiv |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 21.0ms | (/ (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) (* 2 a)) |
| 11.0ms | (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) |
| 4.0ms | (sqrt (- (* b b) (* (* a c) 4))) |
| 2.0ms | (* (* a c) 4) |
| 60.0ms | (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) |
| 56.0ms | (sqrt (- (* b b) (* (* a c) 4))) |
| 56.0ms | (/ (- (- b) (sqrt (- (* b b) (* (* a c) 4)))) (* 2 a)) |
| 12.0ms | (* (* a c) 4) |
| 359.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* a c) 4) 3))) |
| 302.0ms | (- (pow (- b) 3) (pow (sqrt (- (* b b) (* (* a c) 4))) 3)) |
| 248.0ms | (- (* (- b) (- b)) (* (sqrt (- (* b b) (* (* a c) 4))) (sqrt (- (* b b) (* (* a c) 4))))) |
| 169.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* a c) 4) (* (* a c) 4)))) |
| 86.0ms | (- b (* 2 (/ (* a c) b))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 5.9b
Found 4 expressions with local error:
| 19.5b | (sqrt (- (* b b) (* (* a c) 4))) |
| 6.5b | (- (/ (- b) (* 2 a)) (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a))) |
| 0.1b | (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a)) |
| 0.0b | (* (* a c) 4) |
| 13× | *-un-lft-identity |
| 12× | add-sqr-sqrt |
| 9× | sqrt-prod |
| 9× | add-cube-cbrt |
| 8× | times-frac |
| 6× | add-log-exp |
| 6× | associate-/l* |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 4× | sqrt-div |
| 4× | pow1 |
| 3× | flip-- |
| 3× | div-inv |
| 3× | flip3-- |
| 2× | associate-/l/ |
| 2× | distribute-lft-out-- |
| 1× | difference-of-squares |
| 1× | sub-div |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | associate-*l* |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | distribute-rgt-out-- |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | cbrt-undiv |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 14.0ms | (- (/ (- b) (* 2 a)) (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a))) |
| 5.0ms | (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a)) |
| 2.0ms | (sqrt (- (* b b) (* (* a c) 4))) |
| 2.0ms | (* (* a c) 4) |
| 81.0ms | (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a)) |
| 79.0ms | (- (/ (- b) (* 2 a)) (/ (sqrt (- (* b b) (* (* a c) 4))) (* 2 a))) |
| 43.0ms | (sqrt (- (* b b) (* (* a c) 4))) |
| 17.0ms | (* (* a c) 4) |
| 332.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* a c) 4) 3))) |
| 320.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* a c) 4) 3))) |
| 154.0ms | (- (* (- b) (* 2 a)) (* (* 2 a) (sqrt (- (* b b) (* (* a c) 4))))) |
| 116.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* a c) 4) (* (* a c) 4)))) |
| 111.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* a c) 4) (* (* a c) 4)))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 5.9b
Found 4 expressions with local error:
| 19.5b | (sqrt (- (* b b) (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4))))) |
| 14.0b | (cbrt (* (* a c) 4)) |
| 14.0b | (cbrt (* (* a c) 4)) |
| 14.0b | (cbrt (* (* a c) 4)) |
| 6× | add-sqr-sqrt |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | sqrt-prod |
| 3× | pow1/3 |
| 3× | cbrt-prod |
| 2× | sqrt-div |
| 1× | flip-- |
| 1× | pow1/2 |
| 1× | flip3-- |
| 1× | rem-sqrt-square |
| 2.0ms | (cbrt (* (* a c) 4)) |
| 2.0ms | (cbrt (* (* a c) 4)) |
| 2.0ms | (cbrt (* (* a c) 4)) |
| 2.0ms | (sqrt (- (* b b) (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4))))) |
| 137.0ms | (cbrt (* (* a c) 4)) |
| 131.0ms | (cbrt (* (* a c) 4)) |
| 117.0ms | (cbrt (* (* a c) 4)) |
| 100.0ms | (sqrt (- (* b b) (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4))))) |
| 357.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4))) 3))) |
| 211.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4))) (* (* (cbrt (* (* a c) 4)) (cbrt (* (* a c) 4))) (cbrt (* (* a c) 4)))))) |
| 180.0ms | (* (exp (* -1/3 (+ (log (/ 1 a)) (log (/ 1 c))))) (cbrt 4)) |
| 141.0ms | (* (exp (* -1/3 (+ (log (/ -1 c)) (log (/ -1 a))))) (cbrt 4)) |
| 138.0ms | (* (exp (* -1/3 (+ (log (/ -1 c)) (log (/ -1 a))))) (cbrt 4)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 5.9b
84% (4.5b remaining)
Error of 10.1b against oracle of 5.6b and baseline of 33.7b
| 1.4s | 5895× | body | 80 | valid |
| 1.2s | 1083× | body | 2560 | valid |
| 674.0ms | 862× | body | 1280 | valid |
| 422.0ms | 2784× | body | 80 | nan |
| 308.0ms | 465× | body | 640 | valid |
| 117.0ms | 110× | body | 5120 | valid |
| 114.0ms | 202× | body | 320 | valid |
| 30.0ms | 112× | body | 160 | valid |