



Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 33.0 |
|---|---|
| Target | 20.8 |
| Herbie | 7.2 |
if b < -2.149882403051541e+52Initial program 56.9
Taylor expanded around -inf 56.9
Taylor expanded around -inf 3.6
Simplified3.6
if -2.149882403051541e+52 < b < -5.3114917253015484e-256Initial program 31.6
rmApplied div-inv31.7
rmApplied flip--31.8
Applied associate-*l/31.8
Simplified17.6
Taylor expanded around 0 9.2
if -5.3114917253015484e-256 < b < 1.628277854542934e+68Initial program 10.3
Taylor expanded around -inf 10.3
if 1.628277854542934e+68 < b Initial program 37.5
Taylor expanded around inf 5.2
Final simplification7.2
herbie shell --seed 1137770271
(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: 37.0s)Debug log
| 192× | 46.0ms | (body real 80) |
| 30× | 44.0ms | (body real 2560) |
| 32× | 40.0ms | (body real 1280) |
| 98× | 21.0ms | (body nan 80) |
| 17× | 16.0ms | (body real 640) |
| 381× | 12.0ms | (pre true 80) |
| 10× | 7.0ms | (body real 320) |
| 1× | 2.0ms | (body real 5120) |
| 1× | 0.0ms | (body real 160) |
| 162.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 33.0b
Found 4 expressions with local error:
| 22.2b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 0.6b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.4b | (- (* 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- |
| 41.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 14.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 107.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 92.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 88.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 54.0ms | (- (* b b) (* 4 (* a c))) |
| 453.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 442.0ms | (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) |
| 358.0ms | (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) |
| 250.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 191.0ms | (- b (* 2 (/ (* a c) b))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 7.1b
Found 4 expressions with local error:
| 22.2b | (sqrt (- (pow b 2) (* 4 (* a c)))) |
| 0.6b | (- (- b) (sqrt (- (pow b 2) (* 4 (* a c))))) |
| 0.4b | (- (pow b 2) (* 4 (* a c))) |
| 0.1b | (/ (- (- b) (sqrt (- (pow b 2) (* 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- |
| 52.0ms | (/ (- (- b) (sqrt (- (pow b 2) (* 4 (* a c))))) (* 2 a)) |
| 17.0ms | (- (- b) (sqrt (- (pow b 2) (* 4 (* a c))))) |
| 8.0ms | (- (pow b 2) (* 4 (* a c))) |
| 7.0ms | (sqrt (- (pow b 2) (* 4 (* a c)))) |
| 113.0ms | (/ (- (- b) (sqrt (- (pow b 2) (* 4 (* a c))))) (* 2 a)) |
| 100.0ms | (- (- b) (sqrt (- (pow b 2) (* 4 (* a c))))) |
| 82.0ms | (sqrt (- (pow b 2) (* 4 (* a c)))) |
| 56.0ms | (- (pow b 2) (* 4 (* a c))) |
| 1.5s | (- (* (- b) (- b)) (* (sqrt (- (pow b 2) (* 4 (* a c)))) (sqrt (- (pow b 2) (* 4 (* a c)))))) |
| 554.0ms | (sqrt (- (pow (pow b 2) 3) (pow (* 4 (* a c)) 3))) |
| 390.0ms | (- (pow (- b) 3) (pow (sqrt (- (pow b 2) (* 4 (* a c)))) 3)) |
| 268.0ms | (sqrt (- (* (pow b 2) (pow b 2)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 211.0ms | (- b (* 2 (/ (* a c) b))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 7.1b
Found 4 expressions with local error:
| 22.2b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 0.6b | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.4b | (- (* b b) (* 4 (* a c))) |
| 0.2b | (* (- (- 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- |
| 35.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 17.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 6.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 488.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 105.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
| 81.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 56.0ms | (- (* b b) (* 4 (* a c))) |
| 822.0ms | (* (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) 1) |
| 793.0ms | (* (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) 1) |
| 625.0ms | (* (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) (/ 1 (* 2 a))) |
| 496.0ms | (* (+ (* (- b) (- b)) (+ (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c))))) (* (- b) (sqrt (- (* b b) (* 4 (* a c))))))) (* 2 a)) |
| 483.0ms | (* (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (/ 1 (* 2 a))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 7.1b
Found 4 expressions with local error:
| 22.2b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 14.5b | (* (* (* 4 a) c) (/ 1/2 a)) |
| 0.7b | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 0.4b | (- (* 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 |
| 16.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 14.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 6.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 93.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 82.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 52.0ms | (- (* b b) (* 4 (* a c))) |
| 14.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 528.0ms | (+ (log (* (* 4 a) c)) (log (/ 1/2 a))) |
| 477.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 335.0ms | (* (* (* 4 a) c) (/ 1/2 a)) |
| 258.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 188.0ms | (- b (* 2 (/ (* a c) b))) |
8 alts after pruning (6 fresh and 2 done)
Merged error: 7.1b
94% (1.4b remaining)
Error of 7.2b against oracle of 5.8b and baseline of 29.8b
| 1039× | 1.7s | (body real 2560) |
| 5903× | 1.6s | (body real 80) |
| 884× | 1.2s | (body real 1280) |
| 11629× | 807.0ms | (pre true 80) |
| 2927× | 670.0ms | (body nan 80) |
| 446× | 493.0ms | (body real 640) |
| 116× | 292.0ms | (body real 5120) |
| 214× | 156.0ms | (body real 320) |
| 100× | 48.0ms | (body real 160) |