



Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 33.0 |
|---|---|
| Target | 20.2 |
| Herbie | 6.7 |
if b < -3.113715444889159e+97Initial program 58.5
rmApplied div-inv58.5
Taylor expanded around -inf 2.5
Simplified2.5
if -3.113715444889159e+97 < b < 3.743477545150262e-272Initial program 30.5
rmApplied div-inv30.5
rmApplied flip--30.7
Applied associate-*l/30.7
Simplified15.3
Taylor expanded around inf 9.1
if 3.743477545150262e-272 < b < 1.2614257711811345e+67Initial program 8.3
rmApplied div-inv8.4
if 1.2614257711811345e+67 < b Initial program 38.5
rmApplied div-inv38.6
Taylor expanded around inf 5.3
Final simplification6.7
herbie shell --seed 1042149663
(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: 33.8s)Debug log
| 359× | (pre true 80) |
| 200× | (body real 80) |
| 85× | (body nan 80) |
| 34× | (body real 2560) |
| 20× | (body real 1280) |
| 13× | (body real 640) |
| 3× | (body real 5120) |
| 2× | (body real 320) |
| 2× | (body real 160) |
| 159.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.2b
Found 4 expressions with local error:
| 22.7b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 0.8b | (- (* b b) (* 4 (* a c))) |
| 0.5b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.1b | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 20× | add-sqr-sqrt |
| 13× | *-un-lft-identity |
| 8× | add-log-exp |
| 7× | add-cube-cbrt |
| 6× | difference-of-squares |
| 6× | associate-/l* |
| 6× | sqrt-prod |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | times-frac |
| 4× | flip-- |
| 4× | flip3-- |
| 4× | pow1 |
| 3× | distribute-lft-out-- |
| 2× | associate-/l/ |
| 2× | diff-log |
| 2× | sqrt-div |
| 2× | sub-neg |
| 1× | div-inv |
| 1× | div-exp |
| 1× | div-sub |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | cbrt-undiv |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 35.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 13.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 11.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 104.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 89.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 81.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 54.0ms | (- (* b b) (* 4 (* a c))) |
| 464.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 403.0ms | (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) |
| 346.0ms | (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) |
| 244.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 189.0ms | (- b (* 2 (/ (* a c) b))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 5.4b
Found 4 expressions with local error:
| 22.7b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 0.8b | (- (* b b) (* 4 (* a c))) |
| 0.5b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.3b | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 16× | add-sqr-sqrt |
| 11× | *-un-lft-identity |
| 8× | add-log-exp |
| 8× | add-exp-log |
| 7× | add-cube-cbrt |
| 6× | associate-*l* |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 5× | flip-- |
| 5× | sqrt-prod |
| 5× | flip3-- |
| 4× | difference-of-squares |
| 4× | associate-*r* |
| 2× | distribute-lft-out-- |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | diff-log |
| 2× | sqrt-div |
| 2× | sub-neg |
| 2× | frac-times |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | un-div-inv |
| 1× | associate-*r/ |
| 1× | pow-prod-down |
| 1× | pow1/2 |
| 1× | rec-exp |
| 1× | rem-sqrt-square |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 31.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 13.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 109.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 89.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 81.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 53.0ms | (- (* b b) (* 4 (* a c))) |
| 753.0ms | (* (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) 1) |
| 665.0ms | (* (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) 1) |
| 568.0ms | (* (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) (/ 1 (* 2 a))) |
| 490.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 456.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 5.4b
Found 4 expressions with local error:
| 22.7b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 0.8b | (- (* b b) (* 4 (* a c))) |
| 0.5b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.2b | (/ 1 (/ (* 2 a) (- (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 16× | add-sqr-sqrt |
| 12× | associate-/r* |
| 11× | *-un-lft-identity |
| 8× | add-log-exp |
| 7× | add-cube-cbrt |
| 7× | add-exp-log |
| 6× | times-frac |
| 5× | sqrt-prod |
| 5× | pow1 |
| 4× | difference-of-squares |
| 4× | flip-- |
| 4× | add-cbrt-cube |
| 4× | flip3-- |
| 3× | associate-/r/ |
| 2× | distribute-lft-out-- |
| 2× | div-inv |
| 2× | diff-log |
| 2× | sqrt-div |
| 2× | sub-neg |
| 2× | rec-exp |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | div-exp |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | neg-sub0 |
| 1× | associate--l- |
| 16.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 12.0ms | (/ 1 (/ (* 2 a) (- (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 132.0ms | (/ 1 (/ (* 2 a) (- (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 90.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 80.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 51.0ms | (- (* b b) (* 4 (* a c))) |
| 591.0ms | (+ (* (- b) (- b)) (+ (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c))))) (* (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 457.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 245.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 188.0ms | (- b (* 2 (/ (* a c) b))) |
| 120.0ms | (sqrt (/ (* 2 a) (- (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
9 alts after pruning (7 fresh and 2 done)
Merged error: 5.4b
Found 4 expressions with local error:
| 22.7b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 13.1b | (* (* (* 4 a) c) (/ 1/2 a)) |
| 0.8b | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.8b | (- (* b b) (* 4 (* a c))) |
| 8× | add-log-exp |
| 8× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | add-cube-cbrt |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 4× | associate-*r* |
| 3× | sqrt-prod |
| 2× | flip-- |
| 2× | sqrt-div |
| 2× | flip3-- |
| 1× | distribute-lft-out |
| 1× | div-inv |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | associate-+l- |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*l* |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 1× | neg-sub0 |
| 15.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 13.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 91.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 81.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 51.0ms | (- (* b b) (* 4 (* a c))) |
| 13.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 522.0ms | (+ (log (* (* 4 a) c)) (log (/ 1/2 a))) |
| 451.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 338.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 247.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 190.0ms | (- b (* 2 (/ (* a c) b))) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 5.4b
95.9% (1.1b remaining)
Error of 6.7b against oracle of 5.5b and baseline of 33.1b
| 11661× | (pre true 80) |
| 5921× | (body real 80) |
| 2918× | (body nan 80) |
| 1021× | (body real 2560) |
| 880× | (body real 1280) |
| 469× | (body real 640) |
| 230× | (body real 320) |
| 117× | (body real 5120) |
| 105× | (body real 160) |