Average Error: 0.2 → 0.2
Time: 24.0s
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|\frac{1}{\sqrt{\pi}} \cdot \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(\left(\left|x\right| \cdot \left(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \sqrt{\sqrt{\left|x\right|}}\right) \cdot \sqrt{\sqrt{\left|x\right|}}\right) \cdot \sqrt{\left|x\right|}\right)\right) \cdot \left|x\right|\right) \cdot \left|x\right|\right)\right)\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 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(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \color{blue}{\left(\sqrt{\left|x\right|} \cdot \sqrt{\left|x\right|}\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. Applied associate-*r*0.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(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \sqrt{\left|x\right|}\right) \cdot \sqrt{\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|\]
  5. Using strategy rm
  6. 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(\left(\left(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \color{blue}{\left(\sqrt{\sqrt{\left|x\right|}} \cdot \sqrt{\sqrt{\left|x\right|}}\right)}\right) \cdot \sqrt{\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|\]
  7. Applied associate-*r*0.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(\left(\left|x\right| \cdot \left|x\right|\right) \cdot \sqrt{\sqrt{\left|x\right|}}\right) \cdot \sqrt{\sqrt{\left|x\right|}}\right)} \cdot \sqrt{\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|\]
  8. Final simplification0.2

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

Reproduce

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

sample280.0ms

Algorithm
intervals

simplify252.0ms

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

prune39.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize81.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
(* (* (fabs x) (fabs x)) (fabs x))
0.1b
(* (* (fabs x) (fabs x)) (fabs x))

rewrite65.0ms

Algorithm
rewrite-expression-head
Rules
41×pow1
23×add-exp-log
23×add-cbrt-cube
12×cbrt-unprod
12×prod-exp
12×pow-prod-down
10×pow-prod-up
10×pow-plus
add-cube-cbrt
associate-*r*
*-un-lft-identity
add-sqr-sqrt
associate-*l*
add-log-exp
pow2
*-commutative
pow3
div-inv
associate-*l/
pow1/2
Counts
4 → 81
Calls
4 calls:
Slowest
41.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
12.0ms
(* (* (fabs x) (fabs x)) (fabs x))
9.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

series49.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
21.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
15.0ms
(* (* (fabs x) (fabs x)) (fabs x))
14.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

simplify2.2s

Counts
63 → 91
Calls
63 calls:
Slowest
524.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))))
488.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))))
234.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))))
226.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))))))
117.0ms
(+ (log (/ 2 3)) (+ (+ (log (fabs x)) (log (fabs x))) (log (fabs x))))

prune1.7s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.1b

localize34.0ms

Local error

Found 4 expressions with local error:

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

rewrite50.0ms

Algorithm
rewrite-expression-head
Rules
35×pow1
23×add-exp-log
23×add-cbrt-cube
12×cbrt-unprod
12×prod-exp
12×pow-prod-down
10×associate-*r*
pow-prod-up
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-*l*
pow-plus
add-log-exp
pow1/2
sqrt-prod
*-commutative
pow2
div-inv
associate-*l/
pow3
Counts
4 → 80
Calls
4 calls:
Slowest
21.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
19.0ms
(* (* (fabs x) (fabs x)) (sqrt (fabs x)))
9.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

series66.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
32.0ms
(* (* (fabs x) (fabs x)) (sqrt (fabs x)))
21.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
13.0ms
(* (* (fabs x) (fabs x)) (fabs x))
0.0ms
(sqrt PI)

simplify2.3s

Counts
62 → 90
Calls
62 calls:
Slowest
467.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))))
461.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))))
278.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))))
186.0ms
(* (* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (sqrt (fabs x)) (sqrt (fabs x))) (sqrt (fabs x))))
168.0ms
(* (* (* (* (fabs x) (fabs x)) (* (fabs x) (fabs x))) (* (fabs x) (fabs x))) (* (* (sqrt (fabs x)) (sqrt (fabs x))) (sqrt (fabs x))))

prune1.8s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.1b

localize65.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
(* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x))))
0.1b
(* (* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x))))

rewrite86.0ms

Algorithm
rewrite-expression-head
Rules
27×add-exp-log
27×add-cbrt-cube
27×pow1
19×associate-*r*
18×sqrt-prod
15×cbrt-unprod
15×prod-exp
15×pow-prod-down
11×add-cube-cbrt
11×*-un-lft-identity
11×add-sqr-sqrt
associate-*l*
add-log-exp
*-commutative
div-inv
associate-*l/
pow1/2
Counts
4 → 82
Calls
4 calls:
Slowest
52.0ms
(* (* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x))))
20.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
10.0ms
(* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x))))
0.0ms
(sqrt PI)

series263.0ms

Counts
4 → 10
Calls
4 calls:
Slowest
205.0ms
(* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x))))
34.0ms
(* (* (* (fabs x) (fabs x)) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x))))
24.0ms
(* (/ 2 3) (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(sqrt PI)

simplify4.3s

Counts
58 → 92
Calls
58 calls:
Slowest
860.0ms
(* (* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x))) (* (* (sqrt (sqrt (fabs x))) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x)))))
482.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))))
438.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))))
435.0ms
(* (* (* (* (fabs x) (fabs x)) (* (fabs x) (fabs x))) (* (fabs x) (fabs x))) (* (* (sqrt (sqrt (fabs x))) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x)))))
428.0ms
(* (* (* (* (* (fabs x) (fabs x)) (* (fabs x) (fabs x))) (* (fabs x) (fabs x))) (* (* (sqrt (sqrt (fabs x))) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x))))) (* (* (sqrt (sqrt (fabs x))) (sqrt (sqrt (fabs x)))) (sqrt (sqrt (fabs x)))))

prune2.2s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0.1b

localize59.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.3b
(* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x))))

rewrite58.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
41.0ms
(* (sqrt (* (* (fabs x) (fabs x)) (fabs x))) (sqrt (* (* (fabs x) (fabs x)) (fabs x))))
10.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
5.0ms
(sqrt (* (* (fabs x) (fabs x)) (fabs x)))
0.0ms
(sqrt PI)

series97.0ms

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

simplify254.0ms

Counts
30 → 62
Calls
30 calls:
Slowest
105.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)))))
25.0ms
(* (* (* (fabs x) (fabs x)) (fabs x)) (* (* (fabs x) (fabs x)) (fabs x)))
16.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)))))
8.0ms
(+ (log (sqrt (* (* (fabs x) (fabs x)) (fabs x)))) (log (sqrt (* (* (fabs x) (fabs x)) (fabs x)))))

prune1.3s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0.1b

regimes145.0ms

Accuracy

0% (0.2b remaining)

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

bsearch6.0ms

end0.0ms

sample5.4s

Algorithm
intervals