Average Error: 1.5 → 0.9
Time: 1.1m
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{\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}}{\left|x\right| \cdot 2} + {\left(\frac{1}{\left|x\right|}\right)}^{4} \cdot \left(\frac{1}{\left|x\right|} \cdot \frac{3}{4}\right)\right) \cdot \frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\pi}} + \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(\frac{1}{\left|x\right|}\right)}^{3} \cdot \frac{1}{{\left(\left|x\right|\right)}^{4}}\right) + \left(\frac{1}{\left|x\right|} \cdot \frac{1}{\sqrt{\pi}}\right) \cdot e^{\left|x\right| \cdot \left|x\right|}\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Simplified1.4

    \[\leadsto \color{blue}{\left(\left(\left(\frac{15}{8} \cdot \frac{1}{\sqrt{\pi}}\right) \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left({\left(\frac{1}{\left|x\right|}\right)}^{3} \cdot {\left(\frac{1}{\left|x\right|}\right)}^{4}\right) + e^{\left|x\right| \cdot \left|x\right|} \cdot \left(\frac{1}{\sqrt{\pi}} \cdot \frac{1}{\left|x\right|}\right)\right) + \left(\left(\frac{3}{4} \cdot \frac{1}{\left|x\right|}\right) \cdot {\left(\frac{1}{\left|x\right|}\right)}^{4} + \frac{\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}}{2 \cdot \left|x\right|}\right) \cdot \frac{e^{\left|x\right| \cdot \left|x\right|}}{\sqrt{\pi}}}\]
  3. Taylor expanded around 0 0.9

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

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

Reproduce

herbie shell --seed 2019007 
(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: 1.0m)Debug log

sample3.0s

Algorithm
intervals

simplify405.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

405.0ms
(* (* (/ 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))))))

prune37.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 1.3b

localize101.0ms

Local error

Found 4 expressions with local error:

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 50
Calls

4 calls. Slowest were:

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

series61.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

31.0ms
(pow (/ 1 (fabs x)) 4)
29.0ms
(pow (/ 1 (fabs x)) 4)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify525.0ms

Counts
26 → 58
Calls

26 calls. Slowest were:

202.0ms
(+ (+ (* (* (* 15/8 (/ 1 (sqrt PI))) (exp (* (fabs x) (fabs x)))) (* (pow (/ 1 (fabs x)) 3) (pow (/ 1 (fabs x)) 4))) (* (exp (* (fabs x) (fabs x))) (* (/ 1 (sqrt PI)) (/ 1 (fabs x))))) (* (+ (* (* 3/4 (/ 1 (fabs x))) (pow (/ 1 (fabs x)) 4)) (/ (* (/ 1 (fabs x)) (/ 1 (fabs x))) (* 2 (fabs x)))) (/ (exp (* (fabs x) (fabs x))) (sqrt PI))))
196.0ms
(+ (+ (* (* (* 15/8 (/ 1 (sqrt PI))) (exp (* (fabs x) (fabs x)))) (* (pow (/ 1 (fabs x)) 3) (pow (/ 1 (fabs x)) 4))) (* (exp (* (fabs x) (fabs x))) (* (/ 1 (sqrt PI)) (/ 1 (fabs x))))) (* (+ (* (* 3/4 (/ 1 (fabs x))) (pow (/ 1 (fabs x)) 4)) (/ (* (/ 1 (fabs x)) (/ 1 (fabs x))) (* 2 (fabs x)))) (/ (exp (* (fabs x) (fabs x))) (sqrt PI))))
17.0ms
(* (log (/ 1 (fabs x))) 4)

prune1.4s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.5b

localize35.0ms

Local error

Found 4 expressions with local error:

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

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 41
Calls

4 calls. Slowest were:

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

series20.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

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

simplify77.0ms

Counts
15 → 47
Calls

15 calls. Slowest were:

16.0ms
(* (log (/ 1 (fabs x))) 4)
10.0ms
(* (- (log (fabs x))) 4)
7.0ms
(/ 1 (pow (fabs x) 4))

prune1.3s

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.5b

localize46.0ms

Local error

Found 4 expressions with local error:

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

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
4 → 41
Calls

4 calls. Slowest were:

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

series29.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

29.0ms
(pow (/ 1 (fabs x)) 4)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify49.0ms

Counts
15 → 47
Calls

15 calls. Slowest were:

11.0ms
(* (log (/ 1 (fabs x))) 4)
5.0ms
(* (- (log (fabs x))) 4)
4.0ms
(pow (sqrt (/ 1 (fabs x))) 4)

prune1.3s

Pruning

10 alts after pruning (8 fresh and 2 done)

Merged error: 0.5b

localize55.0ms

Local error

Found 4 expressions with local error:

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 50
Calls

4 calls. Slowest were:

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

series40.0ms

Counts
4 → 8
Calls

4 calls. Slowest were:

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

simplify302.0ms

Counts
26 → 58
Calls

26 calls. Slowest were:

128.0ms
(+ (+ (* (* (/ (/ 1 (fabs x)) (* (fabs x) (fabs x))) (pow (/ 1 (fabs x)) 4)) (* (/ 15/8 (sqrt PI)) (exp (* (fabs x) (fabs x))))) (* (/ (/ 1 (sqrt PI)) (fabs x)) (exp (* (fabs x) (fabs x))))) (* (+ (/ (/ (/ 1/2 (fabs x)) (fabs x)) (fabs x)) (* (pow (/ 1 (fabs x)) 4) (/ 3/4 (fabs x)))) (/ (exp (* (fabs x) (fabs x))) (sqrt PI))))
99.0ms
(+ (+ (* (* (/ (/ 1 (fabs x)) (* (fabs x) (fabs x))) (pow (/ 1 (fabs x)) 4)) (* (/ 15/8 (sqrt PI)) (exp (* (fabs x) (fabs x))))) (* (/ (/ 1 (sqrt PI)) (fabs x)) (exp (* (fabs x) (fabs x))))) (* (+ (/ (/ (/ 1/2 (fabs x)) (fabs x)) (fabs x)) (* (pow (/ 1 (fabs x)) 4) (/ 3/4 (fabs x)))) (/ (exp (* (fabs x) (fabs x))) (sqrt PI))))
10.0ms
(* (log (/ 1 (fabs x))) 4)

prune1.3s

Pruning

16 alts after pruning (13 fresh and 3 done)

Merged error: 0.3b

regimes659.0ms

Accuracy

0% (0.6b remaining)

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

bsearch5.0ms

end0.0ms

sample51.3s

Algorithm
intervals