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

Error

Bits error versus x

Derivation

  1. Initial program 0.0

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

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

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

Reproduce

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

Details

Time bar (total: 6.1s)Debug log

sample50.0ms

Algorithm
intervals
Results
526×(pre true 80)
526×(body real 80)

simplify74.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
74.0ms
(exp (- (- 1 (* x x))))

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize8.0ms

Local error

Found 1 expressions with local error:

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

rewrite2.0ms

Algorithm
rewrite-expression-head
Rules
exp-prod
add-log-exp
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
rem-exp-log
log1p-expm1-u
fma-udef
add-exp-log
exp-sum
add-cbrt-cube
pow1
expm1-log1p-u
Counts
1 → 14
Calls
1 calls:
Slowest
2.0ms
(exp (fma x x -1))

series21.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
20.0ms
(exp (fma x x -1))

simplify242.0ms

Counts
8 → 17
Calls
8 calls:
Slowest
205.0ms
(+ (exp -1) (+ (* (pow x 2) (exp -1)) (* 1/2 (* (pow x 4) (exp -1)))))
24.0ms
(exp (* (cbrt (fma x x -1)) (cbrt (fma x x -1))))
4.0ms
(exp (sqrt (fma x x -1)))
2.0ms
(exp (fma x x -1))
2.0ms
(exp (fma x x -1))

prune154.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize9.0ms

Local error

Found 4 expressions with local error:

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

rewrite21.0ms

Algorithm
rewrite-expression-head
Rules
20×cbrt-prod
11×add-cube-cbrt
11×*-un-lft-identity
11×add-sqr-sqrt
pow1
associate-*l*
associate-*r*
pow1/3
add-exp-log
fma-udef
exp-sum
add-log-exp
log1p-expm1-u
add-cbrt-cube
expm1-log1p-u
pow-prod-up
pow-prod-down
cbrt-unprod
*-commutative
prod-exp
pow-plus
pow2
Counts
4 → 74
Calls
4 calls:
Slowest
15.0ms
(* (cbrt (exp (fma x x -1))) (cbrt (exp (fma x x -1))))
2.0ms
(cbrt (exp (fma x x -1)))
2.0ms
(cbrt (exp (fma x x -1)))
1.0ms
(cbrt (exp (fma x x -1)))

series715.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
203.0ms
(* (cbrt (exp (fma x x -1))) (cbrt (exp (fma x x -1))))
200.0ms
(cbrt (exp (fma x x -1)))
162.0ms
(cbrt (exp (fma x x -1)))
150.0ms
(cbrt (exp (fma x x -1)))

simplify2.3s

Counts
46 → 86
Calls
46 calls:
Slowest
352.0ms
(+ (* 1/18 (* (pow x 4) (exp -1/3))) (+ (exp -1/3) (* 1/3 (* (pow x 2) (exp -1/3)))))
309.0ms
(+ (* 1/18 (* (pow x 4) (exp -1/3))) (+ (exp -1/3) (* 1/3 (* (pow x 2) (exp -1/3)))))
301.0ms
(+ (* 1/18 (* (pow x 4) (exp -1/3))) (+ (exp -1/3) (* 1/3 (* (pow x 2) (exp -1/3)))))
216.0ms
(+ (* 2/9 (* (pow x 4) (pow (pow (exp -1) 2) 1/3))) (+ (* 2/3 (* (pow x 2) (pow (pow (exp -1) 2) 1/3))) (pow (pow (exp -1) 2) 1/3)))
99.0ms
(cbrt (* (cbrt (exp (fma x x -1))) (cbrt (exp (fma x x -1)))))

prune1.2s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes22.0ms

Accuracy

0% (0.0b remaining)

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

bsearch0.0ms

end0.0ms

sample1.3s

Algorithm
intervals
Results
15949×(pre true 80)
15949×(body real 80)