Average Error: 42.5 → 8.8
Time: 39.9s
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 -2.2874138410422343 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le -8.041252291456426 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{elif}\;t \le -2.492446204657259 \cdot 10^{-241}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le 1.0624348547098087 \cdot 10^{+57}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) + \frac{\frac{\frac{2}{x}}{x}}{\sqrt{2}} \cdot \left(t - \frac{t}{2}\right)}\\ \end{array}\]

Error

Bits error versus x

Bits error versus l

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if t < -2.2874138410422343e+108 or -8.041252291456426e-183 < t < -2.492446204657259e-241

    1. Initial program 54.0

      \[\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 7.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. Simplified7.7

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

    if -2.2874138410422343e+108 < t < -8.041252291456426e-183 or -2.492446204657259e-241 < t < 1.0624348547098087e+57

    1. Initial program 36.5

      \[\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.3

      \[\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.0

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

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

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

    if 1.0624348547098087e+57 < t

    1. Initial program 44.1

      \[\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 3.2

      \[\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. Simplified3.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -2.2874138410422343 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le -8.041252291456426 \cdot 10^{-183}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{elif}\;t \le -2.492446204657259 \cdot 10^{-241}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{\left(\frac{\frac{t}{x}}{2 \cdot x} - \frac{t}{x}\right) \cdot \frac{2}{\sqrt{2}} - \left(\sqrt{2} \cdot t + \frac{\frac{t}{x}}{x} \cdot \frac{2}{\sqrt{2}}\right)}\\ \mathbf{elif}\;t \le 1.0624348547098087 \cdot 10^{+57}:\\ \;\;\;\;\frac{\sqrt{\sqrt{2}} \cdot \left(t \cdot \sqrt{\sqrt{2}}\right)}{\sqrt{\left(t \cdot t\right) \cdot \left(2 + \frac{4}{x}\right) + \frac{\ell}{x} \cdot \left(2 \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot t}{t \cdot \left(\frac{\frac{2}{x}}{\sqrt{2}} + \sqrt{2}\right) + \frac{\frac{\frac{2}{x}}{x}}{\sqrt{2}} \cdot \left(t - \frac{t}{2}\right)}\\ \end{array}\]

Reproduce

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

sample467.0ms

Algorithm
intervals

simplify333.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune13.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 39.8b

localize62.0ms

Local error

Found 4 expressions with local error:

16.7b
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
11.7b
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))
0.4b
(* (sqrt 2) t)
0.1b
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))

rewrite66.0ms

Algorithm
rewrite-expression-head
Counts
4 → 66
Calls

4 calls. Slowest were:

33.0ms
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))
18.0ms
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
9.0ms
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))

series1.3s

Counts
4 → 12
Calls

4 calls. Slowest were:

874.0ms
(sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))
268.0ms
(/ (* (sqrt 2) t) (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))))
170.0ms
(- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l))
38.0ms
(* (sqrt 2) t)

simplify8.5s

Counts
46 → 78
Calls

46 calls. Slowest were:

559.0ms
(- (+ (* 2 (pow t 2)) (+ (* 2 (* x (pow l 2))) (* 2 (pow l 2)))))
432.0ms
(- (* (sqrt -2) t) (+ (* 2 (/ (* t x) (sqrt -2))) (+ (* 2 (/ (* t (pow x 2)) (sqrt -2))) (* 2 (/ (* t (pow x 2)) (pow (sqrt -2) 3))))))
356.0ms
(/ t (cbrt (sqrt (- (* (/ (+ x 1) (- x 1)) (+ (* l l) (* 2 (* t t)))) (* l l)))))

prune1.1s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 4.0b

localize26.0ms

Local error

Found 4 expressions with local error:

23.0b
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
0.4b
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
0.4b
(* (sqrt 2) t)
0.2b
(* (/ l x) (* l 2))

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 57
Calls

4 calls. Slowest were:

7.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
6.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
4.0ms
(* (/ l x) (* l 2))

series333.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

247.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
49.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
23.0ms
(* (sqrt 2) t)
13.0ms
(* (/ l x) (* l 2))

simplify3.4s

Counts
33 → 69
Calls

33 calls. Slowest were:

590.0ms
(* (* (* (/ l x) (/ l x)) (/ l x)) (* (* (* l 2) (* l 2)) (* l 2)))
458.0ms
(+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t))))
451.0ms
(sqrt (+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t)))))

prune999.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 3.0b

localize29.0ms

Local error

Found 4 expressions with local error:

23.0b
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
0.4b
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
0.3b
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))
0.2b
(* (cbrt (sqrt 2)) t)

rewrite53.0ms

Algorithm
rewrite-expression-head
Counts
4 → 59
Calls

4 calls. Slowest were:

23.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))
15.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
11.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))

series748.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

452.0ms
(* (cbrt (sqrt 2)) t)
222.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
45.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
29.0ms
(* (* (cbrt (sqrt 2)) (cbrt (sqrt 2))) (* (cbrt (sqrt 2)) t))

simplify3.6s

Counts
37 → 71
Calls

37 calls. Slowest were:

506.0ms
(+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t))))
417.0ms
(* x (+ (* 2 2) (- (* (/ 4 x) (/ 4 x)) (* 2 (/ 4 x)))))
416.0ms
(sqrt (+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t)))))

prune1.3s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 3.0b

localize22.0ms

Local error

Found 4 expressions with local error:

23.0b
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
0.4b
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
0.3b
(* (sqrt (sqrt 2)) (* (sqrt (sqrt 2)) t))
0.2b
(* (sqrt (sqrt 2)) t)

rewrite52.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

19.0ms
(* (sqrt (sqrt 2)) (* (sqrt (sqrt 2)) t))
15.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
11.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))

series362.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

230.0ms
(sqrt (+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t))))
47.0ms
(+ (* (/ l x) (* l 2)) (* (+ 2 (/ 4 x)) (* t t)))
47.0ms
(* (sqrt (sqrt 2)) t)
37.0ms
(* (sqrt (sqrt 2)) (* (sqrt (sqrt 2)) t))

simplify2.9s

Counts
38 → 73
Calls

38 calls. Slowest were:

423.0ms
(+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t))))
404.0ms
(* x (+ (* 2 2) (- (* (/ 4 x) (/ 4 x)) (* 2 (/ 4 x)))))
403.0ms
(sqrt (+ (* (* l (* l 2)) (- 2 (/ 4 x))) (* x (* (- (* 2 2) (* (/ 4 x) (/ 4 x))) (* t t)))))

prune1.1s

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 3.0b

regimes778.0ms

Accuracy

76.1% (5.9b remaining)

Error of 8.8b against oracle of 3.0b and baseline of 27.5b

bsearch2.0s

end0.0ms

sample8.9s

Algorithm
intervals