
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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}}
\end{array}
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.05e+27)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 2.4e-302)
(/
1.0
(/
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
(* (/ 2.0 x) (pow l 2.0)))
2.0))
t))
(if (<= t 7.8e-119)
(/
t
(+
t
(*
0.5
(/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
(if (<= t 4.9e+143)
(/
t
(/
(sqrt
(fma
2.0
(/ (pow t 2.0) t_1)
(+
(* 2.0 (/ (pow l 2.0) x))
(+
(* 2.0 (/ (pow l 2.0) (pow x 2.0)))
(+
(* 2.0 (/ (pow l 2.0) (pow x 3.0)))
(* 2.0 (/ (pow l 2.0) (pow x 4.0))))))))
(sqrt 2.0)))
(sqrt t_1)))))))
double code(double x, double l, double t) {
double t_1 = (x + -1.0) / (x + 1.0);
double tmp;
if (t <= -1.05e+27) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 2.4e-302) {
tmp = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
} else if (t <= 7.8e-119) {
tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
} else if (t <= 4.9e+143) {
tmp = t / (sqrt(fma(2.0, (pow(t, 2.0) / t_1), ((2.0 * (pow(l, 2.0) / x)) + ((2.0 * (pow(l, 2.0) / pow(x, 2.0))) + ((2.0 * (pow(l, 2.0) / pow(x, 3.0))) + (2.0 * (pow(l, 2.0) / pow(x, 4.0)))))))) / sqrt(2.0));
} else {
tmp = sqrt(t_1);
}
return tmp;
}
function code(x, l, t) t_1 = Float64(Float64(x + -1.0) / Float64(x + 1.0)) tmp = 0.0 if (t <= -1.05e+27) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 2.4e-302) tmp = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t)); elseif (t <= 7.8e-119) tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0)))))); elseif (t <= 4.9e+143) tmp = Float64(t / Float64(sqrt(fma(2.0, Float64((t ^ 2.0) / t_1), Float64(Float64(2.0 * Float64((l ^ 2.0) / x)) + Float64(Float64(2.0 * Float64((l ^ 2.0) / (x ^ 2.0))) + Float64(Float64(2.0 * Float64((l ^ 2.0) / (x ^ 3.0))) + Float64(2.0 * Float64((l ^ 2.0) / (x ^ 4.0)))))))) / sqrt(2.0))); else tmp = sqrt(t_1); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+27], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-302], N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-119], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+143], N[(t / N[(N[Sqrt[N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$1], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + -1}{x + 1}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+27}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-302}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, 2 \cdot \frac{{\ell}^{2}}{x} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{2}} + \left(2 \cdot \frac{{\ell}^{2}}{{x}^{3}} + 2 \cdot \frac{{\ell}^{2}}{{x}^{4}}\right)\right)\right)}}{\sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1}\\
\end{array}
\end{array}
if t < -1.04999999999999997e27Initial program 39.9%
Simplified39.9%
Taylor expanded in t around -inf 97.1%
mul-1-neg97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
+-commutative97.1%
sub-neg97.1%
metadata-eval97.1%
+-commutative97.1%
Simplified97.1%
if -1.04999999999999997e27 < t < 2.40000000000000022e-302Initial program 42.8%
Simplified42.8%
Taylor expanded in l around 0 49.1%
fma-def49.1%
associate-/l*49.1%
+-commutative49.1%
sub-neg49.1%
metadata-eval49.1%
+-commutative49.1%
associate--l+60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 80.6%
associate-*r/80.6%
Simplified80.6%
clear-num80.6%
inv-pow80.8%
sqrt-undiv81.0%
associate-/r/64.4%
associate-/l*64.4%
Applied egg-rr64.4%
unpow-164.4%
associate-*l/80.9%
+-commutative80.9%
+-commutative80.9%
associate-/r/80.9%
Simplified80.9%
if 2.40000000000000022e-302 < t < 7.7999999999999998e-119Initial program 22.3%
Simplified22.2%
Taylor expanded in x around inf 73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
distribute-rgt1-in73.3%
metadata-eval73.3%
fma-def73.3%
*-commutative73.3%
unpow273.3%
rem-square-sqrt73.3%
Simplified73.3%
if 7.7999999999999998e-119 < t < 4.89999999999999986e143Initial program 66.1%
Simplified66.1%
Taylor expanded in l around 0 63.5%
fma-def63.5%
associate-/l*76.1%
+-commutative76.1%
sub-neg76.1%
metadata-eval76.1%
+-commutative76.1%
associate--l+78.1%
sub-neg78.1%
metadata-eval78.1%
+-commutative78.1%
sub-neg78.1%
metadata-eval78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around inf 84.7%
if 4.89999999999999986e143 < t Initial program 2.3%
Simplified2.3%
Applied egg-rr3.1%
Taylor expanded in l around 0 95.1%
+-commutative95.1%
sub-neg95.1%
metadata-eval95.1%
Simplified95.1%
Taylor expanded in t around 0 95.1%
Final simplification87.3%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.55e+28)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 4.2e-303)
(/
1.0
(/
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
(* (/ 2.0 x) (pow l 2.0)))
2.0))
t))
(if (<= t 7.8e-119)
(/
t
(+
t
(*
0.5
(/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
(if (<= t 4.9e+143)
(/
t
(/
(sqrt (fma 2.0 (/ (pow t 2.0) t_1) (/ (* 2.0 (pow l 2.0)) x)))
(sqrt 2.0)))
(sqrt t_1)))))))
double code(double x, double l, double t) {
double t_1 = (x + -1.0) / (x + 1.0);
double tmp;
if (t <= -1.55e+28) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 4.2e-303) {
tmp = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
} else if (t <= 7.8e-119) {
tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
} else if (t <= 4.9e+143) {
tmp = t / (sqrt(fma(2.0, (pow(t, 2.0) / t_1), ((2.0 * pow(l, 2.0)) / x))) / sqrt(2.0));
} else {
tmp = sqrt(t_1);
}
return tmp;
}
function code(x, l, t) t_1 = Float64(Float64(x + -1.0) / Float64(x + 1.0)) tmp = 0.0 if (t <= -1.55e+28) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 4.2e-303) tmp = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t)); elseif (t <= 7.8e-119) tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0)))))); elseif (t <= 4.9e+143) tmp = Float64(t / Float64(sqrt(fma(2.0, Float64((t ^ 2.0) / t_1), Float64(Float64(2.0 * (l ^ 2.0)) / x))) / sqrt(2.0))); else tmp = sqrt(t_1); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+28], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-303], N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-119], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e+143], N[(t / N[(N[Sqrt[N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$1], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + -1}{x + 1}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-303}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+143}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{{t}^{2}}{t_1}, \frac{2 \cdot {\ell}^{2}}{x}\right)}}{\sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1}\\
\end{array}
\end{array}
if t < -1.55e28Initial program 39.9%
Simplified39.9%
Taylor expanded in t around -inf 97.1%
mul-1-neg97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
+-commutative97.1%
sub-neg97.1%
metadata-eval97.1%
+-commutative97.1%
Simplified97.1%
if -1.55e28 < t < 4.2e-303Initial program 42.8%
Simplified42.8%
Taylor expanded in l around 0 49.1%
fma-def49.1%
associate-/l*49.1%
+-commutative49.1%
sub-neg49.1%
metadata-eval49.1%
+-commutative49.1%
associate--l+60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
sub-neg60.2%
metadata-eval60.2%
+-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 80.6%
associate-*r/80.6%
Simplified80.6%
clear-num80.6%
inv-pow80.8%
sqrt-undiv81.0%
associate-/r/64.4%
associate-/l*64.4%
Applied egg-rr64.4%
unpow-164.4%
associate-*l/80.9%
+-commutative80.9%
+-commutative80.9%
associate-/r/80.9%
Simplified80.9%
if 4.2e-303 < t < 7.7999999999999998e-119Initial program 22.3%
Simplified22.2%
Taylor expanded in x around inf 73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
distribute-rgt1-in73.3%
metadata-eval73.3%
fma-def73.3%
*-commutative73.3%
unpow273.3%
rem-square-sqrt73.3%
Simplified73.3%
if 7.7999999999999998e-119 < t < 4.89999999999999986e143Initial program 66.1%
Simplified66.1%
Taylor expanded in l around 0 63.5%
fma-def63.5%
associate-/l*76.1%
+-commutative76.1%
sub-neg76.1%
metadata-eval76.1%
+-commutative76.1%
associate--l+78.1%
sub-neg78.1%
metadata-eval78.1%
+-commutative78.1%
sub-neg78.1%
metadata-eval78.1%
+-commutative78.1%
Simplified78.1%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
Simplified83.7%
if 4.89999999999999986e143 < t Initial program 2.3%
Simplified2.3%
Applied egg-rr3.1%
Taylor expanded in l around 0 95.1%
+-commutative95.1%
sub-neg95.1%
metadata-eval95.1%
Simplified95.1%
Taylor expanded in t around 0 95.1%
Final simplification87.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
1.0
(/
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
(* (/ 2.0 x) (pow l 2.0)))
2.0))
t))))
(if (<= t -5.7e+26)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 3.15e-304)
t_1
(if (<= t 6.8e-158)
(/
t
(+
t
(*
0.5
(/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
(if (<= t 8.5e+23) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
double t_1 = 1.0 / (sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0)) / t);
double tmp;
if (t <= -5.7e+26) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 3.15e-304) {
tmp = t_1;
} else if (t <= 6.8e-158) {
tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
} else if (t <= 8.5e+23) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
function code(x, l, t) t_1 = Float64(1.0 / Float64(sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0)) / t)) tmp = 0.0 if (t <= -5.7e+26) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 3.15e-304) tmp = t_1; elseif (t <= 6.8e-158) tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0)))))); elseif (t <= 8.5e+23) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(1.0 / N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.7e+26], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.15e-304], t$95$1, If[LessEqual[t, 6.8e-158], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+23], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}{t}}\\
\mathbf{if}\;t \leq -5.7 \cdot 10^{+26}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-158}:\\
\;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -5.7000000000000003e26Initial program 39.9%
Simplified39.9%
Taylor expanded in t around -inf 97.1%
mul-1-neg97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
+-commutative97.1%
sub-neg97.1%
metadata-eval97.1%
+-commutative97.1%
Simplified97.1%
if -5.7000000000000003e26 < t < 3.14999999999999992e-304 or 6.7999999999999999e-158 < t < 8.5000000000000001e23Initial program 49.5%
Simplified49.5%
Taylor expanded in l around 0 57.2%
fma-def57.2%
associate-/l*57.2%
+-commutative57.2%
sub-neg57.2%
metadata-eval57.2%
+-commutative57.2%
associate--l+65.2%
sub-neg65.2%
metadata-eval65.2%
+-commutative65.2%
sub-neg65.2%
metadata-eval65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in x around inf 81.0%
associate-*r/81.0%
Simplified81.0%
clear-num81.0%
inv-pow81.3%
sqrt-undiv81.4%
associate-/r/61.8%
associate-/l*61.8%
Applied egg-rr61.8%
unpow-161.8%
associate-*l/81.4%
+-commutative81.4%
+-commutative81.4%
associate-/r/81.4%
Simplified81.4%
if 3.14999999999999992e-304 < t < 6.7999999999999999e-158Initial program 6.5%
Simplified6.5%
Taylor expanded in x around inf 69.4%
cancel-sign-sub-inv69.4%
metadata-eval69.4%
distribute-rgt1-in69.4%
metadata-eval69.4%
fma-def69.4%
*-commutative69.4%
unpow269.4%
rem-square-sqrt69.4%
Simplified69.4%
if 8.5000000000000001e23 < t Initial program 31.5%
Simplified31.5%
Applied egg-rr32.2%
Taylor expanded in l around 0 90.1%
+-commutative90.1%
sub-neg90.1%
metadata-eval90.1%
Simplified90.1%
Taylor expanded in t around 0 90.1%
Final simplification86.8%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (pow t 2.0)) (+ x -1.0))
(* (/ 2.0 x) (pow l 2.0)))
2.0)))))
(if (<= t -1.3e+31)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 1.22e-301)
t_1
(if (<= t 1.6e-157)
(/
t
(+
t
(*
0.5
(/ (* 2.0 (fma 2.0 (pow t 2.0) (pow l 2.0))) (* t (* x 2.0))))))
(if (<= t 1e+24) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
double t_1 = t / sqrt((fma(2.0, (((x + 1.0) * pow(t, 2.0)) / (x + -1.0)), ((2.0 / x) * pow(l, 2.0))) / 2.0));
double tmp;
if (t <= -1.3e+31) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 1.22e-301) {
tmp = t_1;
} else if (t <= 1.6e-157) {
tmp = t / (t + (0.5 * ((2.0 * fma(2.0, pow(t, 2.0), pow(l, 2.0))) / (t * (x * 2.0)))));
} else if (t <= 1e+24) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
function code(x, l, t) t_1 = Float64(t / sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * (t ^ 2.0)) / Float64(x + -1.0)), Float64(Float64(2.0 / x) * (l ^ 2.0))) / 2.0))) tmp = 0.0 if (t <= -1.3e+31) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 1.22e-301) tmp = t_1; elseif (t <= 1.6e-157) tmp = Float64(t / Float64(t + Float64(0.5 * Float64(Float64(2.0 * fma(2.0, (t ^ 2.0), (l ^ 2.0))) / Float64(t * Float64(x * 2.0)))))); elseif (t <= 1e+24) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(t / N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+31], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-301], t$95$1, If[LessEqual[t, 1.6e-157], N[(t / N[(t + N[(0.5 * N[(N[(2.0 * N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+24], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot {t}^{2}}{x + -1}, \frac{2}{x} \cdot {\ell}^{2}\right)}{2}}}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-301}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-157}:\\
\;\;\;\;\frac{t}{t + 0.5 \cdot \frac{2 \cdot \mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{t \cdot \left(x \cdot 2\right)}}\\
\mathbf{elif}\;t \leq 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.3e31Initial program 39.9%
Simplified39.9%
Taylor expanded in t around -inf 97.1%
mul-1-neg97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
+-commutative97.1%
sub-neg97.1%
metadata-eval97.1%
+-commutative97.1%
Simplified97.1%
if -1.3e31 < t < 1.2199999999999999e-301 or 1.6000000000000001e-157 < t < 9.9999999999999998e23Initial program 49.5%
Simplified49.5%
Taylor expanded in l around 0 57.2%
fma-def57.2%
associate-/l*57.2%
+-commutative57.2%
sub-neg57.2%
metadata-eval57.2%
+-commutative57.2%
associate--l+65.2%
sub-neg65.2%
metadata-eval65.2%
+-commutative65.2%
sub-neg65.2%
metadata-eval65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in x around inf 81.0%
associate-*r/81.0%
Simplified81.0%
expm1-log1p-u79.9%
expm1-udef34.6%
sqrt-undiv34.6%
associate-/r/34.6%
associate-/l*34.6%
Applied egg-rr34.6%
expm1-def60.6%
expm1-log1p61.8%
associate-*l/81.4%
+-commutative81.4%
+-commutative81.4%
associate-/r/81.4%
Simplified81.4%
if 1.2199999999999999e-301 < t < 1.6000000000000001e-157Initial program 6.5%
Simplified6.5%
Taylor expanded in x around inf 69.4%
cancel-sign-sub-inv69.4%
metadata-eval69.4%
distribute-rgt1-in69.4%
metadata-eval69.4%
fma-def69.4%
*-commutative69.4%
unpow269.4%
rem-square-sqrt69.4%
Simplified69.4%
if 9.9999999999999998e23 < t Initial program 31.5%
Simplified31.5%
Applied egg-rr32.2%
Taylor expanded in l around 0 90.1%
+-commutative90.1%
sub-neg90.1%
metadata-eval90.1%
Simplified90.1%
Taylor expanded in t around 0 90.1%
Final simplification86.8%
(FPCore (x l t)
:precision binary64
(if (<= t -1.8e-190)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 2.6e-240)
(/
t
(*
(/ l (sqrt 2.0))
(sqrt (+ (/ 2.0 x) (+ (/ 2.0 (pow x 2.0)) (/ 2.0 (pow x 3.0)))))))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.8e-190) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 2.6e-240) {
tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + ((2.0 / pow(x, 2.0)) + (2.0 / pow(x, 3.0))))));
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.8d-190)) then
tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 2.6d-240) then
tmp = t / ((l / sqrt(2.0d0)) * sqrt(((2.0d0 / x) + ((2.0d0 / (x ** 2.0d0)) + (2.0d0 / (x ** 3.0d0))))))
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.8e-190) {
tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 2.6e-240) {
tmp = t / ((l / Math.sqrt(2.0)) * Math.sqrt(((2.0 / x) + ((2.0 / Math.pow(x, 2.0)) + (2.0 / Math.pow(x, 3.0))))));
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.8e-190: tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 2.6e-240: tmp = t / ((l / math.sqrt(2.0)) * math.sqrt(((2.0 / x) + ((2.0 / math.pow(x, 2.0)) + (2.0 / math.pow(x, 3.0)))))) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.8e-190) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 2.6e-240) tmp = Float64(t / Float64(Float64(l / sqrt(2.0)) * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / (x ^ 2.0)) + Float64(2.0 / (x ^ 3.0))))))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.8e-190) tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 2.6e-240) tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + ((2.0 / (x ^ 2.0)) + (2.0 / (x ^ 3.0)))))); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.8e-190], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-240], N[(t / N[(N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-240}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{2}} \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{{x}^{2}} + \frac{2}{{x}^{3}}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.80000000000000003e-190Initial program 46.8%
Simplified46.8%
Taylor expanded in t around -inf 85.6%
mul-1-neg85.6%
*-commutative85.6%
distribute-rgt-neg-in85.6%
+-commutative85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
Simplified85.6%
if -1.80000000000000003e-190 < t < 2.59999999999999992e-240Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 4.8%
Taylor expanded in x around inf 32.7%
associate-+r+32.7%
associate-*r/32.7%
metadata-eval32.7%
associate-*r/32.7%
metadata-eval32.7%
associate-*r/32.7%
metadata-eval32.7%
Simplified32.7%
if 2.59999999999999992e-240 < t Initial program 40.8%
Simplified40.8%
Applied egg-rr41.4%
Taylor expanded in l around 0 82.3%
+-commutative82.3%
sub-neg82.3%
metadata-eval82.3%
Simplified82.3%
Taylor expanded in t around 0 82.3%
Final simplification78.8%
(FPCore (x l t)
:precision binary64
(if (<= t -2e-186)
(/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 1.05e-240)
(/ t (* (/ l (sqrt 2.0)) (sqrt (+ (/ 2.0 x) (/ 2.0 (pow x 2.0))))))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-186) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 1.05e-240) {
tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + (2.0 / pow(x, 2.0)))));
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2d-186)) then
tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 1.05d-240) then
tmp = t / ((l / sqrt(2.0d0)) * sqrt(((2.0d0 / x) + (2.0d0 / (x ** 2.0d0)))))
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-186) {
tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 1.05e-240) {
tmp = t / ((l / Math.sqrt(2.0)) * Math.sqrt(((2.0 / x) + (2.0 / Math.pow(x, 2.0)))));
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-186: tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 1.05e-240: tmp = t / ((l / math.sqrt(2.0)) * math.sqrt(((2.0 / x) + (2.0 / math.pow(x, 2.0))))) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-186) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 1.05e-240) tmp = Float64(t / Float64(Float64(l / sqrt(2.0)) * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 2.0)))))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-186) tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 1.05e-240) tmp = t / ((l / sqrt(2.0)) * sqrt(((2.0 / x) + (2.0 / (x ^ 2.0))))); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-186], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-240], N[(t / N[(N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-186}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-240}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{2}} \cdot \sqrt{\frac{2}{x} + \frac{2}{{x}^{2}}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.9999999999999998e-186Initial program 46.8%
Simplified46.8%
Taylor expanded in t around -inf 85.6%
mul-1-neg85.6%
*-commutative85.6%
distribute-rgt-neg-in85.6%
+-commutative85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
Simplified85.6%
if -1.9999999999999998e-186 < t < 1.04999999999999997e-240Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 4.8%
Taylor expanded in x around inf 31.9%
associate-*r/31.9%
metadata-eval31.9%
associate-*r/31.9%
metadata-eval31.9%
Simplified31.9%
if 1.04999999999999997e-240 < t Initial program 40.8%
Simplified40.8%
Applied egg-rr41.4%
Taylor expanded in l around 0 82.3%
+-commutative82.3%
sub-neg82.3%
metadata-eval82.3%
Simplified82.3%
Taylor expanded in t around 0 82.3%
Final simplification78.7%
(FPCore (x l t) :precision binary64 (if (<= t -8.8e-185) (/ t (* t (- (sqrt (/ (+ x 1.0) (+ x -1.0)))))) (if (<= t 7e-300) (/ t (/ l (sqrt x))) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -8.8e-185) {
tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 7e-300) {
tmp = t / (l / sqrt(x));
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8.8d-185)) then
tmp = t / (t * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 7d-300) then
tmp = t / (l / sqrt(x))
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -8.8e-185) {
tmp = t / (t * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 7e-300) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -8.8e-185: tmp = t / (t * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 7e-300: tmp = t / (l / math.sqrt(x)) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -8.8e-185) tmp = Float64(t / Float64(t * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 7e-300) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -8.8e-185) tmp = t / (t * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 7e-300) tmp = t / (l / sqrt(x)); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -8.8e-185], N[(t / N[(t * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-185}:\\
\;\;\;\;\frac{t}{t \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -8.8000000000000002e-185Initial program 46.8%
Simplified46.8%
Taylor expanded in t around -inf 85.6%
mul-1-neg85.6%
*-commutative85.6%
distribute-rgt-neg-in85.6%
+-commutative85.6%
sub-neg85.6%
metadata-eval85.6%
+-commutative85.6%
Simplified85.6%
if -8.8000000000000002e-185 < t < 7.0000000000000003e-300Initial program 1.8%
Simplified1.8%
Taylor expanded in l around inf 1.5%
Taylor expanded in x around inf 34.5%
associate-*l/34.4%
div-inv34.4%
sqrt-unprod34.4%
expm1-log1p-u14.0%
expm1-udef7.3%
associate-/l*7.3%
sqrt-unprod7.3%
div-inv7.3%
sqrt-undiv7.3%
Applied egg-rr7.3%
expm1-def14.1%
expm1-log1p34.5%
associate-/r/34.5%
metadata-eval34.5%
*-lft-identity34.5%
Simplified34.5%
if 7.0000000000000003e-300 < t Initial program 37.7%
Simplified37.6%
Applied egg-rr38.2%
Taylor expanded in l around 0 79.4%
+-commutative79.4%
sub-neg79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in t around 0 79.4%
Final simplification79.5%
(FPCore (x l t) :precision binary64 (if (<= t -4.8e-189) (/ t (- (- t) (/ t x))) (if (<= t 7e-300) (/ t (/ l (sqrt x))) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e-189) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = t / (l / sqrt(x));
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.8d-189)) then
tmp = t / (-t - (t / x))
else if (t <= 7d-300) then
tmp = t / (l / sqrt(x))
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e-189) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -4.8e-189: tmp = t / (-t - (t / x)) elif t <= 7e-300: tmp = t / (l / math.sqrt(x)) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -4.8e-189) tmp = Float64(t / Float64(Float64(-t) - Float64(t / x))); elseif (t <= 7e-300) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.8e-189) tmp = t / (-t - (t / x)); elseif (t <= 7e-300) tmp = t / (l / sqrt(x)); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -4.8e-189], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-189}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -4.7999999999999997e-189Initial program 46.8%
Simplified46.8%
Applied egg-rr47.6%
Taylor expanded in l around 0 1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt85.2%
mul-1-neg85.2%
Simplified85.2%
if -4.7999999999999997e-189 < t < 7.0000000000000003e-300Initial program 1.8%
Simplified1.8%
Taylor expanded in l around inf 1.5%
Taylor expanded in x around inf 34.5%
associate-*l/34.4%
div-inv34.4%
sqrt-unprod34.4%
expm1-log1p-u14.0%
expm1-udef7.3%
associate-/l*7.3%
sqrt-unprod7.3%
div-inv7.3%
sqrt-undiv7.3%
Applied egg-rr7.3%
expm1-def14.1%
expm1-log1p34.5%
associate-/r/34.5%
metadata-eval34.5%
*-lft-identity34.5%
Simplified34.5%
if 7.0000000000000003e-300 < t Initial program 37.7%
Simplified37.6%
Applied egg-rr38.2%
Taylor expanded in l around 0 79.4%
+-commutative79.4%
sub-neg79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in t around 0 79.4%
Final simplification79.3%
(FPCore (x l t) :precision binary64 (if (<= t -4.8e-187) (/ t (- (- t) (/ t x))) (if (<= t 7e-300) (* (sqrt x) (/ t l)) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e-187) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = sqrt(x) * (t / l);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.8d-187)) then
tmp = t / (-t - (t / x))
else if (t <= 7d-300) then
tmp = sqrt(x) * (t / l)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e-187) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -4.8e-187: tmp = t / (-t - (t / x)) elif t <= 7e-300: tmp = math.sqrt(x) * (t / l) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -4.8e-187) tmp = Float64(t / Float64(Float64(-t) - Float64(t / x))); elseif (t <= 7e-300) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.8e-187) tmp = t / (-t - (t / x)); elseif (t <= 7e-300) tmp = sqrt(x) * (t / l); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -4.8e-187], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-187}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.80000000000000027e-187Initial program 46.8%
Simplified46.8%
Applied egg-rr47.6%
Taylor expanded in l around 0 1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt85.2%
mul-1-neg85.2%
Simplified85.2%
if -4.80000000000000027e-187 < t < 7.0000000000000003e-300Initial program 1.8%
Simplified1.8%
Taylor expanded in l around inf 1.5%
Taylor expanded in x around inf 34.5%
Taylor expanded in t around 0 34.6%
if 7.0000000000000003e-300 < t Initial program 37.7%
Simplified37.6%
Applied egg-rr38.2%
Taylor expanded in l around 0 79.4%
+-commutative79.4%
sub-neg79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in x around inf 79.0%
Final simplification79.1%
(FPCore (x l t) :precision binary64 (if (<= t -3.15e-189) (/ t (- (- t) (/ t x))) (if (<= t 7e-300) (/ t (/ l (sqrt x))) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -3.15e-189) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = t / (l / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.15d-189)) then
tmp = t / (-t - (t / x))
else if (t <= 7d-300) then
tmp = t / (l / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -3.15e-189) {
tmp = t / (-t - (t / x));
} else if (t <= 7e-300) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -3.15e-189: tmp = t / (-t - (t / x)) elif t <= 7e-300: tmp = t / (l / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -3.15e-189) tmp = Float64(t / Float64(Float64(-t) - Float64(t / x))); elseif (t <= 7e-300) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -3.15e-189) tmp = t / (-t - (t / x)); elseif (t <= 7e-300) tmp = t / (l / sqrt(x)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -3.15e-189], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-300], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.15 \cdot 10^{-189}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-300}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -3.15e-189Initial program 46.8%
Simplified46.8%
Applied egg-rr47.6%
Taylor expanded in l around 0 1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt85.2%
mul-1-neg85.2%
Simplified85.2%
if -3.15e-189 < t < 7.0000000000000003e-300Initial program 1.8%
Simplified1.8%
Taylor expanded in l around inf 1.5%
Taylor expanded in x around inf 34.5%
associate-*l/34.4%
div-inv34.4%
sqrt-unprod34.4%
expm1-log1p-u14.0%
expm1-udef7.3%
associate-/l*7.3%
sqrt-unprod7.3%
div-inv7.3%
sqrt-undiv7.3%
Applied egg-rr7.3%
expm1-def14.1%
expm1-log1p34.5%
associate-/r/34.5%
metadata-eval34.5%
*-lft-identity34.5%
Simplified34.5%
if 7.0000000000000003e-300 < t Initial program 37.7%
Simplified37.6%
Applied egg-rr38.2%
Taylor expanded in l around 0 79.4%
+-commutative79.4%
sub-neg79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in x around inf 79.0%
Final simplification79.1%
(FPCore (x l t) :precision binary64 (if (<= t -5e-310) (/ t (- (- t) (/ t x))) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / (-t - (t / x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = t / (-t - (t / x))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / (-t - (t / x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = t / (-t - (t / x)) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(t / Float64(Float64(-t) - Float64(t / x))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = t / (-t - (t / x)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(t / N[((-t) - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{\left(-t\right) - \frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 42.0%
Simplified42.0%
Applied egg-rr42.7%
Taylor expanded in l around 0 1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt77.3%
mul-1-neg77.3%
Simplified77.3%
if -4.999999999999985e-310 < t Initial program 37.1%
Simplified37.1%
Applied egg-rr37.6%
Taylor expanded in l around 0 78.2%
+-commutative78.2%
sub-neg78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in x around inf 77.9%
Final simplification77.6%
(FPCore (x l t) :precision binary64 (if (<= t -1.2e-279) (/ t (- t)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-279) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.2d-279)) then
tmp = t / -t
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-279) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.2e-279: tmp = t / -t else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.2e-279) tmp = Float64(t / Float64(-t)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.2e-279) tmp = t / -t; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.2e-279], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.19999999999999995e-279Initial program 42.3%
Simplified42.3%
Applied egg-rr43.0%
Taylor expanded in l around 0 1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt76.7%
mul-1-neg76.7%
Simplified76.7%
if -1.19999999999999995e-279 < t Initial program 36.8%
Simplified36.8%
Applied egg-rr37.3%
Taylor expanded in l around 0 77.6%
+-commutative77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in x around inf 77.3%
Final simplification77.0%
(FPCore (x l t) :precision binary64 (if (<= t -1.2e-279) (/ t (- t)) 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-279) {
tmp = t / -t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.2d-279)) then
tmp = t / -t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-279) {
tmp = t / -t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.2e-279: tmp = t / -t else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.2e-279) tmp = Float64(t / Float64(-t)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.2e-279) tmp = t / -t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.2e-279], N[(t / (-t)), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-279}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.19999999999999995e-279Initial program 42.3%
Simplified42.3%
Applied egg-rr43.0%
Taylor expanded in l around 0 1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt76.7%
mul-1-neg76.7%
Simplified76.7%
if -1.19999999999999995e-279 < t Initial program 36.8%
Simplified36.8%
Applied egg-rr37.3%
Taylor expanded in l around 0 77.6%
+-commutative77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in x around inf 77.0%
Final simplification76.9%
(FPCore (x l t) :precision binary64 1.0)
double code(double x, double l, double t) {
return 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 = 1.0d0
end function
public static double code(double x, double l, double t) {
return 1.0;
}
def code(x, l, t): return 1.0
function code(x, l, t) return 1.0 end
function tmp = code(x, l, t) tmp = 1.0; end
code[x_, l_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 39.6%
Simplified39.6%
Applied egg-rr40.2%
Taylor expanded in l around 0 39.1%
+-commutative39.1%
sub-neg39.1%
metadata-eval39.1%
Simplified39.1%
Taylor expanded in x around inf 38.8%
Final simplification38.8%
herbie shell --seed 2023333
(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)))))