



Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 33.7 |
|---|---|
| Target | 20.3 |
| Herbie | 8.7 |
if b < -4799886.458194201Initial program 55.7
Taylor expanded around -inf 4.3
Simplified4.3
if -4799886.458194201 < b < -2.0171640414531174e-134Initial program 35.1
rmApplied flip--35.2
Applied associate-/l/39.4
Simplified23.6
rmApplied times-frac19.2
Simplified19.2
Simplified19.2
if -2.0171640414531174e-134 < b < 6.207549349185736e+126Initial program 11.1
if 6.207549349185736e+126 < b Initial program 50.7
rmApplied flip--61.9
Applied associate-/l/62.1
Simplified62.3
Taylor expanded around 0 2.9
Simplified2.9
Final simplification8.7
herbie shell --seed 323378853
(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: 26.3s)Debug log
| 61.0ms | 38× | body | 2560 | valid |
| 48.0ms | 37× | body | 1280 | valid |
| 43.0ms | 168× | body | 80 | valid |
| 21.0ms | 21× | body | 640 | valid |
| 19.0ms | 84× | body | 80 | nan |
| 5.0ms | 7× | body | 320 | valid |
| 4.0ms | 2× | body | 5120 | valid |
| 2.0ms | 3× | body | 160 | valid |
| 166.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 35.4b
Found 4 expressions with local error:
| 24.4b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 1.4b | (- (* b b) (* 4 (* a c))) |
| 0.6b | (- (- 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- |
| 40.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 15.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 112.0ms | (/ (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) (* 2 a)) |
| 96.0ms | (- (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 92.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 56.0ms | (- (* b b) (* 4 (* a c))) |
| 443.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 383.0ms | (- (* (- b) (- b)) (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c)))))) |
| 341.0ms | (- (pow (- b) 3) (pow (sqrt (- (* b b) (* 4 (* a c)))) 3)) |
| 239.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
| 185.0ms | (- b (* 2 (/ (* a c) b))) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 4.8b
Found 4 expressions with local error:
| 24.4b | (sqrt (- (* b b) (* 4 (* a c)))) |
| 16.6b | (/ (* (* c 4) a) (* (* 2 a) (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 1.8b | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 1.4b | (- (* b b) (* 4 (* a c))) |
| 9× | add-exp-log |
| 9× | add-cbrt-cube |
| 8× | add-log-exp |
| 7× | *-un-lft-identity |
| 6× | add-sqr-sqrt |
| 5× | add-cube-cbrt |
| 4× | pow1 |
| 3× | sqrt-prod |
| 2× | flip-- |
| 2× | flip-+ |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | div-exp |
| 2× | sqrt-div |
| 2× | flip3-- |
| 2× | flip3-+ |
| 2× | cbrt-undiv |
| 1× | associate-/l* |
| 1× | distribute-lft-out |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | associate-+l- |
| 1× | prod-exp |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | times-frac |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 1× | neg-sub0 |
| 26.0ms | (/ (* (* c 4) a) (* (* 2 a) (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 13.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 5.0ms | (- (* b b) (* 4 (* a c))) |
| 5.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 234.0ms | (/ (* (* c 4) a) (* (* 2 a) (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 88.0ms | (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) |
| 85.0ms | (sqrt (- (* b b) (* 4 (* a c)))) |
| 51.0ms | (- (* b b) (* 4 (* a c))) |
| 1.0s | (/ (* (* (* (* c 4) a) (* (* c 4) a)) (* (* c 4) a)) (* (* (* (* 2 a) (* 2 a)) (* 2 a)) (* (* (+ (- b) (sqrt (- (* b b) (* 4 (* a c))))) (+ (- b) (sqrt (- (* b b) (* 4 (* a c)))))) (+ (- b) (sqrt (- (* b b) (* 4 (* a c)))))))) |
| 1.0s | (/ (* (* (* (* c 4) a) (* (* c 4) a)) (* (* c 4) a)) (* (* (* (* 2 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)))))))) |
| 461.0ms | (+ (* (- b) (- b)) (- (* (sqrt (- (* b b) (* 4 (* a c)))) (sqrt (- (* b b) (* 4 (* a c))))) (* (- b) (sqrt (- (* b b) (* 4 (* a c))))))) |
| 440.0ms | (sqrt (- (pow (* b b) 3) (pow (* 4 (* a c)) 3))) |
| 238.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 4 (* a c)) (* 4 (* a c))))) |
7 alts after pruning (5 fresh and 2 done)
Merged error: 4.7b
Found 4 expressions with local error:
| 24.4b | (sqrt (+ (* -4 (* a c)) (* b b))) |
| 14.6b | (/ (* (* c 4) a) (* 2 a)) |
| 1.8b | (- (sqrt (+ (* -4 (* a c)) (* b b))) b) |
| 1.4b | (+ (* -4 (* a c)) (* b b)) |
| 6× | add-log-exp |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | add-sqr-sqrt |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 4× | pow1 |
| 3× | sqrt-prod |
| 2× | flip-+ |
| 2× | sqrt-div |
| 2× | flip3-+ |
| 1× | associate-/l* |
| 1× | flip-- |
| 1× | div-inv |
| 1× | div-exp |
| 1× | pow1/2 |
| 1× | flip3-- |
| 1× | times-frac |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 26.0ms | (- (sqrt (+ (* -4 (* a c)) (* b b))) b) |
| 12.0ms | (/ (* (* c 4) a) (* 2 a)) |
| 7.0ms | (+ (* -4 (* a c)) (* b b)) |
| 5.0ms | (sqrt (+ (* -4 (* a c)) (* b b))) |
| 93.0ms | (- (sqrt (+ (* -4 (* a c)) (* b b))) b) |
| 83.0ms | (sqrt (+ (* -4 (* a c)) (* b b))) |
| 62.0ms | (+ (* -4 (* a c)) (* b b)) |
| 10.0ms | (/ (* (* c 4) a) (* 2 a)) |
| 990.0ms | (/ (* (* (* (* c 4) a) (* (* c 4) a)) (* (* c 4) a)) (* (* (* 2 a) (* 2 a)) (* 2 a))) |
| 900.0ms | (- (log (* (* c 4) a)) (log (* 2 a))) |
| 316.0ms | (sqrt (- (* (* -4 (* a c)) (* -4 (* a c))) (* (* b b) (* b b)))) |
| 249.0ms | (sqrt (+ (pow (* -4 (* a c)) 3) (pow (* b b) 3))) |
| 53.0ms | (- (pow b 2) (* 4 (* a c))) |
7 alts after pruning (4 fresh and 3 done)
Merged error: 4.7b
Found 0 expressions with local error:
7 alts after pruning (3 fresh and 4 done)
Merged error: 4.7b
87% (3.4b remaining)
Error of 8.7b against oracle of 5.2b and baseline of 31.5b
| 2.1s | 1078× | body | 2560 | valid |
| 1.5s | 5762× | body | 80 | valid |
| 1.3s | 927× | body | 1280 | valid |
| 700.0ms | 2974× | body | 80 | nan |
| 537.0ms | 483× | body | 640 | valid |
| 264.0ms | 117× | body | 5120 | valid |
| 177.0ms | 250× | body | 320 | valid |
| 58.0ms | 124× | body | 160 | valid |