



Bits error versus x




Bits error versus y
Results
| Original | 0.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.4 |
Initial program 0.5
Initial simplification0.4
Taylor expanded around -inf 0.5
Simplified0.4
Final simplification0.4
herbie shell --seed 2018360 +o rules:numerics
(FPCore (x y)
:name "Logistic regression 2"
:herbie-target
(if (<= x 0) (- (log (+ 1 (exp x))) (* x y)) (- (log (+ 1 (exp (- x)))) (* (- x) (- 1 y))))
(- (log (+ 1 (exp x))) (* x y)))
Time bar (total: 4.3s)Debug log
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.5b
Found 2 expressions with local error:
| 0.5b | (log1p (exp x)) |
| 0.0b | (- (log1p (exp x)) (* y x)) |
2 calls. Slowest were:
| 3.0ms | (- (log1p (exp x)) (* y x)) |
| 0.0ms | (log1p (exp x)) |
2 calls. Slowest were:
| 75.0ms | (log1p (exp x)) |
| 51.0ms | (- (log1p (exp x)) (* y x)) |
17 calls. Slowest were:
| 52.0ms | (+ (log 2) (+ (* 1/2 x) (* 1/8 (pow x 2)))) |
| 34.0ms | (+ (log 2) (+ (* 1/2 x) (* 1/8 (pow x 2)))) |
| 20.0ms | (fma (* (cbrt (log1p (exp x))) (cbrt (log1p (exp x)))) (cbrt (log1p (exp x))) (- (* x y))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 0.5b | (log1p (exp x)) |
| 0.0b | (- (log1p (exp x)) (* y x)) |
2 calls. Slowest were:
| 4.0ms | (- (log1p (exp x)) (* y x)) |
| 0.0ms | (log1p (exp x)) |
2 calls. Slowest were:
| 66.0ms | (log1p (exp x)) |
| 47.0ms | (- (log1p (exp x)) (* y x)) |
17 calls. Slowest were:
| 30.0ms | (+ (log 2) (+ (* 1/2 x) (* 1/8 (pow x 2)))) |
| 26.0ms | (+ (log 2) (+ (* 1/2 x) (* 1/8 (pow x 2)))) |
| 19.0ms | (fma 1 (log1p (exp x)) (- (* x y))) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 0.0b | (- (fma x (fma 1/8 x 1/2) (log 2)) (* y x)) |
| 0.0b | (fma x (fma 1/8 x 1/2) (log 2)) |
2 calls. Slowest were:
| 6.0ms | (- (fma x (fma 1/8 x 1/2) (log 2)) (* y x)) |
| 0.0ms | (fma x (fma 1/8 x 1/2) (log 2)) |
2 calls. Slowest were:
| 42.0ms | (- (fma x (fma 1/8 x 1/2) (log 2)) (* y x)) |
| 31.0ms | (fma x (fma 1/8 x 1/2) (log 2)) |
16 calls. Slowest were:
| 173.0ms | (- (+ (* 1/2 x) (* 1/8 (pow x 2))) (* x y)) |
| 125.0ms | (- (+ (* 1/2 x) (* 1/8 (pow x 2))) (* x y)) |
| 120.0ms | (/ (exp (fma x (fma 1/8 x 1/2) (log 2))) (exp (* y x))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 50.2b | (fma (- x) y (* x y)) |
| 0.0b | (fma x (- (fma 1/8 x 1/2) y) (log 2)) |
2 calls. Slowest were:
| 0.0ms | (fma (- x) y (* x y)) |
| 0.0ms | (fma x (- (fma 1/8 x 1/2) y) (log 2)) |
2 calls. Slowest were:
| 30.0ms | (fma x (- (fma 1/8 x 1/2) y) (log 2)) |
| 15.0ms | (fma (- x) y (* x y)) |
6 calls. Slowest were:
| 188.0ms | (- (+ (* 1/2 x) (* 1/8 (pow x 2))) (* x y)) |
| 185.0ms | (- (+ (* 1/2 x) (* 1/8 (pow x 2))) (* x y)) |
| 45.0ms | (+ (log 2) (+ (* 1/2 x) (* 1/8 (pow x 2)))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0.2b
0% (0.2b remaining)
Error of 0.4b against oracle of 0.2b and baseline of 0.4b