Average Error: 0.2 → 0.2
Time: 38.8s
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) + \left(\left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \sqrt{{\left(\left|x\right|\right)}^{6}}\right)\right)\right) \cdot \left|x\right|\right) \cdot \frac{1}{21}\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 add-sqr-sqrt0.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(\sqrt{\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|} \cdot \sqrt{\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|\]
  4. Using strategy rm
  5. Applied sqrt-unprod0.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}{\sqrt{\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \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|\]
  6. 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(\sqrt{\color{blue}{{\left(\left|x\right|\right)}^{6}}} \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\right|\]
  7. 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) + \left(\left(\left|x\right| \cdot \left(\left|x\right| \cdot \left(\left|x\right| \cdot \sqrt{{\left(\left|x\right|\right)}^{6}}\right)\right)\right) \cdot \left|x\right|\right) \cdot \frac{1}{21}\right) \cdot \frac{1}{\sqrt{\pi}}\right|\]

Reproduce

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

sample169.0ms

Algorithm
intervals
Results
145.0ms421×body80valid

simplify626.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
625.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))))))

prune37.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize80.0ms

Local error

Found 4 expressions with local error:

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

rewrite196.0ms

Algorithm
rewrite-expression-head
Rules
47×pow1
38×add-exp-log
38×add-cbrt-cube
24×cbrt-unprod
24×prod-exp
24×pow-prod-down
associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
pow-prod-up
associate-*r*
pow-plus
add-log-exp
*-commutative
div-inv
associate-*l/
pow2
pow3
pow1/2
Counts
4 → 85
Calls
4 calls:
Slowest
159.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
26.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
9.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

series83.0ms

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

simplify8.0s

Counts
62 → 95
Calls
62 calls:
Slowest
613.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))))
578.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))))
504.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))))
477.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))))
454.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))))

prune1.6s

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0.0b

localize40.0ms

Local error

Found 4 expressions with local error:

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

rewrite204.0ms

Algorithm
rewrite-expression-head
Rules
47×pow1
38×add-exp-log
38×add-cbrt-cube
24×cbrt-unprod
24×prod-exp
24×pow-prod-down
associate-*l*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
pow-prod-up
associate-*r*
pow-plus
add-log-exp
*-commutative
div-inv
associate-*l/
pow2
pow3
pow1/2
Counts
4 → 85
Calls
4 calls:
Slowest
160.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
24.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
18.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

series98.0ms

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

simplify7.9s

Counts
62 → 95
Calls
62 calls:
Slowest
558.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))))
499.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))))
498.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))))
479.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))))
462.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))))

prune1.8s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.0b

localize56.0ms

Local error

Found 4 expressions with local error:

18.6b
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
18.6b
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
1.0b
(sqrt PI)
0.2b
(* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x))))

rewrite28.0ms

Algorithm
rewrite-expression-head
Rules
pow1
pow1/2
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
add-sqr-sqrt
add-log-exp
sqrt-prod
associate-*l*
associate-*r*
pow-prod-up
pow-prod-down
cbrt-unprod
*-commutative
prod-exp
sqrt-unprod
pow-plus
rem-square-sqrt
pow2
Counts
4 → 52
Calls
4 calls:
Slowest
20.0ms
(* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x))))
5.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
2.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(sqrt PI)

series92.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
38.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
31.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
23.0ms
(* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x))))
0.0ms
(sqrt PI)

simplify243.0ms

Counts
30 → 62
Calls
30 calls:
Slowest
103.0ms
(* (* (* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x)))) (sqrt (* (* (fabs x) (fabs x)) (fabs x)))) (* (* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x)))) (sqrt (* (* (fabs x) (fabs x)) (fabs x)))))
32.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x)))
18.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x)))
8.0ms
(* (cbrt (sqrt (* (* (fabs x) (fabs x)) (fabs x)))) (cbrt (sqrt (* (* (fabs x) (fabs x)) (fabs x)))))
7.0ms
(sqrt (sqrt (* (* (fabs x) (fabs x)) (fabs x))))

prune1.3s

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.0b

localize57.0ms

Local error

Found 4 expressions with local error:

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

rewrite202.0ms

Algorithm
rewrite-expression-head
Rules
33×add-exp-log
33×add-cbrt-cube
33×pow1
21×cbrt-unprod
21×prod-exp
21×pow-prod-down
10×add-sqr-sqrt
add-cube-cbrt
associate-*l*
*-un-lft-identity
sqrt-prod
add-log-exp
unpow-prod-down
div-inv
*-commutative
associate-*l/
associate-*r*
pow1/2
rem-sqrt-square
Counts
4 → 76
Calls
4 calls:
Slowest
157.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
40.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
2.0ms
(sqrt (pow (fabs x) 6))
0.0ms
(sqrt PI)

series69.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
29.0ms
(* (/ 1 5) (* (* (* (* (fabs x) (fabs x)) (fabs x)) (fabs x)) (fabs x)))
21.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
19.0ms
(sqrt (pow (fabs x) 6))
0.0ms
(sqrt PI)

simplify8.4s

Counts
50 → 86
Calls
50 calls:
Slowest
949.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))))
602.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))))
558.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))))
503.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))))
464.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))))

prune1.8s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.0b

regimes126.0ms

Accuracy

0% (0.2b remaining)

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

bsearch5.0ms

end0.0ms

sample5.0s

Algorithm
intervals
Results
4.8s13911×body80valid