Average Error: 46.7 → 0.3
Time: 28.3s
Precision: binary64
Cost: 14024
\[\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{\frac{\frac{\ell}{k}}{\sin k}}{t}\\ \mathbf{if}\;k \leq -8 \cdot 10^{-96}:\\ \;\;\;\;t_1 \cdot \left(\ell \cdot \frac{2}{k \cdot \tan k}\right)\\ \mathbf{elif}\;k \leq 5.5 \cdot 10^{-45}:\\ \;\;\;\;t_1 \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(\ell \cdot \frac{\frac{2}{k}}{\tan k}\right)\\ \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 (/ (/ (/ l k) (sin k)) t)))
   (if (<= k -8e-96)
     (* t_1 (* l (/ 2.0 (* k (tan k)))))
     (if (<= k 5.5e-45)
       (* t_1 (/ (/ 2.0 k) (/ k l)))
       (* t_1 (* l (/ (/ 2.0 k) (tan k))))))))
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 = ((l / k) / sin(k)) / t;
	double tmp;
	if (k <= -8e-96) {
		tmp = t_1 * (l * (2.0 / (k * tan(k))));
	} else if (k <= 5.5e-45) {
		tmp = t_1 * ((2.0 / k) / (k / l));
	} else {
		tmp = t_1 * (l * ((2.0 / k) / tan(k)));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((l / k) / sin(k)) / t
    if (k <= (-8d-96)) then
        tmp = t_1 * (l * (2.0d0 / (k * tan(k))))
    else if (k <= 5.5d-45) then
        tmp = t_1 * ((2.0d0 / k) / (k / l))
    else
        tmp = t_1 * (l * ((2.0d0 / k) / tan(k)))
    end if
    code = tmp
end function
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 = ((l / k) / Math.sin(k)) / t;
	double tmp;
	if (k <= -8e-96) {
		tmp = t_1 * (l * (2.0 / (k * Math.tan(k))));
	} else if (k <= 5.5e-45) {
		tmp = t_1 * ((2.0 / k) / (k / l));
	} else {
		tmp = t_1 * (l * ((2.0 / k) / Math.tan(k)));
	}
	return tmp;
}
def code(t, l, 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))
def code(t, l, k):
	t_1 = ((l / k) / math.sin(k)) / t
	tmp = 0
	if k <= -8e-96:
		tmp = t_1 * (l * (2.0 / (k * math.tan(k))))
	elif k <= 5.5e-45:
		tmp = t_1 * ((2.0 / k) / (k / l))
	else:
		tmp = t_1 * (l * ((2.0 / k) / math.tan(k)))
	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(Float64(Float64(l / k) / sin(k)) / t)
	tmp = 0.0
	if (k <= -8e-96)
		tmp = Float64(t_1 * Float64(l * Float64(2.0 / Float64(k * tan(k)))));
	elseif (k <= 5.5e-45)
		tmp = Float64(t_1 * Float64(Float64(2.0 / k) / Float64(k / l)));
	else
		tmp = Float64(t_1 * Float64(l * Float64(Float64(2.0 / k) / tan(k))));
	end
	return tmp
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0));
end
function tmp_2 = code(t, l, k)
	t_1 = ((l / k) / sin(k)) / t;
	tmp = 0.0;
	if (k <= -8e-96)
		tmp = t_1 * (l * (2.0 / (k * tan(k))));
	elseif (k <= 5.5e-45)
		tmp = t_1 * ((2.0 / k) / (k / l));
	else
		tmp = t_1 * (l * ((2.0 / k) / tan(k)));
	end
	tmp_2 = 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[(N[(N[(l / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[k, -8e-96], N[(t$95$1 * N[(l * N[(2.0 / N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.5e-45], N[(t$95$1 * N[(N[(2.0 / k), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(l * N[(N[(2.0 / k), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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{\frac{\frac{\ell}{k}}{\sin k}}{t}\\
\mathbf{if}\;k \leq -8 \cdot 10^{-96}:\\
\;\;\;\;t_1 \cdot \left(\ell \cdot \frac{2}{k \cdot \tan k}\right)\\

\mathbf{elif}\;k \leq 5.5 \cdot 10^{-45}:\\
\;\;\;\;t_1 \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(\ell \cdot \frac{\frac{2}{k}}{\tan k}\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if k < -7.9999999999999993e-96

    1. Initial program 44.4

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

      \[\leadsto \color{blue}{\frac{2}{\tan k \cdot \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left({\left(\frac{k}{t}\right)}^{2} + 0\right)\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) 0)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) (Rewrite<= metadata-eval (-.f64 1 1)))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (pow.f64 (/.f64 k t) 2) 1) 1))))): 0 points increase in error, 2 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 1 (pow.f64 (/.f64 k t) 2))) 1)))): 2 points increase in error, 0 points decrease in error
      (/.f64 2 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (tan.f64 k) (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))): 0 points increase in error, 6 points decrease in error
    3. Taylor expanded in t around 0 19.0

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{{k}^{2} \cdot \left(\sin k \cdot t\right)}{{\ell}^{2}}}} \]
    4. Simplified12.5

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\frac{k \cdot \left(k \cdot \sin k\right)}{\ell} \cdot \frac{t}{\ell}\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 k (*.f64 k (sin.f64 k))) l) (/.f64 t l)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 k k) (sin.f64 k))) l) (/.f64 t l)))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 k 2)) (sin.f64 k)) l) (/.f64 t l)))): 3 points increase in error, 3 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (*.f64 (pow.f64 k 2) (sin.f64 k)) t) (*.f64 l l))))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t))) (*.f64 l l)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t)) (Rewrite<= unpow2_binary64 (pow.f64 l 2))))): 0 points increase in error, 6 points decrease in error
    5. Applied egg-rr6.1

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{-k}{\frac{\ell}{t} \cdot \left(-\frac{\frac{\ell}{k}}{\sin k}\right)}}} \]
    6. Simplified0.8

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{\frac{-k}{\ell} \cdot t}{-\frac{\ell}{k \cdot \sin k}}}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (/.f64 (neg.f64 k) l) t) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-/r/_binary64 (/.f64 (neg.f64 k) (/.f64 l t))) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (/.f64 l (Rewrite=> *-commutative_binary64 (*.f64 (sin.f64 k) k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 l k) (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 k) (*.f64 (/.f64 l t) (neg.f64 (/.f64 (/.f64 l k) (sin.f64 k)))))))): 0 points increase in error, 5 points decrease in error
    7. Applied egg-rr0.3

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t}} \]
    8. Applied egg-rr0.3

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

    if -7.9999999999999993e-96 < k < 5.5000000000000003e-45

    1. Initial program 63.3

      \[\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. Simplified59.4

      \[\leadsto \color{blue}{\frac{2}{\tan k \cdot \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left({\left(\frac{k}{t}\right)}^{2} + 0\right)\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) 0)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) (Rewrite<= metadata-eval (-.f64 1 1)))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (pow.f64 (/.f64 k t) 2) 1) 1))))): 0 points increase in error, 2 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 1 (pow.f64 (/.f64 k t) 2))) 1)))): 2 points increase in error, 0 points decrease in error
      (/.f64 2 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (tan.f64 k) (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))): 0 points increase in error, 6 points decrease in error
    3. Taylor expanded in t around 0 41.5

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{{k}^{2} \cdot \left(\sin k \cdot t\right)}{{\ell}^{2}}}} \]
    4. Simplified41.4

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\frac{k \cdot \left(k \cdot \sin k\right)}{\ell} \cdot \frac{t}{\ell}\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 k (*.f64 k (sin.f64 k))) l) (/.f64 t l)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 k k) (sin.f64 k))) l) (/.f64 t l)))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 k 2)) (sin.f64 k)) l) (/.f64 t l)))): 3 points increase in error, 3 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (*.f64 (pow.f64 k 2) (sin.f64 k)) t) (*.f64 l l))))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t))) (*.f64 l l)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t)) (Rewrite<= unpow2_binary64 (pow.f64 l 2))))): 0 points increase in error, 6 points decrease in error
    5. Applied egg-rr22.7

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{-k}{\frac{\ell}{t} \cdot \left(-\frac{\frac{\ell}{k}}{\sin k}\right)}}} \]
    6. Simplified19.3

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{\frac{-k}{\ell} \cdot t}{-\frac{\ell}{k \cdot \sin k}}}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (/.f64 (neg.f64 k) l) t) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-/r/_binary64 (/.f64 (neg.f64 k) (/.f64 l t))) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (/.f64 l (Rewrite=> *-commutative_binary64 (*.f64 (sin.f64 k) k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 l k) (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 k) (*.f64 (/.f64 l t) (neg.f64 (/.f64 (/.f64 l k) (sin.f64 k)))))))): 0 points increase in error, 5 points decrease in error
    7. Applied egg-rr0.5

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t}} \]
    8. Taylor expanded in k around 0 0.5

      \[\leadsto \frac{\color{blue}{\frac{2}{k}}}{\frac{k}{\ell}} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \]

    if 5.5000000000000003e-45 < k

    1. Initial program 44.7

      \[\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. Simplified36.5

      \[\leadsto \color{blue}{\frac{2}{\tan k \cdot \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left({\left(\frac{k}{t}\right)}^{2} + 0\right)\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) 0)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (+.f64 (pow.f64 (/.f64 k t) 2) (Rewrite<= metadata-eval (-.f64 1 1)))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 (pow.f64 (/.f64 k t) 2) 1) 1))))): 0 points increase in error, 2 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (-.f64 (Rewrite<= +-commutative_binary64 (+.f64 1 (pow.f64 (/.f64 k t) 2))) 1)))): 2 points increase in error, 0 points decrease in error
      (/.f64 2 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (tan.f64 k) (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k))) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))): 0 points increase in error, 6 points decrease in error
    3. Taylor expanded in t around 0 19.2

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

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\frac{k \cdot \left(k \cdot \sin k\right)}{\ell} \cdot \frac{t}{\ell}\right)}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 k (*.f64 k (sin.f64 k))) l) (/.f64 t l)))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 k k) (sin.f64 k))) l) (/.f64 t l)))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (*.f64 (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 k 2)) (sin.f64 k)) l) (/.f64 t l)))): 3 points increase in error, 3 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (*.f64 (pow.f64 k 2) (sin.f64 k)) t) (*.f64 l l))))): 6 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t))) (*.f64 l l)))): 0 points increase in error, 6 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (pow.f64 k 2) (*.f64 (sin.f64 k) t)) (Rewrite<= unpow2_binary64 (pow.f64 l 2))))): 0 points increase in error, 6 points decrease in error
    5. Applied egg-rr5.8

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{-k}{\frac{\ell}{t} \cdot \left(-\frac{\frac{\ell}{k}}{\sin k}\right)}}} \]
    6. Simplified0.9

      \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\frac{\frac{-k}{\ell} \cdot t}{-\frac{\ell}{k \cdot \sin k}}}} \]
      Proof
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (*.f64 (/.f64 (neg.f64 k) l) t) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 0 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (Rewrite<= associate-/r/_binary64 (/.f64 (neg.f64 k) (/.f64 l t))) (neg.f64 (/.f64 l (*.f64 k (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (/.f64 l (Rewrite=> *-commutative_binary64 (*.f64 (sin.f64 k) k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (/.f64 (/.f64 (neg.f64 k) (/.f64 l t)) (neg.f64 (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 l k) (sin.f64 k))))))): 5 points increase in error, 0 points decrease in error
      (/.f64 2 (*.f64 (tan.f64 k) (Rewrite<= associate-/r*_binary64 (/.f64 (neg.f64 k) (*.f64 (/.f64 l t) (neg.f64 (/.f64 (/.f64 l k) (sin.f64 k)))))))): 0 points increase in error, 5 points decrease in error
    7. Applied egg-rr0.3

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t}} \]
    8. Applied egg-rr23.8

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\ell \cdot \frac{2}{k \cdot \tan k}\right)} - 1\right)} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \]
    9. Simplified0.3

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{2}{k}}{\tan k}\right)} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \]
      Proof
      (*.f64 (*.f64 l (/.f64 (/.f64 2 k) (tan.f64 k))) (/.f64 (/.f64 (/.f64 l k) (sin.f64 k)) t)): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 l (Rewrite<= associate-/r*_binary64 (/.f64 2 (*.f64 k (tan.f64 k))))) (/.f64 (/.f64 (/.f64 l k) (sin.f64 k)) t)): 4 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (*.f64 l (/.f64 2 (*.f64 k (tan.f64 k))))))) (/.f64 (/.f64 (/.f64 l k) (sin.f64 k)) t)): 0 points increase in error, 2 points decrease in error
      (*.f64 (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (*.f64 l (/.f64 2 (*.f64 k (tan.f64 k)))))) 1)) (/.f64 (/.f64 (/.f64 l k) (sin.f64 k)) t)): 4 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification0.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -8 \cdot 10^{-96}:\\ \;\;\;\;\frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \cdot \left(\ell \cdot \frac{2}{k \cdot \tan k}\right)\\ \mathbf{elif}\;k \leq 5.5 \cdot 10^{-45}:\\ \;\;\;\;\frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \cdot \left(\ell \cdot \frac{\frac{2}{k}}{\tan k}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error12.5
Cost14025
\[\begin{array}{l} \mathbf{if}\;k \leq -17000 \lor \neg \left(k \leq 10^{-21}\right):\\ \;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{\frac{2}{\tan k}}{k \cdot k}}{\sin k \cdot t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}}\\ \end{array} \]
Alternative 2
Error0.3
Cost14025
\[\begin{array}{l} t_1 := \frac{\frac{\frac{\ell}{k}}{\sin k}}{t}\\ \mathbf{if}\;k \leq -1.9 \cdot 10^{-139} \lor \neg \left(k \leq 5 \cdot 10^{-44}\right):\\ \;\;\;\;t_1 \cdot \left(\ell \cdot \frac{\frac{2}{k}}{\tan k}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}}\\ \end{array} \]
Alternative 3
Error0.3
Cost13760
\[\frac{\frac{2}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \]
Alternative 4
Error0.9
Cost13760
\[\frac{\frac{2}{\tan k}}{\frac{k}{\ell}} \cdot \frac{\frac{\ell}{k}}{\sin k \cdot t} \]
Alternative 5
Error22.3
Cost7360
\[\frac{\frac{\frac{\ell}{k}}{\sin k}}{t} \cdot \frac{\frac{2}{k}}{\frac{k}{\ell}} \]
Alternative 6
Error25.4
Cost960
\[2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\ell}{t}}{k \cdot k}\right) \]
Alternative 7
Error24.9
Cost960
\[2 \cdot \frac{\frac{\ell}{k \cdot t}}{k \cdot \left(k \cdot \frac{k}{\ell}\right)} \]
Alternative 8
Error23.6
Cost960
\[\frac{2}{\left(k \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \frac{k \cdot t}{\ell}\right)} \]

Error

Reproduce

herbie shell --seed 2022343 
(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))))