Average Error: 0.2 → 0.2
Time: 43.3s
Precision: 64
Internal Precision: 128
\[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
\[\left|\left(\left|x\right| \cdot \frac{\frac{1}{21}}{\sqrt{\pi}}\right) \cdot \left({\left(\left|x\right|\right)}^{3} \cdot {\left(\left|x\right|\right)}^{3}\right) + \left(\left(2 \cdot \left|x\right| + \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \frac{2}{3}\right) + \frac{1}{5} \cdot \left(\left|x\right| \cdot \left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right) \cdot \frac{1}{\sqrt{\pi}}\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.2

    \[\left|\frac{1}{\sqrt{\pi}} \cdot \left(\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  2. Using strategy rm
  3. Applied distribute-rgt-in0.2

    \[\leadsto \left|\color{blue}{\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) \cdot \frac{1}{\sqrt{\pi}} + \left(\frac{1}{21} \cdot \left(\left(\left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) \cdot \frac{1}{\sqrt{\pi}}}\right|\]
  4. Simplified0.2

    \[\leadsto \left|\left(\left(2 \cdot \left|x\right| + \frac{2}{3} \cdot \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) + \frac{1}{5} \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right) \cdot \frac{1}{\sqrt{\pi}} + \color{blue}{\left({\left(\left|x\right|\right)}^{3} \cdot {\left(\left|x\right|\right)}^{3}\right) \cdot \left(\left|x\right| \cdot \frac{\frac{1}{21}}{\sqrt{\pi}}\right)}\right|\]
  5. Final simplification0.2

    \[\leadsto \left|\left(\left|x\right| \cdot \frac{\frac{1}{21}}{\sqrt{\pi}}\right) \cdot \left({\left(\left|x\right|\right)}^{3} \cdot {\left(\left|x\right|\right)}^{3}\right) + \left(\left(2 \cdot \left|x\right| + \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \frac{2}{3}\right) + \frac{1}{5} \cdot \left(\left|x\right| \cdot \left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right) \cdot \frac{1}{\sqrt{\pi}}\right|\]

Reproduce

herbie shell --seed 2018360 
(FPCore (x)
  :name "Jmat.Real.erfi, branch x less than or equal to 0.5"
  (fabs (* (/ 1 (sqrt PI)) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))))

Details

Time bar (total: 32.8s)Debug log

start274.0ms

Algorithm
intervals

setup206.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize79.0ms

Local error

Found 4 expressions with local error:

1.0b
(sqrt PI)
0.2b
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
0.1b
(* (/ 1 (sqrt PI)) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))
0.1b
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))

rewrite1.4s

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

1.2s
(* (/ 1 (sqrt PI)) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))
209.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
20.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))

series290.0ms

Counts
4 → 10
Calls

4 calls. Slowest were:

238.0ms
(* (/ 1 (sqrt PI)) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))
28.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
24.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(sqrt PI)

simplify14.4s

Counts
72 → 104
Calls

72 calls. Slowest were:

601.0ms
(* (* (* (/ 1 (sqrt PI)) (/ 1 (sqrt PI))) (/ 1 (sqrt PI))) (* (* (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x))))) (+ (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x))))))
595.0ms
(* 1 (+ (* (- (* (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x))))) (* (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x))))) 21) (* (- (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* 1 (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x))))))
486.0ms
(* (sqrt PI) (+ (* (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x))))) (- (* (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (* (/ 1 21) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)) (fabs x)))))))

prune3.0s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0b

localize52.0ms

Local error

Found 4 expressions with local error:

1.0b
(/ 1/21 (sqrt PI))
1.0b
(sqrt PI)
1.0b
(sqrt PI)
0.2b
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))

rewrite43.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

41.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
1.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)

series36.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

36.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify2.6s

Counts
22 → 58
Calls

22 calls. Slowest were:

377.0ms
(fabs (+ (* (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (/ 1 (sqrt PI))) (* (* (pow (fabs x) 3) (pow (fabs x) 3)) (* (fabs x) (/ 1/21 (sqrt PI))))))
365.0ms
(* (* (* (/ 2 3) (/ 2 3)) (/ 2 3)) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
349.0ms
(fabs (+ (* (+ (+ (* 2 (fabs x)) (* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))) (* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))) (/ 1 (sqrt PI))) (* (* (pow (fabs x) 3) (pow (fabs x) 3)) (* (fabs x) (/ 1/21 (sqrt PI))))))

prune1.7s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize64.0ms

Local error

Found 4 expressions with local error:

0.2b
(* 2/3 (pow (fabs x) 3))
0.1b
(* (sqrt (/ 1 PI)) (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7))))))
0.1b
(* 1/5 (pow (fabs x) 5))
0.1b
(* 1/21 (pow (fabs x) 7))

rewrite68.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

54.0ms
(* (sqrt (/ 1 PI)) (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7))))))
4.0ms
(* 2/3 (pow (fabs x) 3))
4.0ms
(* 1/21 (pow (fabs x) 7))

series337.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

242.0ms
(* (sqrt (/ 1 PI)) (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7))))))
42.0ms
(* 1/21 (pow (fabs x) 7))
31.0ms
(* 1/5 (pow (fabs x) 5))
22.0ms
(* 2/3 (pow (fabs x) 3))

simplify3.6s

Counts
56 → 87
Calls

56 calls. Slowest were:

450.0ms
(* (* (* (sqrt (/ 1 PI)) (sqrt (/ 1 PI))) (sqrt (/ 1 PI))) (* (* (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7))))) (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7)))))) (+ (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7)))))))
362.0ms
(- (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7)))))
289.0ms
(* (sqrt PI) (- (* 1/5 (pow (fabs x) 5)) (+ (* 2 (fabs x)) (+ (* 2/3 (pow (fabs x) 3)) (* 1/21 (pow (fabs x) 7))))))

prune2.4s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

localize58.0ms

Local error

Found 4 expressions with local error:

1.0b
(/ 1/21 (sqrt PI))
1.0b
(sqrt PI)
1.0b
(sqrt PI)
1.0b
(sqrt PI)

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 37
Calls

4 calls. Slowest were:

1.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

series0.0ms

Counts
4 → 4
Calls

4 calls. Slowest were:

0.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify1.1s

Counts
7 → 41
Calls

7 calls. Slowest were:

286.0ms
(fabs (+ (* (pow (fabs x) 5) (+ (* (* (fabs x) (fabs x)) (/ 1/21 (sqrt PI))) (* (/ 1 (sqrt PI)) 1/5))) (/ (+ (* 2 (fabs x)) (* (* (fabs x) (fabs x)) (* 2/3 (fabs x)))) (sqrt PI))))
283.0ms
(fabs (+ (* (pow (fabs x) 5) (+ (* (* (fabs x) (fabs x)) (/ 1/21 (sqrt PI))) (* (/ 1 (sqrt PI)) 1/5))) (/ (+ (* 2 (fabs x)) (* (* (fabs x) (fabs x)) (* 2/3 (fabs x)))) (sqrt PI))))
261.0ms
(fabs (+ (* (pow (fabs x) 5) (+ (* (* (fabs x) (fabs x)) (/ 1/21 (sqrt PI))) (* (/ 1 (sqrt PI)) 1/5))) (/ (+ (* 2 (fabs x)) (* (* (fabs x) (fabs x)) (* 2/3 (fabs x)))) (sqrt PI))))

prune939.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

regimes166.0ms

Accuracy

0% (0.1b remaining)

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

bsearch8.0ms