


Bits error versus a



Bits error versus b



Bits error versus c



Bits error versus d
if b < -1.2165750385518375e+144Initial program 57.3
Taylor expanded around 0 57.3
Taylor expanded around -inf 11.5
Simplified11.5
if -1.2165750385518375e+144 < b < 3.0061788106952535e-55Initial program 13.1
Taylor expanded around 0 13.1
if 3.0061788106952535e-55 < b Initial program 53.4
Taylor expanded around inf 18.3
Final simplification14.9
herbie shell --seed 2019022 +o rules:numerics
(FPCore (a b c d)
:name "Cubic critical"
(/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))
Time bar (total: 19.4s)Debug log
| 32.0ms | 39× | body | 2560 | valid |
| 23.0ms | 181× | body | 80 | valid |
| 16.0ms | 105× | body | 80 | nan |
| 14.0ms | 23× | body | 1280 | valid |
| 10.0ms | 20× | body | 640 | valid |
| 3.0ms | 4× | body | 5120 | valid |
| 2.0ms | 7× | body | 320 | valid |
| 1.0ms | 3× | body | 160 | valid |
| 103.0ms | (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 31.8b
Found 4 expressions with local error:
| 21.8b | (sqrt (- (* b b) (* (* 3 a) c))) |
| 1.0b | (- (* b b) (* (* 3 a) c)) |
| 1.0b | (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) |
| 0.2b | (* (* 3 a) c) |
| 8× | add-log-exp |
| 8× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | add-cube-cbrt |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | fma-def |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sqrt-prod |
| 2× | flip-- |
| 2× | sqrt-div |
| 2× | flip3-- |
| 1× | distribute-lft-out |
| 1× | flip-+ |
| 1× | associate-+l- |
| 1× | *-commutative |
| 1× | prod-diff |
| 1× | associate-*l* |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | pow1/2 |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | neg-mul-1 |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 1× | neg-sub0 |
| 11.0ms | (- (* b b) (* (* 3 a) c)) |
| 6.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 6.0ms | (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) |
| 2.0ms | (* (* 3 a) c) |
| 86.0ms | (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) |
| 58.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 42.0ms | (- (* b b) (* (* 3 a) c)) |
| 17.0ms | (* (* 3 a) c) |
| 347.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 194.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* 3 a) c) (* (* 3 a) c)))) |
| 136.0ms | (- b (* 3/2 (/ (* a c) b))) |
| 106.0ms | (* (exp (- b)) (exp (sqrt (- (* b b) (* (* 3 a) c))))) |
| 84.0ms | (/ (exp (* b b)) (exp (* (* 3 a) c))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 12.5b
Found 4 expressions with local error:
| 21.8b | (sqrt (- (* b b) (* 3 (* a c)))) |
| 1.0b | (- (* b b) (* 3 (* a c))) |
| 1.0b | (+ (- b) (sqrt (- (* b b) (* 3 (* a c))))) |
| 0.2b | (* 3 (* a c)) |
| 8× | add-log-exp |
| 8× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | add-cube-cbrt |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | fma-def |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sqrt-prod |
| 2× | flip-- |
| 2× | sqrt-div |
| 2× | flip3-- |
| 1× | distribute-lft-out |
| 1× | flip-+ |
| 1× | associate-+l- |
| 1× | *-commutative |
| 1× | prod-diff |
| 1× | associate-*r* |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | pow1/2 |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | neg-mul-1 |
| 1× | rem-sqrt-square |
| 1× | +-commutative |
| 1× | neg-sub0 |
| 15.0ms | (+ (- b) (sqrt (- (* b b) (* 3 (* a c))))) |
| 6.0ms | (sqrt (- (* b b) (* 3 (* a c)))) |
| 5.0ms | (- (* b b) (* 3 (* a c))) |
| 2.0ms | (* 3 (* a c)) |
| 65.0ms | (+ (- b) (sqrt (- (* b b) (* 3 (* a c))))) |
| 59.0ms | (sqrt (- (* b b) (* 3 (* a c)))) |
| 38.0ms | (- (* b b) (* 3 (* a c))) |
| 12.0ms | (* 3 (* a c)) |
| 301.0ms | (sqrt (- (pow (* b b) 3) (pow (* 3 (* a c)) 3))) |
| 164.0ms | (sqrt (- (* (* b b) (* b b)) (* (* 3 (* a c)) (* 3 (* a c))))) |
| 134.0ms | (- b (* 3/2 (/ (* a c) b))) |
| 92.0ms | (/ (exp (* b b)) (exp (* 3 (* a c)))) |
| 86.0ms | (* (exp (- b)) (exp (sqrt (- (* b b) (* 3 (* a c)))))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 12.5b
Found 4 expressions with local error:
| 21.8b | (sqrt (- (* b b) (* (* 3 a) c))) |
| 21.8b | (sqrt (- (* b b) (* (* 3 a) c))) |
| 1.0b | (- (* b b) (* (* 3 a) c)) |
| 1.0b | (- (* b b) (* (* 3 a) c)) |
| 8× | add-log-exp |
| 8× | add-sqr-sqrt |
| 6× | sqrt-prod |
| 6× | add-cube-cbrt |
| 6× | *-un-lft-identity |
| 4× | flip-- |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | sqrt-div |
| 4× | add-cbrt-cube |
| 4× | flip3-- |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 2× | prod-diff |
| 2× | diff-log |
| 2× | fma-neg |
| 2× | pow1/2 |
| 2× | sub-neg |
| 2× | rem-sqrt-square |
| 4.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 3.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 2.0ms | (- (* b b) (* (* 3 a) c)) |
| 2.0ms | (- (* b b) (* (* 3 a) c)) |
| 42.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 42.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 30.0ms | (- (* b b) (* (* 3 a) c)) |
| 24.0ms | (- (* b b) (* (* 3 a) c)) |
| 357.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 286.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 187.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* 3 a) c) (* (* 3 a) c)))) |
| 165.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* 3 a) c) (* (* 3 a) c)))) |
| 162.0ms | (- b (* 3/2 (/ (* a c) b))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 12.5b
Found 4 expressions with local error:
| 22.6b | (cbrt (- (* b b) (* (* 3 a) c))) |
| 22.6b | (cbrt (- (* b b) (* (* 3 a) c))) |
| 22.6b | (cbrt (- (* b b) (* (* 3 a) c))) |
| 21.8b | (sqrt (- (* b b) (* (* 3 a) c))) |
| 9× | add-sqr-sqrt |
| 9× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 6× | cbrt-div |
| 4× | add-log-exp |
| 4× | flip-- |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | flip3-- |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sqrt-prod |
| 3× | pow1/3 |
| 2× | sqrt-div |
| 1× | pow1/2 |
| 1× | rem-sqrt-square |
| 6.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 3.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 3.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 3.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 99.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 96.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 88.0ms | (cbrt (- (* b b) (* (* 3 a) c))) |
| 48.0ms | (sqrt (- (* b b) (* (* 3 a) c))) |
| 428.0ms | (cbrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 358.0ms | (sqrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 307.0ms | (cbrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 306.0ms | (cbrt (- (pow (* b b) 3) (pow (* (* 3 a) c) 3))) |
| 219.0ms | (sqrt (- (* (* b b) (* b b)) (* (* (* 3 a) c) (* (* 3 a) c)))) |
11 alts after pruning (9 fresh and 2 done)
Merged error: 12.5b
86.4% (2.9b remaining)
Error of 14.9b against oracle of 12.0b and baseline of 33.3b
| 1.1s | 968× | body | 1280 | valid |
| 990.0ms | 1043× | body | 2560 | valid |
| 904.0ms | 5812× | body | 80 | valid |
| 562.0ms | 104× | body | 5120 | valid |
| 399.0ms | 2937× | body | 80 | nan |
| 255.0ms | 452× | body | 640 | valid |
| 109.0ms | 201× | body | 320 | valid |
| 32.0ms | 125× | body | 160 | valid |