Average Error: 42.7 → 15.0
Time: 7.1s
Precision: binary64
\[\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} t_1 := t \cdot \sqrt{2}\\ \frac{\left|t_1\right|}{t_1 \cdot \sqrt{\frac{1 + x}{x + -1}}} \end{array} \]
(FPCore (x l t)
 :precision binary64
 (/
  (* (sqrt 2.0) t)
  (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(FPCore (x l t)
 :precision binary64
 (let* ((t_1 (* t (sqrt 2.0))))
   (/ (fabs t_1) (* t_1 (sqrt (/ (+ 1.0 x) (+ x -1.0)))))))
double code(double x, double l, double t) {
	return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
double code(double x, double l, double t) {
	double t_1 = t * sqrt(2.0);
	return fabs(t_1) / (t_1 * sqrt(((1.0 + x) / (x + -1.0))));
}
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
real(8) function code(x, l, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: l
    real(8), intent (in) :: t
    real(8) :: t_1
    t_1 = t * sqrt(2.0d0)
    code = abs(t_1) / (t_1 * sqrt(((1.0d0 + x) / (x + (-1.0d0)))))
end function
public static double code(double x, double l, double t) {
	return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
public static double code(double x, double l, double t) {
	double t_1 = t * Math.sqrt(2.0);
	return Math.abs(t_1) / (t_1 * Math.sqrt(((1.0 + x) / (x + -1.0))));
}
def code(x, l, t):
	return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
def code(x, l, t):
	t_1 = t * math.sqrt(2.0)
	return math.fabs(t_1) / (t_1 * math.sqrt(((1.0 + x) / (x + -1.0))))
function code(x, l, t)
	return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l))))
end
function code(x, l, t)
	t_1 = Float64(t * sqrt(2.0))
	return Float64(abs(t_1) / Float64(t_1 * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0)))))
end
function tmp = code(x, l, t)
	tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
end
function tmp = code(x, l, t)
	t_1 = t * sqrt(2.0);
	tmp = abs(t_1) / (t_1 * sqrt(((1.0 + x) / (x + -1.0))));
end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(N[Abs[t$95$1], $MachinePrecision] / N[(t$95$1 * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\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}
t_1 := t \cdot \sqrt{2}\\
\frac{\left|t_1\right|}{t_1 \cdot \sqrt{\frac{1 + x}{x + -1}}}
\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 42.7

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

    \[\leadsto \color{blue}{\frac{\sqrt{2} \cdot t}{\sqrt{\mathsf{fma}\left(\frac{x + 1}{x + -1}, \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right), \ell \cdot \left(-\ell\right)\right)}}} \]
  3. Taylor expanded in t around inf 38.3

    \[\leadsto \frac{\sqrt{2} \cdot t}{\color{blue}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}}} \]
  4. Applied egg-rr35.5

    \[\leadsto \frac{\color{blue}{\sqrt{2 \cdot \left(t \cdot t\right)}}}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \]
  5. Applied egg-rr15.0

    \[\leadsto \frac{\color{blue}{\left|t \cdot \sqrt{2}\right|}}{\left(\sqrt{2} \cdot t\right) \cdot \sqrt{\frac{1 + x}{x - 1}}} \]
  6. Final simplification15.0

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

Reproduce

herbie shell --seed 2022211 
(FPCore (x l t)
  :name "Toniolo and Linder, Equation (7)"
  :precision binary64
  (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))