Average Error: 32.9 → 11.8
Time: 16.9s
Precision: binary64
\[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
\[\begin{array}{l} t_1 := \frac{2}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\ \mathbf{if}\;t \leq -9.470921048554425 \cdot 10^{-53}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.330754811211471 \cdot 10^{-198}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
(FPCore (t l k)
 :precision binary64
 (let* ((t_1
         (/
          2.0
          (*
           (*
            (/ t (* (cbrt l) (cbrt l)))
            (* (* (/ (* t (sin k)) l) (/ t (cbrt l))) (tan k)))
           (+ 2.0 (pow (/ k t) 2.0))))))
   (if (<= t -9.470921048554425e-53)
     t_1
     (if (<= t 2.330754811211471e-198)
       (/
        2.0
        (/ (* (pow k 2.0) (* t (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
       t_1))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
double code(double t, double l, double k) {
	double t_1 = 2.0 / (((t / (cbrt(l) * cbrt(l))) * ((((t * sin(k)) / l) * (t / cbrt(l))) * tan(k))) * (2.0 + pow((k / t), 2.0)));
	double tmp;
	if (t <= -9.470921048554425e-53) {
		tmp = t_1;
	} else if (t <= 2.330754811211471e-198) {
		tmp = 2.0 / ((pow(k, 2.0) * (t * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
public static double code(double t, double l, double k) {
	double t_1 = 2.0 / (((t / (Math.cbrt(l) * Math.cbrt(l))) * ((((t * Math.sin(k)) / l) * (t / Math.cbrt(l))) * Math.tan(k))) * (2.0 + Math.pow((k / t), 2.0)));
	double tmp;
	if (t <= -9.470921048554425e-53) {
		tmp = t_1;
	} else if (t <= 2.330754811211471e-198) {
		tmp = 2.0 / ((Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function code(t, l, k)
	t_1 = Float64(2.0 / Float64(Float64(Float64(t / Float64(cbrt(l) * cbrt(l))) * Float64(Float64(Float64(Float64(t * sin(k)) / l) * Float64(t / cbrt(l))) * tan(k))) * Float64(2.0 + (Float64(k / t) ^ 2.0))))
	tmp = 0.0
	if (t <= -9.470921048554425e-53)
		tmp = t_1;
	elseif (t <= 2.330754811211471e-198)
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = t_1;
	end
	return tmp
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 / N[(N[(N[(t / N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.470921048554425e-53], t$95$1, If[LessEqual[t, 2.330754811211471e-198], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\begin{array}{l}
t_1 := \frac{2}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\
\mathbf{if}\;t \leq -9.470921048554425 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.330754811211471 \cdot 10^{-198}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Bits error versus t

Bits error versus l

Bits error versus k

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if t < -9.4709210485544245e-53 or 2.33075481121147108e-198 < t

    1. Initial program 26.0

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified26.0

      \[\leadsto \color{blue}{\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
    3. Applied unpow3_binary6426.1

      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    4. Applied times-frac_binary6418.8

      \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    5. Applied associate-*l*_binary6416.8

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right)} \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    6. Applied add-cube-cbrt_binary6416.9

      \[\leadsto \frac{2}{\left(\left(\frac{t \cdot t}{\color{blue}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}} \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    7. Applied times-frac_binary6411.4

      \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \frac{t}{\sqrt[3]{\ell}}\right)} \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    8. Applied associate-*l*_binary6410.3

      \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\frac{t}{\sqrt[3]{\ell}} \cdot \left(\frac{t}{\ell} \cdot \sin k\right)\right)\right)} \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    9. Simplified10.4

      \[\leadsto \frac{2}{\left(\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \color{blue}{\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right)}\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
    10. Applied associate-*l*_binary648.1

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right) \cdot \tan k\right)\right)} \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]

    if -9.4709210485544245e-53 < t < 2.33075481121147108e-198

    1. Initial program 58.2

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified58.2

      \[\leadsto \color{blue}{\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
    3. Taylor expanded in t around 0 25.3

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.470921048554425 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\ \mathbf{elif}\;t \leq 2.330754811211471 \cdot 10^{-198}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{t}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}} \cdot \left(\left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\sqrt[3]{\ell}}\right) \cdot \tan k\right)\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\\ \end{array} \]

Reproduce

herbie shell --seed 2022131 
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10+)"
  :precision binary64
  (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))