Average Error: 42.4 → 9.2
Time: 45.7s
Precision: 64
Internal Precision: 128
\[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
\[\begin{array}{l} \mathbf{if}\;t \le -1.0711862690600713 \cdot 10^{+132}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le -2.0742810951057714 \cdot 10^{-165}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{elif}\;t \le -2.083270058225574 \cdot 10^{-211}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le 4.388048359801954 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right) + \left((\left(\frac{-1}{\sqrt{2}}\right) \cdot \left(\frac{t}{x \cdot x}\right) + \left(\sqrt{2} \cdot t\right))_*\right))_*}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Derivation

  1. Split input into 3 regimes
  2. if t < -1.0711862690600713e+132 or -2.0742810951057714e-165 < t < -2.083270058225574e-211

    1. Initial program 56.6

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Taylor expanded around -inf 6.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}} - \left(2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}} + \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right)}}\]
    3. Simplified6.7

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}}\]

    if -1.0711862690600713e+132 < t < -2.0742810951057714e-165 or -2.083270058225574e-211 < t < 4.388048359801954e+38

    1. Initial program 36.2

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Taylor expanded around -inf 16.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{2 \cdot {t}^{2} + \left(2 \cdot \frac{{\ell}^{2}}{x} + 4 \cdot \frac{{t}^{2}}{x}\right)}}}\]
    3. Simplified12.4

      \[\leadsto \frac{\sqrt{2} \cdot t}{\sqrt{\color{blue}{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\frac{t}{x} \cdot \left(t \cdot 4\right)\right))_*}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt12.4

      \[\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \sqrt[3]{\sqrt{2}}\right)} \cdot t}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\frac{t}{x} \cdot \left(t \cdot 4\right)\right))_*}}\]
    6. Applied associate-*l*12.4

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot t\right)}}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\frac{t}{x} \cdot \left(t \cdot 4\right)\right))_*}}\]

    if 4.388048359801954e+38 < t

    1. Initial program 44.6

      \[\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\]
    2. Taylor expanded around inf 4.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(2 \cdot \frac{t}{\sqrt{2} \cdot {x}^{2}} + \left(t \cdot \sqrt{2} + 2 \cdot \frac{t}{\sqrt{2} \cdot x}\right)\right) - 2 \cdot \frac{t}{{\left(\sqrt{2}\right)}^{3} \cdot {x}^{2}}}}\]
    3. Simplified4.5

      \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right) + \left((\left(\frac{-1}{\sqrt{2}}\right) \cdot \left(\frac{t}{x \cdot x}\right) + \left(\sqrt{2} \cdot t\right))_*\right))_*}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification9.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.0711862690600713 \cdot 10^{+132}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le -2.0742810951057714 \cdot 10^{-165}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{elif}\;t \le -2.083270058225574 \cdot 10^{-211}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{t}{x \cdot x}\right) \cdot \left(\frac{1}{\sqrt{2}} - \frac{2}{\sqrt{2}}\right) + \left((\left(\frac{2}{x}\right) \cdot \left(\frac{-t}{\sqrt{2}}\right) + \left(\left(-t\right) \cdot \sqrt{2}\right))_*\right))_*}\\ \mathbf{elif}\;t \le 4.388048359801954 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(t \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right)}{\sqrt{(2 \cdot \left((\left(\frac{\ell}{x}\right) \cdot \ell + \left(t \cdot t\right))_*\right) + \left(\left(4 \cdot t\right) \cdot \frac{t}{x}\right))_*}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{(\left(\frac{2}{\sqrt{2}}\right) \cdot \left(\frac{t}{x} + \frac{t}{x \cdot x}\right) + \left((\left(\frac{-1}{\sqrt{2}}\right) \cdot \left(\frac{t}{x \cdot x}\right) + \left(\sqrt{2} \cdot t\right))_*\right))_*}\\ \end{array}\]

Reproduce

herbie shell --seed 2019002 +o rules:numerics
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  (/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))

Details

Time bar (total: 44.2s)Debug log

sample749.0ms

Algorithm
intervals

simplify502.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

502.0ms
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))

prune31.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 43.6b

localize82.0ms

Local error

Found 4 expressions with local error:

20.9b
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
12.2b
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))
0.5b
(* (sqrt 2) t)
0.0b
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))

rewrite46.0ms

Algorithm
rewrite-expression-head
Counts
4 → 76
Calls

4 calls. Slowest were:

19.0ms
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
15.0ms
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))
8.0ms
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))

series1.3s

Counts
4 → 12
Calls

4 calls. Slowest were:

890.0ms
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
250.0ms
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))
143.0ms
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))
22.0ms
(* (sqrt 2) t)

simplify14.6s

Counts
49 → 88
Calls

49 calls. Slowest were:

632.0ms
(/ (sqrt 2) (sqrt (* (cbrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))) (cbrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))))
607.0ms
(/ t (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))
600.0ms
(sqrt (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))

prune1.3s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 3.5b

localize22.0ms

Local error

Found 4 expressions with local error:

25.1b
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
3.6b
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
0.5b
(* (sqrt 2) t)
0.1b
(* (/ t x) (* t 4))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
4 → 56
Calls

4 calls. Slowest were:

6.0ms
(* (/ t x) (* t 4))
2.0ms
(* (sqrt 2) t)
1.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))

series414.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

288.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
64.0ms
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
42.0ms
(* (sqrt 2) t)
20.0ms
(* (/ t x) (* t 4))

simplify1.8s

Counts
24 → 68
Calls

24 calls. Slowest were:

981.0ms
(* (* (* (/ t x) (/ t x)) (/ t x)) (* (* (* t 4) (* t 4)) (* t 4)))
152.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
110.0ms
(sqrt (* (cbrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))) (cbrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))))

prune1.1s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 3.4b

localize30.0ms

Local error

Found 4 expressions with local error:

25.1b
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
3.6b
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
0.3b
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))
0.2b
(* (cbrt (sqrt 2)) t)

rewrite26.0ms

Algorithm
rewrite-expression-head
Counts
4 → 58
Calls

4 calls. Slowest were:

20.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))
3.0ms
(* (cbrt (sqrt 2)) t)
2.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))

series866.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

480.0ms
(* (cbrt (sqrt 2)) t)
278.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
66.0ms
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
42.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))

simplify1.4s

Counts
28 → 70
Calls

28 calls. Slowest were:

443.0ms
(* (* (sqrt 2) (sqrt 2)) (* (* (* (cbrt (sqrt 2)) t) (* (cbrt (sqrt 2)) t)) (* (cbrt (sqrt 2)) t)))
359.0ms
(* (* (* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) (cbrt (sqrt 2)))) (* (cbrt (sqrt 2)) (cbrt (sqrt 2)))) (* (* (* (cbrt (sqrt 2)) t) (* (cbrt (sqrt 2)) t)) (* (cbrt (sqrt 2)) t)))
106.0ms
(sqrt (* (cbrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))) (cbrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))))

prune1.1s

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 3.4b

localize18.0ms

Local error

Found 4 expressions with local error:

25.1b
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
3.6b
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
0.4b
(* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t))
0.3b
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t)))

rewrite92.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

71.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t)))
18.0ms
(* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t))
2.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))

series811.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

402.0ms
(* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t))
296.0ms
(sqrt (fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4))))
64.0ms
(fma 2 (fma (/ l x) l (* t t)) (* (/ t x) (* t 4)))
50.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t)))

simplify5.8s

Counts
43 → 84
Calls

43 calls. Slowest were:

618.0ms
(* (* (sqrt 2) (sqrt 2)) (* (* (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t)) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t))) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t))))
357.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (* (cbrt (cbrt (sqrt 2))) (cbrt (cbrt (sqrt 2)))) (* (cbrt (cbrt (sqrt 2))) t)))
350.0ms
(* (* (sqrt 2) (sqrt 2)) (* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (* (* (cbrt (cbrt (sqrt 2))) t) (* (cbrt (cbrt (sqrt 2))) t)) (* (cbrt (cbrt (sqrt 2))) t))))

prune1.3s

Pruning

11 alts after pruning (9 fresh and 2 done)

Merged error: 3.4b

regimes946.0ms

Accuracy

77.3% (5.3b remaining)

Error of 9.2b against oracle of 3.9b and baseline of 27.4b

bsearch1.9s

end0.0ms

sample8.0s

Algorithm
intervals