Average Error: 1.5 → 0.6
Time: 1.8m
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{\sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}}\right) \cdot \left((\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{3}{4}\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({\left(\left|x\right|\right)}^{-4} \cdot \frac{1}{{\left(\left|x\right|\right)}^{3}}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\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.6

    \[\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-sqr-sqrt0.6

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\color{blue}{\sqrt{\sqrt{\pi}} \cdot \sqrt{\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. Final simplification0.6

    \[\leadsto (\left(\frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}}\right) \cdot \left((\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{3}{4}\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({\left(\left|x\right|\right)}^{-4} \cdot \frac{1}{{\left(\left|x\right|\right)}^{3}}\right) \cdot \left(e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{15}{8}\right)\right)\right))_*\]

Reproduce

herbie shell --seed 2018365 +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: 19.6s)Debug log

start3.4s

Algorithm
intervals

setup843.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 1.0b

localize135.0ms

Local error

Found 4 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 76
Calls

4 calls. Slowest were:

10.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
3.0ms
(pow (/ 1 (fabs x)) 4)
0.0ms
(sqrt PI)

series54.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

35.0ms
(pow (/ 1 (fabs x)) 4)
20.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify745.0ms

Counts
48 → 84
Calls

48 calls. Slowest were:

208.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))))
180.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))))
172.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))

prune2.7s

Pruning

13 alts after pruning (13 fresh and 0 done)

Merged error: 0.2b

localize25.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)))

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

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

series30.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

16.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
13.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify670.0ms

Counts
70 → 102
Calls

70 calls. Slowest were:

204.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
160.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
39.0ms
(+ (- (log (fabs x))) (log (/ 1 (fabs x))))

prune3.5s

Pruning

13 alts after pruning (13 fresh and 0 done)

Merged error: 0.1b

localize34.0ms

Local error

Found 4 expressions with local error:

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

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 68
Calls

4 calls. Slowest were:

9.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(expm1 (log1p (sqrt PI)))
0.0ms
(sqrt PI)

series23.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

23.0ms
(* (/ 1 (fabs x)) (/ 1 (fabs x)))
0.0ms
(expm1 (log1p (sqrt PI)))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify387.0ms

Counts
34 → 74
Calls

34 calls. Slowest were:

181.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
42.0ms
(+ (- (log (fabs x))) (log (/ 1 (fabs x))))
40.0ms
(+ (log (/ 1 (fabs x))) (log (/ 1 (fabs x))))

prune3.3s

Pruning

13 alts after pruning (13 fresh and 0 done)

Merged error: 0.1b

localize17.0ms

Local error

Found 4 expressions with local error:

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 67
Calls

4 calls. Slowest were:

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

series18.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

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

simplify330.0ms

Counts
34 → 73
Calls

34 calls. Slowest were:

165.0ms
(* (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))) (* (* (/ 1 (fabs x)) (/ 1 (fabs x))) (/ 1 (fabs x))))
32.0ms
(+ (log (/ 1 (fabs x))) (log (/ 1 (fabs x))))
20.0ms
(+ (- (log (fabs x))) (log (/ 1 (fabs x))))

prune2.6s

Pruning

13 alts after pruning (12 fresh and 1 done)

Merged error: 0.1b

regimes741.0ms

Accuracy

0% (0.4b remaining)

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

bsearch10.0ms