Average Error: 0.0 → 0.0
Time: 13.1s
Precision: 64
Internal Precision: 128
\[e^{-\left(1 - x \cdot x\right)}\]
\[{e}^{\left((x \cdot x + -1)_*\right)}\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Initial simplification0.0

    \[\leadsto e^{(x \cdot x + -1)_*}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.0

    \[\leadsto e^{\color{blue}{1 \cdot (x \cdot x + -1)_*}}\]
  5. Applied exp-prod0.0

    \[\leadsto \color{blue}{{\left(e^{1}\right)}^{\left((x \cdot x + -1)_*\right)}}\]
  6. Simplified0.0

    \[\leadsto {\color{blue}{e}}^{\left((x \cdot x + -1)_*\right)}\]
  7. Final simplification0.0

    \[\leadsto {e}^{\left((x \cdot x + -1)_*\right)}\]

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (x)
  :name "exp neg sub"
  (exp (- (- 1 (* x x)))))

Details

Time bar (total: 11.3s)Debug log

start45.0ms

Algorithm
intervals

setup59.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 1 expressions with local error:

0.0b
(exp (fma x x -1))

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
1 → 14
Calls

1 calls. Slowest were:

1.0ms
(exp (fma x x -1))

series19.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

19.0ms
(exp (fma x x -1))

simplify250.0ms

Counts
8 → 17
Calls

8 calls. Slowest were:

201.0ms
(+ (exp -1) (+ (* (pow x 2) (exp -1)) (* 1/2 (* (pow x 4) (exp -1)))))
25.0ms
(exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1))))
6.0ms
(exp (fma x x -1))

prune126.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 1 expressions with local error:

0.0b
(pow E (fma x x -1))

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
1 → 14
Calls

1 calls. Slowest were:

1.0ms
(pow E (fma x x -1))

series51.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

51.0ms
(pow E (fma x x -1))

simplify161.0ms

Counts
7 → 17
Calls

7 calls. Slowest were:

150.0ms
(+ (exp -1) (+ (* (pow x 2) (exp -1)) (* 1/2 (* (pow x 4) (exp -1)))))
3.0ms
(exp (fma x x -1))
3.0ms
(exp (fma x x -1))

prune157.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 4 expressions with local error:

1.6b
(cbrt (* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1))))
1.0b
(* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1)))
0.0b
(exp (fma x x -1))
0.0b
(exp (fma x x -1))

rewrite67.0ms

Algorithm
rewrite-expression-head
Counts
4 → 74
Calls

4 calls. Slowest were:

33.0ms
(cbrt (* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1))))
27.0ms
(* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1)))
3.0ms
(exp (fma x x -1))

series134.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

49.0ms
(* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1)))
31.0ms
(cbrt (* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1))))
28.0ms
(exp (fma x x -1))
26.0ms
(exp (fma x x -1))

simplify4.1s

Counts
57 → 86
Calls

57 calls. Slowest were:

750.0ms
(* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1)))
677.0ms
(* (* (exp (fma x x -1)) (exp (fma x x -1))) (exp (fma x x -1)))
664.0ms
(+ (log (* (exp (fma x x -1)) (exp (fma x x -1)))) (fma x x -1))

prune809.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0.0b

localize25.0ms

Local error

Found 4 expressions with local error:

1.6b
(cbrt (pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1)))))
1.0b
(pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1))))
0.0b
(* (cbrt (fma x x -1)) (cbrt (fma x x -1)))
0.0b
(cbrt (fma x x -1))

rewrite61.0ms

Algorithm
rewrite-expression-head
Counts
4 → 102
Calls

4 calls. Slowest were:

38.0ms
(pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1))))
10.0ms
(* (cbrt (fma x x -1)) (cbrt (fma x x -1)))
10.0ms
(cbrt (pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1)))))

series1.2s

Counts
4 → 12
Calls

4 calls. Slowest were:

516.0ms
(cbrt (pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1)))))
403.0ms
(pow (exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1)))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1))))
138.0ms
(* (cbrt (fma x x -1)) (cbrt (fma x x -1)))
122.0ms
(cbrt (fma x x -1))

simplify2.8s

Counts
74 → 114
Calls

74 calls. Slowest were:

227.0ms
(- (+ (exp (pow -1 1/3)) (* 1/2 (* (pow x 4) (exp (pow -1 1/3))))) (* (* (pow x 2) (exp (pow -1 1/3))) (pow -1 1/3)))
213.0ms
(* (* (cbrt (fma x x -1)) (cbrt (fma x x -1))) (+ (+ (cbrt (fma x x -1)) (cbrt (fma x x -1))) (cbrt (fma x x -1))))
170.0ms
(- (pow -1 1/3) (+ (* 1/3 (* (pow x 2) (pow -1 1/3))) (* 1/9 (* (pow x 4) (pow -1 1/3)))))

prune1.2s

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

regimes28.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch1.0ms