


Bits error versus a1



Bits error versus a2



Bits error versus th
Initial program 0.5
Simplified0.5
rmApplied associate-*l/0.5
rmApplied *-un-lft-identity0.5
Applied times-frac0.5
Simplified0.5
Final simplification0.5
herbie shell --seed 2019022 +o rules:numerics
(FPCore (a1 a2 th)
:name "Migdal et al, Equation (64)"
(+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))))
Time bar (total: 20.9s)Debug log
| 77.0ms | 77× | body | 1280 | valid |
| 59.0ms | 271× | body | 80 | valid |
| 40.0ms | 58× | body | 640 | valid |
| 19.0ms | 40× | body | 320 | valid |
| 5.0ms | 15× | body | 160 | valid |
| 91.0ms | (+ (* (/ (cos th) (sqrt 2)) (* a1 a1)) (* (/ (cos th) (sqrt 2)) (* a2 a2))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0.5b
Found 3 expressions with local error:
| 0.7b | (/ (cos th) (sqrt 2)) |
| 0.4b | (* (/ (cos th) (sqrt 2)) (fma a1 a1 (* a2 a2))) |
| 0.0b | (fma a1 a1 (* a2 a2)) |
| 19× | add-cube-cbrt |
| 19× | *-un-lft-identity |
| 19× | add-sqr-sqrt |
| 18× | times-frac |
| 13× | associate-*l* |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 5× | pow1 |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | fma-udef |
| 3× | associate-*r* |
| 3× | associate-/r* |
| 3× | expm1-log1p-u |
| 2× | div-inv |
| 2× | cbrt-unprod |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | *-commutative |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | distribute-rgt-in |
| 10.0ms | (* (/ (cos th) (sqrt 2)) (fma a1 a1 (* a2 a2))) |
| 6.0ms | (/ (cos th) (sqrt 2)) |
| 0.0ms | (fma a1 a1 (* a2 a2)) |
| 147.0ms | (* (/ (cos th) (sqrt 2)) (fma a1 a1 (* a2 a2))) |
| 40.0ms | (/ (cos th) (sqrt 2)) |
| 18.0ms | (fma a1 a1 (* a2 a2)) |
| 261.0ms | (/ (* (* (cos th) (cos th)) (cos th)) (* (* (sqrt 2) (sqrt 2)) (sqrt 2))) |
| 168.0ms | (- (+ (/ 1 (sqrt 2)) (* 1/24 (/ (pow th 4) (sqrt 2)))) (* 1/2 (/ (pow th 2) (sqrt 2)))) |
| 111.0ms | (* (/ (* (* (cos th) (cos th)) (cos th)) (* (* (sqrt 2) (sqrt 2)) (sqrt 2))) (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2)))) |
| 64.0ms | (* (* (* (/ (cos th) (sqrt 2)) (/ (cos th) (sqrt 2))) (/ (cos th) (sqrt 2))) (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2)))) |
| 62.0ms | (+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (cos th) (pow a2 2)) (sqrt 2))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.4b | (/ (* (cos th) (fma a1 a1 (* a2 a2))) (sqrt 2)) |
| 0.1b | (* (cos th) (fma a1 a1 (* a2 a2))) |
| 0.0b | (fma a1 a1 (* a2 a2)) |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 5× | pow1 |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | fma-udef |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | times-frac |
| 3× | associate-/r* |
| 3× | expm1-log1p-u |
| 2× | cbrt-unprod |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | *-commutative |
| 1× | pow-prod-down |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | distribute-rgt-in |
| 14.0ms | (/ (* (cos th) (fma a1 a1 (* a2 a2))) (sqrt 2)) |
| 4.0ms | (* (cos th) (fma a1 a1 (* a2 a2))) |
| 0.0ms | (fma a1 a1 (* a2 a2)) |
| 154.0ms | (/ (* (cos th) (fma a1 a1 (* a2 a2))) (sqrt 2)) |
| 120.0ms | (* (cos th) (fma a1 a1 (* a2 a2))) |
| 31.0ms | (fma a1 a1 (* a2 a2)) |
| 471.0ms | (* (* (* (cos th) (cos th)) (cos th)) (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2)))) |
| 99.0ms | (+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (cos th) (pow a2 2)) (sqrt 2))) |
| 84.0ms | (/ (* (* (* (cos th) (cos th)) (cos th)) (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2)))) (* (* (sqrt 2) (sqrt 2)) (sqrt 2))) |
| 77.0ms | (+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (cos th) (pow a2 2)) (sqrt 2))) |
| 66.0ms | (- (log (* (cos th) (fma a1 a1 (* a2 a2)))) (log (sqrt 2))) |
7 alts after pruning (6 fresh and 1 done)
Merged error: 0b
Found 3 expressions with local error:
| 0.4b | (/ (fma a1 a1 (* a2 a2)) (sqrt 2)) |
| 0.1b | (* (cos th) (/ (fma a1 a1 (* a2 a2)) (sqrt 2))) |
| 0.0b | (fma a1 a1 (* a2 a2)) |
| 19× | add-cube-cbrt |
| 19× | *-un-lft-identity |
| 19× | add-sqr-sqrt |
| 18× | times-frac |
| 13× | associate-*r* |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 5× | pow1 |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | associate-*l* |
| 3× | associate-/r* |
| 3× | expm1-log1p-u |
| 2× | div-inv |
| 2× | cbrt-unprod |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | fma-udef |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | clear-num |
| 6.0ms | (* (cos th) (/ (fma a1 a1 (* a2 a2)) (sqrt 2))) |
| 3.0ms | (/ (fma a1 a1 (* a2 a2)) (sqrt 2)) |
| 0.0ms | (fma a1 a1 (* a2 a2)) |
| 197.0ms | (* (cos th) (/ (fma a1 a1 (* a2 a2)) (sqrt 2))) |
| 79.0ms | (/ (fma a1 a1 (* a2 a2)) (sqrt 2)) |
| 19.0ms | (fma a1 a1 (* a2 a2)) |
| 365.0ms | (* (* (* (cos th) (cos th)) (cos th)) (* (* (/ (fma a1 a1 (* a2 a2)) (sqrt 2)) (/ (fma a1 a1 (* a2 a2)) (sqrt 2))) (/ (fma a1 a1 (* a2 a2)) (sqrt 2)))) |
| 129.0ms | (/ (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2))) (* (* (sqrt 2) (sqrt 2)) (sqrt 2))) |
| 95.0ms | (+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (cos th) (pow a2 2)) (sqrt 2))) |
| 78.0ms | (* (* (* (cos th) (cos th)) (cos th)) (/ (* (* (fma a1 a1 (* a2 a2)) (fma a1 a1 (* a2 a2))) (fma a1 a1 (* a2 a2))) (* (* (sqrt 2) (sqrt 2)) (sqrt 2)))) |
| 74.0ms | (+ (/ (* (pow a1 2) (cos th)) (sqrt 2)) (/ (* (cos th) (pow a2 2)) (sqrt 2))) |
7 alts after pruning (5 fresh and 2 done)
Merged error: 0b
Found 4 expressions with local error:
| 5.7b | (sqrt (fma a1 a1 (* a2 a2))) |
| 0.4b | (/ (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) (sqrt 2)) |
| 0.1b | (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) |
| 0.1b | (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) |
| 20× | add-exp-log |
| 20× | add-cbrt-cube |
| 12× | add-sqr-sqrt |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | pow1 |
| 9× | associate-*r* |
| 7× | cbrt-unprod |
| 7× | prod-exp |
| 6× | sqrt-prod |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow-prod-down |
| 4× | associate-*l* |
| 4× | expm1-log1p-u |
| 3× | div-exp |
| 3× | times-frac |
| 3× | associate-/r* |
| 3× | cbrt-undiv |
| 2× | *-commutative |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | hypot-def |
| 1× | fma-udef |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 28.0ms | (/ (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) (sqrt 2)) |
| 20.0ms | (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) |
| 8.0ms | (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) |
| 2.0ms | (sqrt (fma a1 a1 (* a2 a2))) |
| 261.0ms | (/ (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) (sqrt 2)) |
| 200.0ms | (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2)) |
| 113.0ms | (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) |
| 36.0ms | (sqrt (fma a1 a1 (* a2 a2))) |
| 633.0ms | (* (* (* (* (cos th) (cos th)) (cos th)) (* (* (sqrt (fma a1 a1 (* a2 a2))) (sqrt (fma a1 a1 (* a2 a2)))) (sqrt (fma a1 a1 (* a2 a2))))) (* (* (hypot a1 a2) (hypot a1 a2)) (hypot a1 a2))) |
| 236.0ms | (* (* (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (* (cos th) (sqrt (fma a1 a1 (* a2 a2))))) (* (cos th) (sqrt (fma a1 a1 (* a2 a2))))) (* (* (hypot a1 a2) (hypot a1 a2)) (hypot a1 a2))) |
| 220.0ms | (* (* (* (cos th) (cos th)) (cos th)) (* (* (sqrt (fma a1 a1 (* a2 a2))) (sqrt (fma a1 a1 (* a2 a2)))) (sqrt (fma a1 a1 (* a2 a2))))) |
| 180.0ms | (- (log (* (* (cos th) (sqrt (fma a1 a1 (* a2 a2)))) (hypot a1 a2))) (log (sqrt 2))) |
| 147.0ms | (- (+ (+ (log (cos th)) (log (sqrt (fma a1 a1 (* a2 a2))))) (log (hypot a1 a2))) (log (sqrt 2))) |
7 alts after pruning (4 fresh and 3 done)
Merged error: 0b
0% (0.4b remaining)
Error of 0.5b against oracle of 0.1b and baseline of 0.5b
| 2.9s | 2541× | body | 1280 | valid |
| 2.2s | 2152× | body | 640 | valid |
| 1.6s | 8102× | body | 80 | valid |
| 1.1s | 1033× | body | 320 | valid |
| 619.0ms | 485× | body | 160 | valid |