Average Error: 0.0 → 0.3
Time: 5.4s
Precision: 64
Internal Precision: 128
\[e^{-\left(1 - x \cdot x\right)}\]
\[{\left(e^{-\sqrt{1 - x \cdot x}}\right)}^{\left(\sqrt{1 - x \cdot x}\right)}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[e^{-\left(1 - x \cdot x\right)}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.3

    \[\leadsto e^{-\color{blue}{\sqrt{1 - x \cdot x} \cdot \sqrt{1 - x \cdot x}}}\]
  4. Applied distribute-lft-neg-in0.3

    \[\leadsto e^{\color{blue}{\left(-\sqrt{1 - x \cdot x}\right) \cdot \sqrt{1 - x \cdot x}}}\]
  5. Applied exp-prod0.3

    \[\leadsto \color{blue}{{\left(e^{-\sqrt{1 - x \cdot x}}\right)}^{\left(\sqrt{1 - x \cdot x}\right)}}\]
  6. Final simplification0.3

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

Reproduce

herbie shell --seed 2019010 
(FPCore (x)
  :name "exp neg sub"
  (exp (- (- 1 (* x x)))))

Details

Time bar (total: 5.1s)Debug log

sample35.0ms

Algorithm
intervals

simplify39.0ms

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

prune7.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize13.0ms

Local error

Found 1 expressions with local error:

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

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
10×exp-prod
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
distribute-rgt-neg-in
distribute-lft-neg-in
rem-exp-log
exp-sum
distribute-neg-in
add-exp-log
neg-log
exp-diff
add-cbrt-cube
sub-neg
neg-mul-1
pow1
exp-neg
neg-sub0
Counts
1 → 23
Calls
1 calls:
Slowest
3.0ms
(exp (- (- 1 (* x x))))

series15.0ms

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

simplify175.0ms

Counts
17 → 26
Calls
17 calls:
Slowest
67.0ms
(+ (exp -1) (+ (* (pow x 2) (exp -1)) (* 1/2 (* (pow x 4) (exp -1)))))
18.0ms
(exp (sqrt (- (- 1 (* x x)))))
18.0ms
(exp (* (cbrt (- (- 1 (* x x)))) (cbrt (- (- 1 (* x x))))))
14.0ms
(- (- 1 (* x x)))
10.0ms
(exp (- (pow x 2) 1))

prune118.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize10.0ms

Local error

Found 4 expressions with local error:

0.0b
(sqrt (- 1 (* x x)))
0.0b
(sqrt (- 1 (* x x)))
0.0b
(exp (- (sqrt (- 1 (* x x)))))
0.0b
(pow (exp (- (sqrt (- 1 (* x x))))) (sqrt (- 1 (* x x))))

rewrite12.0ms

Algorithm
rewrite-expression-head
Rules
32×exp-prod
21×sqrt-prod
21×add-sqr-sqrt
19×add-cube-cbrt
19×*-un-lft-identity
17×pow-pow
12×distribute-rgt-neg-in
12×distribute-lft-neg-in
add-log-exp
pow-unpow
pow1
add-exp-log
sqrt-div
add-cbrt-cube
unpow-prod-down
rem-exp-log
flip--
pow1/2
flip3--
neg-mul-1
rem-sqrt-square
pow-exp
neg-log
exp-diff
pow-to-exp
exp-neg
neg-sub0
Counts
4 → 90
Calls
4 calls:
Slowest
6.0ms
(pow (exp (- (sqrt (- 1 (* x x))))) (sqrt (- 1 (* x x))))
4.0ms
(exp (- (sqrt (- 1 (* x x)))))
1.0ms
(sqrt (- 1 (* x x)))
1.0ms
(sqrt (- 1 (* x x)))

series145.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
61.0ms
(pow (exp (- (sqrt (- 1 (* x x))))) (sqrt (- 1 (* x x))))
33.0ms
(sqrt (- 1 (* x x)))
30.0ms
(exp (- (sqrt (- 1 (* x x)))))
22.0ms
(sqrt (- 1 (* x x)))

simplify1.3s

Counts
69 → 102
Calls
69 calls:
Slowest
147.0ms
(- (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))) (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
145.0ms
(- (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))) (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
137.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
137.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
102.0ms
(+ (exp -1) (+ (* 1/2 (* (pow x 2) (exp -1))) (* 1/4 (* (pow x 4) (exp -1)))))

prune644.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize18.0ms

Local error

Found 3 expressions with local error:

0.0b
(* (+ (* 1/2 (pow x 4)) (+ (* x x) 1)) (exp -1))
0.0b
(+ (* 1/2 (pow x 4)) (+ (* x x) 1))
0.0b
(* 1/2 (pow x 4))

rewrite17.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
associate-*r*
*-un-lft-identity
add-sqr-sqrt
add-log-exp
add-cbrt-cube
pow1
add-exp-log
associate-*l*
flip-+
*-commutative
associate-*l/
flip3-+
cbrt-unprod
prod-exp
pow-prod-down
sum-log
associate-+r+
+-commutative
Counts
3 → 42
Calls
3 calls:
Slowest
10.0ms
(* (+ (* 1/2 (pow x 4)) (+ (* x x) 1)) (exp -1))
5.0ms
(+ (* 1/2 (pow x 4)) (+ (* x x) 1))
1.0ms
(* 1/2 (pow x 4))

series81.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
50.0ms
(* (+ (* 1/2 (pow x 4)) (+ (* x x) 1)) (exp -1))
17.0ms
(+ (* 1/2 (pow x 4)) (+ (* x x) 1))
14.0ms
(* 1/2 (pow x 4))

simplify793.0ms

Counts
23 → 51
Calls
23 calls:
Slowest
191.0ms
(* (+ (* 1/2 (pow x 4)) (+ (* x x) 1)) (exp -1))
114.0ms
(* (* (* (+ (* 1/2 (pow x 4)) (+ (* x x) 1)) (+ (* 1/2 (pow x 4)) (+ (* x x) 1))) (+ (* 1/2 (pow x 4)) (+ (* x x) 1))) (* (* (exp -1) (exp -1)) (exp -1)))
112.0ms
(* (- (* (* 1/2 (pow x 4)) (* 1/2 (pow x 4))) (* (+ (* x x) 1) (+ (* x x) 1))) (exp -1))
80.0ms
(* (+ (pow (* 1/2 (pow x 4)) 3) (pow (+ (* x x) 1) 3)) (exp -1))
67.0ms
(+ (exp -1) (+ (* (pow x 2) (exp -1)) (* 1/2 (* (pow x 4) (exp -1)))))

prune300.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes79.0ms

Accuracy

0% (0.2b remaining)

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

bsearch1.0ms

end0.0ms

sample1.3s

Algorithm
intervals