Average Error: 1.5 → 0.7
Time: 1.7m
Precision: 64
Internal Precision: 128
\[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right)\]
\[(\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt[3]{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot \sqrt[3]{\sqrt{\pi}}} \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right)}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{\left|x\right|} \cdot \frac{1}{2}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right) \cdot \left({\left(\left|x\right|\right)}^{-4} \cdot \frac{1}{{\left(\left|x\right|\right)}^{3}}\right)\right))_*\]

Error

Bits error versus x

Derivation

  1. Initial program 1.5

    \[\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right)\]
  2. Initial simplification1.1

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\pi}}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{2} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(\frac{1}{{\left(\left|x\right|\right)}^{3}} \cdot {\left(\frac{1}{\left|x\right|}\right)}^{4}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]
  3. Using strategy rm
  4. Applied inv-pow1.1

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\pi}}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{2} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(\frac{1}{{\left(\left|x\right|\right)}^{3}} \cdot {\color{blue}{\left({\left(\left|x\right|\right)}^{-1}\right)}}^{4}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]
  5. Applied pow-pow0.7

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\pi}}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{2} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(\frac{1}{{\left(\left|x\right|\right)}^{3}} \cdot \color{blue}{{\left(\left|x\right|\right)}^{\left(-1 \cdot 4\right)}}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.7

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\color{blue}{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot \sqrt[3]{\sqrt{\pi}}}}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{2} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(\frac{1}{{\left(\left|x\right|\right)}^{3}} \cdot {\left(\left|x\right|\right)}^{\left(-1 \cdot 4\right)}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]
  8. Using strategy rm
  9. Applied add-cube-cbrt0.7

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot \sqrt[3]{\color{blue}{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot \sqrt[3]{\sqrt{\pi}}}}}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{2} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(\frac{1}{{\left(\left|x\right|\right)}^{3}} \cdot {\left(\left|x\right|\right)}^{\left(-1 \cdot 4\right)}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]
  10. Final simplification0.7

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt[3]{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right) \cdot \sqrt[3]{\sqrt{\pi}}} \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right)}\right) \cdot \left((\left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right)\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left((\left(\frac{1}{\left|x\right|} \cdot \frac{1}{2}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) + \left(\frac{1}{\left|x\right|}\right))_*\right))_*\right) + \left(\left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right) \cdot \left({\left(\left|x\right|\right)}^{-4} \cdot \frac{1}{{\left(\left|x\right|\right)}^{3}}\right)\right))_*\]

Reproduce

herbie shell --seed 2018362 +o rules:numerics
(FPCore (x)
  :name "Jmat.Real.erfi, branch x greater than or equal to 5"
  (* (* (/ 1 (sqrt PI)) (exp (* (fabs x) (fabs x)))) (+ (+ (+ (/ 1 (fabs x)) (* (/ 1 2) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))) (* (/ 3 4) (* (* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x))))) (* (/ 15 8) (* (* (* (* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x))) (/ 1 (fabs x)))))))

Details

Time bar (total: 16.9s)Debug log

start3.2s

Algorithm
intervals

setup709.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.9b

localize109.0ms

Local error

Found 4 expressions with local error:

1.0b
(sqrt PI)
1.0b
(sqrt PI)
0.9b
(pow (/ 1 (fabs x)) 4)
0.5b
(* (/ 1 (fabs x)) (/ 1 (fabs x)))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
4 → 76
Calls

4 calls. Slowest were:

5.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
2.0ms
(pow (/ 1 (fabs x)) 4)
0.0ms
(sqrt PI)

series42.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

23.0ms
(pow (/ 1 (fabs x)) 4)
19.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify785.0ms

Counts
48 → 84
Calls

48 calls. Slowest were:

205.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
191.0ms
(fma (/ (exp (* (fabs x) (fabs x))) (sqrt PI)) (fma (* (* 3/4 (/ 1 (fabs x))) (* (/ 1 (fabs x)) (/ 1 (fabs x)))) (* (/ 1 (fabs x)) (/ 1 (fabs x))) (fma (* 1/2 (/ 1 (fabs x))) (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x)))) (* (* (/ 1 (pow (fabs x) 3)) (pow (/ 1 (fabs x)) 4)) (* (exp (* (fabs x) (fabs x))) (* (/ 1 (sqrt PI)) 15/8))))
158.0ms
(fma (/ (exp (* (fabs x) (fabs x))) (sqrt PI)) (fma (* (* 3/4 (/ 1 (fabs x))) (* (/ 1 (fabs x)) (/ 1 (fabs x)))) (* (/ 1 (fabs x)) (/ 1 (fabs x))) (fma (* 1/2 (/ 1 (fabs x))) (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x)))) (* (* (/ 1 (pow (fabs x) 3)) (pow (/ 1 (fabs x)) 4)) (* (exp (* (fabs x) (fabs x))) (* (/ 1 (sqrt PI)) 15/8))))

prune3.1s

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 0.3b

localize36.0ms

Local error

Found 4 expressions with local error:

1.0b
(sqrt PI)
1.0b
(sqrt PI)
0.5b
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.5b
(* (/ 1 (fabs x)) (/ 1 (fabs x)))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

5.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
5.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(sqrt PI)

series39.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

24.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
15.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify700.0ms

Counts
70 → 102
Calls

70 calls. Slowest were:

234.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
180.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
34.0ms
(+ (- (log (fabs x))) (log (/ 1 (fabs x))))

prune3.6s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.2b

localize23.0ms

Local error

Found 4 expressions with local error:

1.0b
(sqrt PI)
1.0b
(sqrt PI)
1.0b
(sqrt PI)
1.0b
(sqrt PI)

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
4 → 40
Calls

4 calls. Slowest were:

0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

series0.0ms

Counts
4 → 4
Calls

4 calls. Slowest were:

0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify2.0ms

Counts
0 → 44
Calls

0 calls. Slowest were:

prune2.3s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.2b

localize30.0ms

Local error

Found 4 expressions with local error:

1.0b
(sqrt PI)
1.0b
(sqrt PI)
1.0b
(sqrt PI)
1.0b
(sqrt PI)

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
4 → 40
Calls

4 calls. Slowest were:

0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

series0.0ms

Counts
4 → 4
Calls

4 calls. Slowest were:

0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify4.0ms

Counts
0 → 44
Calls

0 calls. Slowest were:

prune1.7s

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.2b

regimes577.0ms

Accuracy

0% (0.5b remaining)

Error of 0.7b against oracle of 0.2b and baseline of 0.7b

bsearch7.0ms