Average Error: 0.2 → 0.2
Time: 31.9s
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(\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) + \left(\left|x\right| \cdot 2 + \left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \frac{2}{3}\right)\right) + \frac{1}{21} \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \left({\left(\left|x\right|\right)}^{4} \cdot \left|x\right|\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 pow10.2

    \[\leadsto \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 \color{blue}{{\left(\left|x\right|\right)}^{1}}\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  4. Applied pow20.2

    \[\leadsto \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(\color{blue}{{\left(\left|x\right|\right)}^{2}} \cdot \left|x\right|\right) \cdot {\left(\left|x\right|\right)}^{1}\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  5. Applied pow-plus0.2

    \[\leadsto \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(\color{blue}{{\left(\left|x\right|\right)}^{\left(2 + 1\right)}} \cdot {\left(\left|x\right|\right)}^{1}\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  6. Applied pow-prod-up0.2

    \[\leadsto \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(\color{blue}{{\left(\left|x\right|\right)}^{\left(\left(2 + 1\right) + 1\right)}} \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  7. Simplified0.2

    \[\leadsto \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|x\right|\right)}^{\color{blue}{4}} \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  8. Final simplification0.2

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

Reproduce

herbie shell --seed 2019016 
(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: 31.2s)Debug log

sample279.0ms

Algorithm
intervals
Results
470×(pre true 80)
470×(body real 80)

simplify250.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
249.0ms
(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))))))

prune41.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.0b

localize90.0ms

Local error

Found 4 expressions with local error:

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

rewrite243.0ms

Algorithm
rewrite-expression-head
Rules
67×pow1
42×add-exp-log
42×add-cbrt-cube
27×cbrt-unprod
27×prod-exp
27×pow-prod-down
17×pow-prod-up
17×pow-plus
associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-*r*
add-log-exp
pow2
*-commutative
div-inv
associate-*l/
pow3
pow1/2
Counts
4 → 95
Calls
4 calls:
Slowest
165.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
45.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))
29.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(sqrt PI)

series107.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
46.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
39.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
22.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

simplify8.6s

Counts
76 → 105
Calls
76 calls:
Slowest
629.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))) (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
600.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))))
564.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
493.0ms
(+ (log (/ 1 5)) (+ (+ (+ (+ (log (fabs x)) (log (fabs x))) (log (fabs x))) (log (fabs x))) (log (fabs x))))
487.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (* (fabs x) (fabs x))) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))

prune2.1s

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0.0b

localize42.0ms

Local error

Found 4 expressions with local error:

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

rewrite304.0ms

Algorithm
rewrite-expression-head
Rules
67×pow1
42×add-exp-log
42×add-cbrt-cube
27×cbrt-unprod
27×prod-exp
27×pow-prod-down
17×pow-prod-up
17×pow-plus
associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-*r*
add-log-exp
pow2
*-commutative
div-inv
associate-*l/
pow3
pow1/2
Counts
4 → 95
Calls
4 calls:
Slowest
226.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
44.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
30.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

series71.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
29.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
28.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
14.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

simplify8.6s

Counts
76 → 105
Calls
76 calls:
Slowest
596.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))) (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
591.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (* (fabs x) (fabs x))) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
509.0ms
(* (* (* (/ 1 5) (/ 1 5)) (/ 1 5)) (* (* (* (* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (fabs x) (fabs x)) (fabs x))))
507.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))))
505.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))))

prune2.5s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize56.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
Rules
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
add-exp-log
add-cbrt-cube
pow1
pow1/2
associate-/r*
div-inv
frac-2neg
clear-num
Counts
4 → 37
Calls
4 calls:
Slowest
1.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

series0.0ms

Counts
4 → 4
Calls
4 calls:
Slowest
0.0ms
(/ 1/21 (sqrt PI))
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify531.0ms

Counts
7 → 41
Calls
7 calls:
Slowest
139.0ms
(fabs (+ (/ (+ (* (fabs x) 2) (* (* (fabs x) (fabs x)) (* (fabs x) 2/3))) (sqrt PI)) (+ (* (* (* 1/5 (fabs x)) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (/ 1 (sqrt PI)))) (* (/ 1/21 (sqrt PI)) (pow (fabs x) 7)))))
138.0ms
(fabs (+ (/ (+ (* (fabs x) 2) (* (* (fabs x) (fabs x)) (* (fabs x) 2/3))) (sqrt PI)) (+ (* (* (* 1/5 (fabs x)) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (/ 1 (sqrt PI)))) (* (/ 1/21 (sqrt PI)) (pow (fabs x) 7)))))
137.0ms
(fabs (+ (/ (+ (* (fabs x) 2) (* (* (fabs x) (fabs x)) (* (fabs x) 2/3))) (sqrt PI)) (+ (* (* (* 1/5 (fabs x)) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (/ 1 (sqrt PI)))) (* (/ 1/21 (sqrt PI)) (pow (fabs x) 7)))))
109.0ms
(fabs (+ (/ (+ (* (fabs x) 2) (* (* (fabs x) (fabs x)) (* (fabs x) 2/3))) (sqrt PI)) (+ (* (* (* 1/5 (fabs x)) (* (fabs x) (fabs x))) (* (* (fabs x) (fabs x)) (/ 1 (sqrt PI)))) (* (/ 1/21 (sqrt PI)) (pow (fabs x) 7)))))
1.0ms
(cbrt (sqrt PI))

prune792.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize31.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
Rules
add-log-exp
add-cube-cbrt
add-exp-log
pow1/2
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
Counts
4 → 32
Calls
4 calls:
Slowest
1.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

series0.0ms

Counts
4 → 4
Calls
4 calls:
Slowest
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)
0.0ms
(sqrt PI)

simplify3.0ms

Counts
0 → 36
Calls
0 calls:
Slowest

prune738.0ms

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

regimes96.0ms

Accuracy

0% (0.2b remaining)

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

bsearch10.0ms

end0.0ms

sample5.7s

Algorithm
intervals
Results
14038×(pre true 80)
14038×(body real 80)