Average Error: 0.4 → 0.1
Time: 1.1m
Precision: 64
Internal Precision: 128
\[\frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\left(\pi \cdot t\right) \cdot \sqrt{2 \cdot \left(1 - 3 \cdot \left(v \cdot v\right)\right)}\right) \cdot \left(1 - v \cdot v\right)}\]
\[\frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{(\left(v \cdot v\right) \cdot -3 + 1)_* \cdot 2}}}{t \cdot \left(1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)} \cdot (v \cdot v + 1)_*\]

Error

Bits error versus v

Bits error versus t

Derivation

  1. Initial program 0.4

    \[\frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\left(\pi \cdot t\right) \cdot \sqrt{2 \cdot \left(1 - 3 \cdot \left(v \cdot v\right)\right)}\right) \cdot \left(1 - v \cdot v\right)}\]
  2. Simplified0.3

    \[\leadsto \color{blue}{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*} \cdot \left(t \cdot \left(1 - v \cdot v\right)\right)}}\]
  3. Using strategy rm
  4. Applied associate-/r*0.1

    \[\leadsto \color{blue}{\frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*}}}{t \cdot \left(1 - v \cdot v\right)}}\]
  5. Using strategy rm
  6. Applied flip--0.1

    \[\leadsto \frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*}}}{t \cdot \color{blue}{\frac{1 \cdot 1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)}{1 + v \cdot v}}}\]
  7. Applied associate-*r/0.1

    \[\leadsto \frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*}}}{\color{blue}{\frac{t \cdot \left(1 \cdot 1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)}{1 + v \cdot v}}}\]
  8. Applied associate-/r/0.1

    \[\leadsto \color{blue}{\frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*}}}{t \cdot \left(1 \cdot 1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)} \cdot \left(1 + v \cdot v\right)}\]
  9. Simplified0.1

    \[\leadsto \frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{2 \cdot (\left(v \cdot v\right) \cdot -3 + 1)_*}}}{t \cdot \left(1 \cdot 1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)} \cdot \color{blue}{(v \cdot v + 1)_*}\]
  10. Final simplification0.1

    \[\leadsto \frac{\frac{\frac{(\left(v \cdot v\right) \cdot -5 + 1)_*}{\pi}}{\sqrt{(\left(v \cdot v\right) \cdot -3 + 1)_* \cdot 2}}}{t \cdot \left(1 - \left(v \cdot v\right) \cdot \left(v \cdot v\right)\right)} \cdot (v \cdot v + 1)_*\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (v t)
  :name "Falkner and Boettcher, Equation (20:1,3)"
  (/ (- 1 (* 5 (* v v))) (* (* (* PI t) (sqrt (* 2 (- 1 (* 3 (* v v)))))) (- 1 (* v v)))))

Details

Time bar (total: 1.0m)Debug log

sample196.0ms

Algorithm
intervals
Results
544×(pre true 80)
288×(body nan 80)
256×(body real 80)

simplify467.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
463.0ms
(/ (- 1 (* 5 (* v v))) (* (* (* PI t) (sqrt (* 2 (- 1 (* 3 (* v v)))))) (- 1 (* v v))))

prune15.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize34.0ms

Local error

Found 4 expressions with local error:

0.5b
(* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v))))
0.4b
(/ (/ (fma (* v v) -5 1) PI) (* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v)))))
0.0b
(* t (- 1 (* v v)))
0.0b
(sqrt (* 2 (fma (* v v) -3 1)))

rewrite38.0ms

Algorithm
rewrite-expression-head
Rules
11×add-exp-log
11×add-cbrt-cube
10×associate-*r/
10×distribute-lft-in
10×distribute-rgt-in
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
sub-neg
pow1
add-log-exp
associate-/l*
log1p-expm1-u
associate-*l*
associate-*r*
times-frac
expm1-log1p-u
flip--
div-inv
flip3--
cbrt-unprod
sqrt-prod
*-commutative
associate-/r/
prod-exp
div-exp
cbrt-undiv
associate-/l/
pow-prod-down
pow1/2
frac-2neg
associate-/r*
clear-num
Counts
4 → 86
Calls
4 calls:
Slowest
18.0ms
(* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v))))
15.0ms
(/ (/ (fma (* v v) -5 1) PI) (* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v)))))
3.0ms
(* t (- 1 (* v v)))
2.0ms
(sqrt (* 2 (fma (* v v) -3 1)))

series527.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
302.0ms
(/ (/ (fma (* v v) -5 1) PI) (* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v)))))
144.0ms
(* (sqrt (* 2 (fma (* v v) -3 1))) (* t (- 1 (* v v))))
53.0ms
(sqrt (* 2 (fma (* v v) -3 1)))
28.0ms
(* t (- 1 (* v v)))

simplify6.1s

Counts
58 → 98
Calls
58 calls:
Slowest
364.0ms
(- (* t (sqrt 2)) (* 5/2 (* t (* (sqrt 2) (pow v 2)))))
312.0ms
(- (/ 1 (* t (* (sqrt 2) PI))) (+ (* 53/8 (/ (pow v 4) (* t (* (sqrt 2) PI)))) (* 5/2 (/ (pow v 2) (* t (* (sqrt 2) PI))))))
281.0ms
(- (log (/ (fma (* v v) -5 1) PI)) (+ (log (sqrt (* 2 (fma (* v v) -3 1)))) (log (* t (- 1 (* v v))))))
280.0ms
(/ (* (* (/ (fma (* v v) -5 1) PI) (/ (fma (* v v) -5 1) PI)) (/ (fma (* v v) -5 1) PI)) (* (* (* (sqrt (* 2 (fma (* v v) -3 1))) (sqrt (* 2 (fma (* v v) -3 1)))) (sqrt (* 2 (fma (* v v) -3 1)))) (* (* (* t (- 1 (* v v))) (* t (- 1 (* v v)))) (* t (- 1 (* v v))))))
264.0ms
(- (+ (* (sqrt 2) (* v (sqrt -3))) (* 1/2 (/ (sqrt 2) (* v (sqrt -3))))) (* 1/8 (/ (sqrt 2) (* (pow v 3) (pow (sqrt -3) 3)))))

prune1.4s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 0.0b

localize9.0ms

Local error

Found 4 expressions with local error:

0.1b
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- 1 (* v v))))
0.0b
(* t (- 1 (* v v)))
0.0b
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
0.0b
(sqrt (* 2 (fma (* v v) -3 1)))

rewrite24.0ms

Algorithm
rewrite-expression-head
Rules
68×times-frac
33×add-cube-cbrt
33×*-un-lft-identity
33×add-sqr-sqrt
24×associate-/l*
17×div-inv
14×sqrt-prod
11×add-exp-log
11×add-cbrt-cube
associate-/r*
add-log-exp
log1p-expm1-u
associate-*r/
div-exp
cbrt-undiv
pow1
expm1-log1p-u
associate-*r*
associate-/l/
flip--
associate-/r/
flip3--
distribute-lft-in
frac-2neg
sub-neg
clear-num
distribute-rgt-in
*-commutative
pow1/2
Counts
4 → 129
Calls
4 calls:
Slowest
10.0ms
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- 1 (* v v))))
8.0ms
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
3.0ms
(sqrt (* 2 (fma (* v v) -3 1)))
1.0ms
(* t (- 1 (* v v)))

series625.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
311.0ms
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- 1 (* v v))))
214.0ms
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
56.0ms
(sqrt (* 2 (fma (* v v) -3 1)))
44.0ms
(* t (- 1 (* v v)))

simplify9.7s

Counts
131 → 141
Calls
131 calls:
Slowest
293.0ms
(- (/ 1 (* t (* (sqrt 2) PI))) (+ (* 53/8 (/ (pow v 4) (* t (* (sqrt 2) PI)))) (* 5/2 (/ (pow v 2) (* t (* (sqrt 2) PI))))))
275.0ms
(- (log (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))) (log (* t (- 1 (* v v)))))
269.0ms
(- (+ (* (sqrt 2) (* v (sqrt -3))) (* 1/2 (/ (sqrt 2) (* v (sqrt -3))))) (* 1/8 (/ (sqrt 2) (* (pow v 3) (pow (sqrt -3) 3)))))
257.0ms
(- (* 1/8 (/ (sqrt 2) (* (pow v 3) (pow (sqrt -3) 3)))) (+ (* (sqrt 2) (* v (sqrt -3))) (* 1/2 (/ (sqrt 2) (* v (sqrt -3))))))
235.0ms
(/ (/ (/ 1 PI) (sqrt (* 2 (fma (* v v) -3 1)))) (- 1 (* v v)))

prune2.0s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize19.0ms

Local error

Found 4 expressions with local error:

0.1b
(* (* v v) (* v v))
0.1b
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v)))))
0.0b
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
0.0b
(* (/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v))))) (fma v v 1))

rewrite56.0ms

Algorithm
rewrite-expression-head
Rules
104×times-frac
43×add-cube-cbrt
43×*-un-lft-identity
43×add-sqr-sqrt
27×associate-*l*
24×associate-/l*
23×div-inv
22×add-exp-log
22×add-cbrt-cube
17×sqrt-prod
11×pow1
div-exp
cbrt-undiv
associate-/r*
pow2
add-log-exp
log1p-expm1-u
cbrt-unprod
associate-/r/
associate-*r/
prod-exp
associate-*r*
expm1-log1p-u
pow-prod-down
associate-/l/
flip--
fma-udef
pow-prod-up
*-commutative
flip3--
frac-2neg
clear-num
associate-*l/
pow-plus
distribute-lft-in
distribute-rgt-in
Counts
4 → 168
Calls
4 calls:
Slowest
28.0ms
(* (/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v))))) (fma v v 1))
15.0ms
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v)))))
5.0ms
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
4.0ms
(* (* v v) (* v v))

series866.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
334.0ms
(/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v)))))
300.0ms
(* (/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v))))) (fma v v 1))
210.0ms
(/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1))))
23.0ms
(* (* v v) (* v v))

simplify15.1s

Counts
167 → 180
Calls
167 calls:
Slowest
594.0ms
(* (cbrt (/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v)))))) (cbrt (/ (/ (/ (fma (* v v) -5 1) PI) (sqrt (* 2 (fma (* v v) -3 1)))) (* t (- (* 1 1) (* (* v v) (* v v)))))))
414.0ms
(* (/ (/ (* (* (/ (fma (* v v) -5 1) PI) (/ (fma (* v v) -5 1) PI)) (/ (fma (* v v) -5 1) PI)) (* (* (sqrt (* 2 (fma (* v v) -3 1))) (sqrt (* 2 (fma (* v v) -3 1)))) (sqrt (* 2 (fma (* v v) -3 1))))) (* (* (* t (- (* 1 1) (* (* v v) (* v v)))) (* t (- (* 1 1) (* (* v v) (* v v))))) (* t (- (* 1 1) (* (* v v) (* v v)))))) (* (* (fma v v 1) (fma v v 1)) (fma v v 1)))
412.0ms
(- (/ 1 (* t (* (sqrt 2) PI))) (+ (* 53/8 (/ (pow v 4) (* t (* (sqrt 2) PI)))) (* 5/2 (/ (pow v 2) (* t (* (sqrt 2) PI))))))
365.0ms
(- (/ 1 (* t (* (sqrt 2) PI))) (+ (* 25/8 (/ (pow v 4) (* t (* (sqrt 2) PI)))) (* 7/2 (/ (pow v 2) (* t (* (sqrt 2) PI))))))
358.0ms
(+ (- (- (log (/ (fma (* v v) -5 1) PI)) (log (sqrt (* 2 (fma (* v v) -3 1))))) (log (* t (- (* 1 1) (* (* v v) (* v v)))))) (log (fma v v 1)))

prune3.1s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize53.0ms

Local error

Found 4 expressions with local error:

0.4b
(* (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t) (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))) (- 1 (pow v 4))))
0.3b
(/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t)
0.0b
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))
0.0b
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))

rewrite70.0ms

Algorithm
rewrite-expression-head
Rules
237×times-frac
190×sqrt-prod
135×add-cube-cbrt
135×*-un-lft-identity
135×add-sqr-sqrt
99×associate-*r*
47×div-inv
39×associate-/l*
13×add-exp-log
13×add-cbrt-cube
12×associate-/r*
pow1
add-log-exp
log1p-expm1-u
associate-*l*
expm1-log1p-u
associate-/l/
div-exp
frac-2neg
clear-num
cbrt-undiv
cbrt-unprod
associate-/r/
prod-exp
flip--
*-commutative
associate-*r/
associate-*l/
pow-prod-down
sqrt-div
flip3--
frac-times
Counts
4 → 263
Calls
4 calls:
Slowest
21.0ms
(* (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t) (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))) (- 1 (pow v 4))))
17.0ms
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))
12.0ms
(/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t)
10.0ms
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))

series1.3s

Counts
4 → 12
Calls
4 calls:
Slowest
653.0ms
(/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t)
397.0ms
(* (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t) (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))) (- 1 (pow v 4))))
150.0ms
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))
124.0ms
(/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))

simplify9.6s

Counts
274 → 275
Calls
274 calls:
Slowest
669.0ms
(/ (* (* (/ (fma v (* v -5) 1) PI) (/ (fma v (* v -5) 1) PI)) (/ (fma v (* v -5) 1) PI)) (* (* (sqrt (fma -6 (* v v) 2)) (sqrt (fma -6 (* v v) 2))) (sqrt (fma -6 (* v v) 2))))
593.0ms
(/ (* (* (/ (fma v (* v -5) 1) PI) (/ (fma v (* v -5) 1) PI)) (/ (fma v (* v -5) 1) PI)) (* (* (sqrt (fma v (* v -6) 2)) (sqrt (fma v (* v -6) 2))) (sqrt (fma v (* v -6) 2))))
267.0ms
(+ (log (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t)) (log (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2)))) (- 1 (pow v 4)))))
202.0ms
(+ (log (/ (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma v (* v -6) 2)))) t)) (- (log (sqrt (/ (/ (fma v (* v -5) 1) PI) (sqrt (fma -6 (* v v) 2))))) (log (- 1 (pow v 4)))))
179.0ms
(- (+ (* 5/2592 (/ 1 (* (pow v 3) (* PI (pow (sqrt -1/6) 3))))) (+ (/ (sqrt -1/6) (* v PI)) (+ (* 5/36 (/ 1 (* v (* PI (sqrt -1/6))))) (* 1/54 (/ 1 (* (pow v 3) (* PI (sqrt -1/6)))))))) (* 5 (/ (* v (sqrt -1/6)) PI)))

prune6.7s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes137.0ms

Accuracy

0% (0.1b remaining)

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

bsearch2.0ms

end0.0ms

sample4.1s

Algorithm
intervals
Results
16050×(pre true 80)
8048×(body nan 80)
8002×(body real 80)