


Bits error versus g



Bits error versus h
Initial program 1.0
Simplified1.0
rmApplied add-log-exp1.0
rmApplied log1p-expm1-u1.0
rmApplied add-sqr-sqrt1.0
Applied associate-/l*1.0
Final simplification1.0
herbie shell --seed 2019022 +o rules:numerics
(FPCore (g h)
:name "2-ancestry mixing, negative discriminant"
(* 2 (cos (+ (/ (* 2 PI) 3) (/ (acos (/ (- g) h)) 3)))))
Time bar (total: 10.7s)Debug log
| 43.0ms | 293× | body | 80 | nan |
| 36.0ms | 256× | body | 80 | valid |
| 24.0ms | (* 2 (cos (+ (/ (* 2 PI) 3) (/ (acos (/ (- g) h)) 3)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 1.0b
Found 3 expressions with local error:
| 1.0b | (cos (fma 2/3 PI (/ (acos (/ (- g) h)) 3))) |
| 1.0b | (/ (acos (/ (- g) h)) 3) |
| 0.0b | (fma 2/3 PI (/ (acos (/ (- g) h)) 3)) |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | fma-udef |
| 2× | div-sub |
| 1× | div-inv |
| 1× | distribute-frac-neg |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cos-sum |
| 1× | acos-neg |
| 1× | acos-asin |
| 7.0ms | (/ (acos (/ (- g) h)) 3) |
| 4.0ms | (cos (fma 2/3 PI (/ (acos (/ (- g) h)) 3))) |
| 0.0ms | (fma 2/3 PI (/ (acos (/ (- g) h)) 3)) |
| 113.0ms | (cos (fma 2/3 PI (/ (acos (/ (- g) h)) 3))) |
| 33.0ms | (fma 2/3 PI (/ (acos (/ (- g) h)) 3)) |
| 11.0ms | (/ (acos (/ (- g) h)) 3) |
| 46.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 39.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 35.0ms | (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)) |
| 34.0ms | (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)) |
| 32.0ms | (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.9b
Found 4 expressions with local error:
| 1.0b | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 1.0b | (/ (acos (/ (- g) h)) 3) |
| 0.0b | (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))) |
| 0.0b | (log (exp (/ (acos (/ (- g) h)) 3))) |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 5× | log-pow |
| 5× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | div-sub |
| 4× | add-cbrt-cube |
| 4× | exp-prod |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | log-prod |
| 2× | div-inv |
| 2× | fma-udef |
| 2× | distribute-frac-neg |
| 2× | exp-diff |
| 2× | log-div |
| 2× | acos-neg |
| 2× | acos-asin |
| 1× | rem-log-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cos-sum |
| 8.0ms | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 7.0ms | (/ (acos (/ (- g) h)) 3) |
| 3.0ms | (log (exp (/ (acos (/ (- g) h)) 3))) |
| 0.0ms | (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))) |
| 78.0ms | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 31.0ms | (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))) |
| 12.0ms | (log (exp (/ (acos (/ (- g) h)) 3))) |
| 7.0ms | (/ (acos (/ (- g) h)) 3) |
| 40.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 38.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 37.0ms | (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)) |
| 33.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 28.0ms | (* 1/3 (acos (* -1 (/ g h)))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.9b
Found 4 expressions with local error:
| 1.0b | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 1.0b | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))))) |
| 1.0b | (/ (acos (/ (- g) h)) 3) |
| 0.9b | (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))))) |
| 5× | log1p-expm1-u |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 2× | div-sub |
| 1× | expm1-udef |
| 1× | div-inv |
| 1× | fma-udef |
| 1× | distribute-frac-neg |
| 1× | log1p-expm1 |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | expm1-log1p |
| 1× | log1p-udef |
| 1× | cos-sum |
| 1× | acos-neg |
| 1× | acos-asin |
| 8.0ms | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 6.0ms | (/ (acos (/ (- g) h)) 3) |
| 1.0ms | (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))))) |
| 0.0ms | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))))) |
| 132.0ms | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))))) |
| 124.0ms | (expm1 (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3)))))) |
| 89.0ms | (cos (fma 2/3 PI (log (exp (/ (acos (/ (- g) h)) 3))))) |
| 12.0ms | (/ (acos (/ (- g) h)) 3) |
| 41.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 41.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 39.0ms | (- (exp (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)))) 1) |
| 39.0ms | (- (exp (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI)))) 1) |
| 31.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.9b
Found 4 expressions with local error:
| 1.0b | (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))) |
| 1.0b | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))))) |
| 0.9b | (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h)))))))))) |
| 0.9b | (sqrt (acos (/ (- g) h))) |
| 6× | add-sqr-sqrt |
| 5× | log1p-expm1-u |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | sqrt-prod |
| 1× | expm1-udef |
| 1× | fma-udef |
| 1× | log1p-expm1 |
| 1× | pow1/2 |
| 1× | expm1-log1p |
| 1× | log1p-udef |
| 1× | cos-sum |
| 1× | rem-sqrt-square |
| 9.0ms | (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))) |
| 1.0ms | (sqrt (acos (/ (- g) h))) |
| 1.0ms | (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h)))))))))) |
| 0.0ms | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))))) |
| 162.0ms | (log1p (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))))) |
| 134.0ms | (expm1 (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h)))))))))) |
| 107.0ms | (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))) |
| 12.0ms | (sqrt (acos (/ (- g) h))) |
| 39.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 39.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 38.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 37.0ms | (cos (+ (* 1/3 (acos (* -1 (/ g h)))) (* 2/3 PI))) |
| 34.0ms | (cos (fma 2/3 PI (log (exp (/ (sqrt (acos (/ (- g) h))) (/ 3 (sqrt (acos (/ (- g) h))))))))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.9b
0% (0.0b remaining)
Error of 1.0b against oracle of 1.0b and baseline of 1.0b
| 2.1s | 8000× | body | 80 | valid |
| 1.6s | 7998× | body | 80 | nan |