
(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 15 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}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(sqrt
(/
2.0
(+
(fma
2.0
(/ (pow t 2.0) x)
(fma 2.0 (pow t 2.0) (/ (pow l 2.0) x)))
(/ (fma 2.0 (pow t 2.0) (pow l 2.0)) x)))))))
(if (<= t -1.38e-52)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t -1.55e-155)
t_1
(if (<= t -1.25e-201)
(/ (sqrt 2.0) (- (sqrt 2.0)))
(if (<= t 4.8e-218)
(/
(sqrt 2.0)
(/
(*
l
(sqrt
(+
(/ 1.0 (+ x -1.0))
(+
(/ 1.0 x)
(+
(/ 1.0 (pow x 2.0))
(+ (/ 1.0 (pow x 3.0)) (/ 1.0 (pow x 4.0))))))))
t))
(if (<= t 5.8e-8) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * sqrt((2.0 / (fma(2.0, (pow(t, 2.0) / x), fma(2.0, pow(t, 2.0), (pow(l, 2.0) / x))) + (fma(2.0, pow(t, 2.0), pow(l, 2.0)) / x))));
double tmp;
if (t <= -1.38e-52) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= -1.55e-155) {
tmp = t_1;
} else if (t <= -1.25e-201) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= 4.8e-218) {
tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + ((1.0 / pow(x, 3.0)) + (1.0 / pow(x, 4.0)))))))) / t);
} else if (t <= 5.8e-8) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * sqrt(Float64(2.0 / Float64(fma(2.0, Float64((t ^ 2.0) / x), fma(2.0, (t ^ 2.0), Float64((l ^ 2.0) / x))) + Float64(fma(2.0, (t ^ 2.0), (l ^ 2.0)) / x))))) tmp = 0.0 if (t <= -1.38e-52) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= -1.55e-155) tmp = t_1; elseif (t <= -1.25e-201) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= 4.8e-218) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(Float64(1.0 / (x ^ 3.0)) + Float64(1.0 / (x ^ 4.0)))))))) / t)); elseif (t <= 5.8e-8) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[N[(2.0 / N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[Power[t, 2.0], $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.38e-52], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-155], t$95$1, If[LessEqual[t, -1.25e-201], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 4.8e-218], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-8], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{\frac{2}{\mathsf{fma}\left(2, \frac{{t}^{2}}{x}, \mathsf{fma}\left(2, {t}^{2}, \frac{{\ell}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t}^{2}, {\ell}^{2}\right)}{x}}}\\
\mathbf{if}\;t \leq -1.38 \cdot 10^{-52}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-201}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-218}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.38000000000000008e-52Initial program 48.4%
Simplified48.4%
Taylor expanded in t around -inf 93.2%
associate-*r*93.2%
neg-mul-193.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
+-commutative93.2%
Simplified93.2%
if -1.38000000000000008e-52 < t < -1.55e-155 or 4.8000000000000002e-218 < t < 5.8000000000000003e-8Initial program 33.4%
Simplified33.3%
Taylor expanded in x around inf 81.9%
add-exp-log77.0%
*-un-lft-identity77.0%
cancel-sign-sub-inv77.0%
metadata-eval77.0%
*-un-lft-identity77.0%
Applied egg-rr77.0%
associate-/r/77.5%
add-exp-log82.4%
sqrt-undiv82.7%
Applied egg-rr82.7%
if -1.55e-155 < t < -1.25e-201Initial program 2.4%
Simplified2.4%
Taylor expanded in x around inf 22.3%
add-exp-log22.3%
*-un-lft-identity22.3%
cancel-sign-sub-inv22.3%
metadata-eval22.3%
*-un-lft-identity22.3%
Applied egg-rr22.3%
Taylor expanded in t around -inf 62.7%
associate-*r*62.7%
neg-mul-162.7%
associate-*r/62.7%
metadata-eval62.7%
Simplified62.7%
Taylor expanded in x around inf 68.9%
mul-1-neg68.9%
Simplified68.9%
if -1.25e-201 < t < 4.8000000000000002e-218Initial program 2.1%
Simplified2.1%
Taylor expanded in l around inf 3.8%
associate--l+28.6%
sub-neg28.6%
metadata-eval28.6%
+-commutative28.6%
sub-neg28.6%
metadata-eval28.6%
+-commutative28.6%
Simplified28.6%
Taylor expanded in x around inf 45.5%
if 5.8000000000000003e-8 < t Initial program 33.9%
Simplified33.8%
Taylor expanded in l around 0 93.7%
sub-neg93.7%
metadata-eval93.7%
+-commutative93.7%
+-commutative93.7%
Simplified93.7%
*-un-lft-identity93.7%
add-sqr-sqrt93.7%
sqrt-unprod93.7%
*-un-lft-identity93.7%
*-un-lft-identity93.7%
*-un-lft-identity93.7%
associate-/r*93.7%
*-inverses93.7%
Applied egg-rr93.7%
*-lft-identity93.7%
Simplified93.7%
Final simplification83.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (pow t 2.0)))
(t_2
(/
(sqrt 2.0)
(/
(sqrt
(+
(+ (* 2.0 (/ (pow t 2.0) x)) (+ (/ (pow l 2.0) x) t_1))
(/ (+ (pow l 2.0) t_1) x)))
t))))
(if (<= t -1e-43)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t -1.35e-157)
t_2
(if (<= t -5.8e-202)
(/ (sqrt 2.0) (- (sqrt 2.0)))
(if (<= t 1.3e-174)
(*
(/ 1.0 (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x))))
(/ (sqrt 2.0) (/ 1.0 t)))
(if (<= t 5e-8) t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * pow(t, 2.0);
double t_2 = sqrt(2.0) / (sqrt((((2.0 * (pow(t, 2.0) / x)) + ((pow(l, 2.0) / x) + t_1)) + ((pow(l, 2.0) + t_1) / x))) / t);
double tmp;
if (t <= -1e-43) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= -1.35e-157) {
tmp = t_2;
} else if (t <= -5.8e-202) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= 1.3e-174) {
tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t));
} else if (t <= 5e-8) {
tmp = t_2;
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (t ** 2.0d0)
t_2 = sqrt(2.0d0) / (sqrt((((2.0d0 * ((t ** 2.0d0) / x)) + (((l ** 2.0d0) / x) + t_1)) + (((l ** 2.0d0) + t_1) / x))) / t)
if (t <= (-1d-43)) then
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= (-1.35d-157)) then
tmp = t_2
else if (t <= (-5.8d-202)) then
tmp = sqrt(2.0d0) / -sqrt(2.0d0)
else if (t <= 1.3d-174) then
tmp = (1.0d0 / ((sqrt(2.0d0) * l) * sqrt((1.0d0 / x)))) * (sqrt(2.0d0) / (1.0d0 / t))
else if (t <= 5d-8) then
tmp = t_2
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 2.0 * Math.pow(t, 2.0);
double t_2 = Math.sqrt(2.0) / (Math.sqrt((((2.0 * (Math.pow(t, 2.0) / x)) + ((Math.pow(l, 2.0) / x) + t_1)) + ((Math.pow(l, 2.0) + t_1) / x))) / t);
double tmp;
if (t <= -1e-43) {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= -1.35e-157) {
tmp = t_2;
} else if (t <= -5.8e-202) {
tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
} else if (t <= 1.3e-174) {
tmp = (1.0 / ((Math.sqrt(2.0) * l) * Math.sqrt((1.0 / x)))) * (Math.sqrt(2.0) / (1.0 / t));
} else if (t <= 5e-8) {
tmp = t_2;
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 2.0 * math.pow(t, 2.0) t_2 = math.sqrt(2.0) / (math.sqrt((((2.0 * (math.pow(t, 2.0) / x)) + ((math.pow(l, 2.0) / x) + t_1)) + ((math.pow(l, 2.0) + t_1) / x))) / t) tmp = 0 if t <= -1e-43: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= -1.35e-157: tmp = t_2 elif t <= -5.8e-202: tmp = math.sqrt(2.0) / -math.sqrt(2.0) elif t <= 1.3e-174: tmp = (1.0 / ((math.sqrt(2.0) * l) * math.sqrt((1.0 / x)))) * (math.sqrt(2.0) / (1.0 / t)) elif t <= 5e-8: tmp = t_2 else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * (t ^ 2.0)) t_2 = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(Float64((l ^ 2.0) / x) + t_1)) + Float64(Float64((l ^ 2.0) + t_1) / x))) / t)) tmp = 0.0 if (t <= -1e-43) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= -1.35e-157) tmp = t_2; elseif (t <= -5.8e-202) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= 1.3e-174) tmp = Float64(Float64(1.0 / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x)))) * Float64(sqrt(2.0) / Float64(1.0 / t))); elseif (t <= 5e-8) tmp = t_2; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 2.0 * (t ^ 2.0); t_2 = sqrt(2.0) / (sqrt((((2.0 * ((t ^ 2.0) / x)) + (((l ^ 2.0) / x) + t_1)) + (((l ^ 2.0) + t_1) / x))) / t); tmp = 0.0; if (t <= -1e-43) tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= -1.35e-157) tmp = t_2; elseif (t <= -5.8e-202) tmp = sqrt(2.0) / -sqrt(2.0); elseif (t <= 1.3e-174) tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t)); elseif (t <= 5e-8) tmp = t_2; else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] + t$95$1), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-43], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-157], t$95$2, If[LessEqual[t, -5.8e-202], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 1.3e-174], N[(N[(1.0 / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-8], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot {t}^{2}\\
t_2 := \frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(\frac{{\ell}^{2}}{x} + t_1\right)\right) + \frac{{\ell}^{2} + t_1}{x}}}{t}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-43}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-157}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-174}:\\
\;\;\;\;\frac{1}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}} \cdot \frac{\sqrt{2}}{\frac{1}{t}}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.00000000000000008e-43Initial program 49.0%
Simplified49.0%
Taylor expanded in t around -inf 93.2%
associate-*r*93.2%
neg-mul-193.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
+-commutative93.2%
Simplified93.2%
if -1.00000000000000008e-43 < t < -1.35e-157 or 1.3000000000000001e-174 < t < 4.9999999999999998e-8Initial program 39.0%
Simplified38.9%
Taylor expanded in x around inf 90.1%
if -1.35e-157 < t < -5.79999999999999976e-202Initial program 2.4%
Simplified2.4%
Taylor expanded in x around inf 22.3%
add-exp-log22.3%
*-un-lft-identity22.3%
cancel-sign-sub-inv22.3%
metadata-eval22.3%
*-un-lft-identity22.3%
Applied egg-rr22.3%
Taylor expanded in t around -inf 62.7%
associate-*r*62.7%
neg-mul-162.7%
associate-*r/62.7%
metadata-eval62.7%
Simplified62.7%
Taylor expanded in x around inf 68.9%
mul-1-neg68.9%
Simplified68.9%
if -5.79999999999999976e-202 < t < 1.3000000000000001e-174Initial program 2.2%
Simplified2.2%
Taylor expanded in x around inf 55.9%
add-exp-log53.3%
*-un-lft-identity53.3%
cancel-sign-sub-inv53.3%
metadata-eval53.3%
*-un-lft-identity53.3%
Applied egg-rr53.3%
*-un-lft-identity53.3%
div-inv53.3%
times-frac54.0%
add-exp-log56.4%
Applied egg-rr56.4%
Taylor expanded in t around 0 44.5%
if 4.9999999999999998e-8 < t Initial program 33.9%
Simplified33.8%
Taylor expanded in l around 0 93.7%
sub-neg93.7%
metadata-eval93.7%
+-commutative93.7%
+-commutative93.7%
Simplified93.7%
*-un-lft-identity93.7%
add-sqr-sqrt93.7%
sqrt-unprod93.7%
*-un-lft-identity93.7%
*-un-lft-identity93.7%
*-un-lft-identity93.7%
associate-/r*93.7%
*-inverses93.7%
Applied egg-rr93.7%
*-lft-identity93.7%
Simplified93.7%
Final simplification83.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ 2.0 (* (/ 1.0 x) 4.0))) (t_2 (/ 1.0 (+ x -1.0))))
(if (<= t -7.4e-205)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 1.9e-243)
(/
(sqrt 2.0)
(/
(*
l
(sqrt
(+
t_2
(+
(/ 1.0 x)
(+
(/ 1.0 (pow x 2.0))
(+ (/ 1.0 (pow x 3.0)) (/ 1.0 (pow x 4.0))))))))
t))
(if (<= t 7.4e-116)
(*
(/ (sqrt 2.0) (/ 1.0 t))
(/
1.0
(+
(* t (sqrt t_1))
(* (/ (pow l 2.0) (* t x)) (sqrt (/ 1.0 t_1))))))
(if (<= t 3.2e-87)
(/ (sqrt 2.0) (/ (* l (sqrt (+ t_2 (/ 1.0 x)))) t))
(sqrt (/ (+ x -1.0) (+ x 1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 + ((1.0 / x) * 4.0);
double t_2 = 1.0 / (x + -1.0);
double tmp;
if (t <= -7.4e-205) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 1.9e-243) {
tmp = sqrt(2.0) / ((l * sqrt((t_2 + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + ((1.0 / pow(x, 3.0)) + (1.0 / pow(x, 4.0)))))))) / t);
} else if (t <= 7.4e-116) {
tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_1)) + ((pow(l, 2.0) / (t * x)) * sqrt((1.0 / t_1)))));
} else if (t <= 3.2e-87) {
tmp = sqrt(2.0) / ((l * sqrt((t_2 + (1.0 / x)))) / t);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 + ((1.0d0 / x) * 4.0d0)
t_2 = 1.0d0 / (x + (-1.0d0))
if (t <= (-7.4d-205)) then
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 1.9d-243) then
tmp = sqrt(2.0d0) / ((l * sqrt((t_2 + ((1.0d0 / x) + ((1.0d0 / (x ** 2.0d0)) + ((1.0d0 / (x ** 3.0d0)) + (1.0d0 / (x ** 4.0d0)))))))) / t)
else if (t <= 7.4d-116) then
tmp = (sqrt(2.0d0) / (1.0d0 / t)) * (1.0d0 / ((t * sqrt(t_1)) + (((l ** 2.0d0) / (t * x)) * sqrt((1.0d0 / t_1)))))
else if (t <= 3.2d-87) then
tmp = sqrt(2.0d0) / ((l * sqrt((t_2 + (1.0d0 / x)))) / t)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 2.0 + ((1.0 / x) * 4.0);
double t_2 = 1.0 / (x + -1.0);
double tmp;
if (t <= -7.4e-205) {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 1.9e-243) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_2 + ((1.0 / x) + ((1.0 / Math.pow(x, 2.0)) + ((1.0 / Math.pow(x, 3.0)) + (1.0 / Math.pow(x, 4.0)))))))) / t);
} else if (t <= 7.4e-116) {
tmp = (Math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * Math.sqrt(t_1)) + ((Math.pow(l, 2.0) / (t * x)) * Math.sqrt((1.0 / t_1)))));
} else if (t <= 3.2e-87) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_2 + (1.0 / x)))) / t);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 2.0 + ((1.0 / x) * 4.0) t_2 = 1.0 / (x + -1.0) tmp = 0 if t <= -7.4e-205: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 1.9e-243: tmp = math.sqrt(2.0) / ((l * math.sqrt((t_2 + ((1.0 / x) + ((1.0 / math.pow(x, 2.0)) + ((1.0 / math.pow(x, 3.0)) + (1.0 / math.pow(x, 4.0)))))))) / t) elif t <= 7.4e-116: tmp = (math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * math.sqrt(t_1)) + ((math.pow(l, 2.0) / (t * x)) * math.sqrt((1.0 / t_1))))) elif t <= 3.2e-87: tmp = math.sqrt(2.0) / ((l * math.sqrt((t_2 + (1.0 / x)))) / t) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 + Float64(Float64(1.0 / x) * 4.0)) t_2 = Float64(1.0 / Float64(x + -1.0)) tmp = 0.0 if (t <= -7.4e-205) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 1.9e-243) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_2 + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(Float64(1.0 / (x ^ 3.0)) + Float64(1.0 / (x ^ 4.0)))))))) / t)); elseif (t <= 7.4e-116) tmp = Float64(Float64(sqrt(2.0) / Float64(1.0 / t)) * Float64(1.0 / Float64(Float64(t * sqrt(t_1)) + Float64(Float64((l ^ 2.0) / Float64(t * x)) * sqrt(Float64(1.0 / t_1)))))); elseif (t <= 3.2e-87) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_2 + Float64(1.0 / x)))) / t)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 2.0 + ((1.0 / x) * 4.0); t_2 = 1.0 / (x + -1.0); tmp = 0.0; if (t <= -7.4e-205) tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 1.9e-243) tmp = sqrt(2.0) / ((l * sqrt((t_2 + ((1.0 / x) + ((1.0 / (x ^ 2.0)) + ((1.0 / (x ^ 3.0)) + (1.0 / (x ^ 4.0)))))))) / t); elseif (t <= 7.4e-116) tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_1)) + (((l ^ 2.0) / (t * x)) * sqrt((1.0 / t_1))))); elseif (t <= 3.2e-87) tmp = sqrt(2.0) / ((l * sqrt((t_2 + (1.0 / x)))) / t); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 + N[(N[(1.0 / x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.4e-205], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-243], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$2 + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-116], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-87], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$2 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 + \frac{1}{x} \cdot 4\\
t_2 := \frac{1}{x + -1}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{-205}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-243}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \left(\frac{1}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\right)\right)}}{t}}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-116}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_1} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_1}}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_2 + \frac{1}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -7.4000000000000002e-205Initial program 43.8%
Simplified43.8%
Taylor expanded in t around -inf 87.3%
associate-*r*87.3%
neg-mul-187.3%
sub-neg87.3%
metadata-eval87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
if -7.4000000000000002e-205 < t < 1.8999999999999999e-243Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 4.1%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
Taylor expanded in x around inf 49.2%
if 1.8999999999999999e-243 < t < 7.4000000000000005e-116Initial program 14.9%
Simplified14.9%
Taylor expanded in x around inf 58.0%
add-exp-log54.7%
*-un-lft-identity54.7%
cancel-sign-sub-inv54.7%
metadata-eval54.7%
*-un-lft-identity54.7%
Applied egg-rr54.7%
*-un-lft-identity54.7%
div-inv54.7%
times-frac56.2%
add-exp-log59.2%
Applied egg-rr59.2%
Taylor expanded in t around inf 64.4%
if 7.4000000000000005e-116 < t < 3.19999999999999979e-87Initial program 17.9%
Simplified17.9%
Taylor expanded in l around inf 2.0%
associate--l+10.4%
sub-neg10.4%
metadata-eval10.4%
+-commutative10.4%
sub-neg10.4%
metadata-eval10.4%
+-commutative10.4%
Simplified10.4%
Taylor expanded in x around inf 36.7%
if 3.19999999999999979e-87 < t Initial program 35.9%
Simplified35.8%
Taylor expanded in l around 0 87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
*-un-lft-identity87.2%
add-sqr-sqrt87.2%
sqrt-unprod87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
associate-/r*87.2%
*-inverses87.2%
Applied egg-rr87.2%
*-lft-identity87.2%
Simplified87.2%
Final simplification79.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ 1.0 (+ x -1.0))) (t_2 (+ 2.0 (* (/ 1.0 x) 4.0))))
(if (<= t -1e-204)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 2.25e-244)
(/
(sqrt 2.0)
(/
(*
l
(sqrt
(+ t_1 (+ (/ 1.0 x) (+ (/ 1.0 (pow x 2.0)) (/ 1.0 (pow x 3.0)))))))
t))
(if (<= t 3.6e-116)
(*
(/ (sqrt 2.0) (/ 1.0 t))
(/
1.0
(+
(* t (sqrt t_2))
(* (/ (pow l 2.0) (* t x)) (sqrt (/ 1.0 t_2))))))
(if (<= t 3.3e-91)
(/ (sqrt 2.0) (/ (* l (sqrt (+ t_1 (/ 1.0 x)))) t))
(sqrt (/ (+ x -1.0) (+ x 1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 1.0 / (x + -1.0);
double t_2 = 2.0 + ((1.0 / x) * 4.0);
double tmp;
if (t <= -1e-204) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 2.25e-244) {
tmp = sqrt(2.0) / ((l * sqrt((t_1 + ((1.0 / x) + ((1.0 / pow(x, 2.0)) + (1.0 / pow(x, 3.0))))))) / t);
} else if (t <= 3.6e-116) {
tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_2)) + ((pow(l, 2.0) / (t * x)) * sqrt((1.0 / t_2)))));
} else if (t <= 3.3e-91) {
tmp = sqrt(2.0) / ((l * sqrt((t_1 + (1.0 / x)))) / t);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 / (x + (-1.0d0))
t_2 = 2.0d0 + ((1.0d0 / x) * 4.0d0)
if (t <= (-1d-204)) then
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 2.25d-244) then
tmp = sqrt(2.0d0) / ((l * sqrt((t_1 + ((1.0d0 / x) + ((1.0d0 / (x ** 2.0d0)) + (1.0d0 / (x ** 3.0d0))))))) / t)
else if (t <= 3.6d-116) then
tmp = (sqrt(2.0d0) / (1.0d0 / t)) * (1.0d0 / ((t * sqrt(t_2)) + (((l ** 2.0d0) / (t * x)) * sqrt((1.0d0 / t_2)))))
else if (t <= 3.3d-91) then
tmp = sqrt(2.0d0) / ((l * sqrt((t_1 + (1.0d0 / x)))) / t)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 1.0 / (x + -1.0);
double t_2 = 2.0 + ((1.0 / x) * 4.0);
double tmp;
if (t <= -1e-204) {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 2.25e-244) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_1 + ((1.0 / x) + ((1.0 / Math.pow(x, 2.0)) + (1.0 / Math.pow(x, 3.0))))))) / t);
} else if (t <= 3.6e-116) {
tmp = (Math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * Math.sqrt(t_2)) + ((Math.pow(l, 2.0) / (t * x)) * Math.sqrt((1.0 / t_2)))));
} else if (t <= 3.3e-91) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt((t_1 + (1.0 / x)))) / t);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 1.0 / (x + -1.0) t_2 = 2.0 + ((1.0 / x) * 4.0) tmp = 0 if t <= -1e-204: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 2.25e-244: tmp = math.sqrt(2.0) / ((l * math.sqrt((t_1 + ((1.0 / x) + ((1.0 / math.pow(x, 2.0)) + (1.0 / math.pow(x, 3.0))))))) / t) elif t <= 3.6e-116: tmp = (math.sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * math.sqrt(t_2)) + ((math.pow(l, 2.0) / (t * x)) * math.sqrt((1.0 / t_2))))) elif t <= 3.3e-91: tmp = math.sqrt(2.0) / ((l * math.sqrt((t_1 + (1.0 / x)))) / t) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(1.0 / Float64(x + -1.0)) t_2 = Float64(2.0 + Float64(Float64(1.0 / x) * 4.0)) tmp = 0.0 if (t <= -1e-204) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 2.25e-244) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_1 + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / (x ^ 2.0)) + Float64(1.0 / (x ^ 3.0))))))) / t)); elseif (t <= 3.6e-116) tmp = Float64(Float64(sqrt(2.0) / Float64(1.0 / t)) * Float64(1.0 / Float64(Float64(t * sqrt(t_2)) + Float64(Float64((l ^ 2.0) / Float64(t * x)) * sqrt(Float64(1.0 / t_2)))))); elseif (t <= 3.3e-91) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(t_1 + Float64(1.0 / x)))) / t)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 1.0 / (x + -1.0); t_2 = 2.0 + ((1.0 / x) * 4.0); tmp = 0.0; if (t <= -1e-204) tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 2.25e-244) tmp = sqrt(2.0) / ((l * sqrt((t_1 + ((1.0 / x) + ((1.0 / (x ^ 2.0)) + (1.0 / (x ^ 3.0))))))) / t); elseif (t <= 3.6e-116) tmp = (sqrt(2.0) / (1.0 / t)) * (1.0 / ((t * sqrt(t_2)) + (((l ^ 2.0) / (t * x)) * sqrt((1.0 / t_2))))); elseif (t <= 3.3e-91) tmp = sqrt(2.0) / ((l * sqrt((t_1 + (1.0 / x)))) / t); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[(N[(1.0 / x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-204], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-244], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$1 + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-116], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(t * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-91], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(t$95$1 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{1}{x + -1}\\
t_2 := 2 + \frac{1}{x} \cdot 4\\
\mathbf{if}\;t \leq -1 \cdot 10^{-204}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-244}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_1 + \left(\frac{1}{x} + \left(\frac{1}{{x}^{2}} + \frac{1}{{x}^{3}}\right)\right)}}{t}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-116}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{1}{t}} \cdot \frac{1}{t \cdot \sqrt{t_2} + \frac{{\ell}^{2}}{t \cdot x} \cdot \sqrt{\frac{1}{t_2}}}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{t_1 + \frac{1}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1e-204Initial program 43.8%
Simplified43.8%
Taylor expanded in t around -inf 87.3%
associate-*r*87.3%
neg-mul-187.3%
sub-neg87.3%
metadata-eval87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
if -1e-204 < t < 2.2500000000000001e-244Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 4.1%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
Taylor expanded in x around inf 49.2%
if 2.2500000000000001e-244 < t < 3.59999999999999975e-116Initial program 14.9%
Simplified14.9%
Taylor expanded in x around inf 58.0%
add-exp-log54.7%
*-un-lft-identity54.7%
cancel-sign-sub-inv54.7%
metadata-eval54.7%
*-un-lft-identity54.7%
Applied egg-rr54.7%
*-un-lft-identity54.7%
div-inv54.7%
times-frac56.2%
add-exp-log59.2%
Applied egg-rr59.2%
Taylor expanded in t around inf 64.4%
if 3.59999999999999975e-116 < t < 3.30000000000000011e-91Initial program 17.9%
Simplified17.9%
Taylor expanded in l around inf 2.0%
associate--l+10.4%
sub-neg10.4%
metadata-eval10.4%
+-commutative10.4%
sub-neg10.4%
metadata-eval10.4%
+-commutative10.4%
Simplified10.4%
Taylor expanded in x around inf 36.7%
if 3.30000000000000011e-91 < t Initial program 35.9%
Simplified35.8%
Taylor expanded in l around 0 87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
*-un-lft-identity87.2%
add-sqr-sqrt87.2%
sqrt-unprod87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
associate-/r*87.2%
*-inverses87.2%
Applied egg-rr87.2%
*-lft-identity87.2%
Simplified87.2%
Final simplification79.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.2e-201)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 3.2e-91)
(* (/ 1.0 (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))) (/ (sqrt 2.0) (/ 1.0 t)))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.2e-201) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 3.2e-91) {
tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t));
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-2.2d-201)) then
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 3.2d-91) then
tmp = (1.0d0 / ((sqrt(2.0d0) * l) * sqrt((1.0d0 / x)))) * (sqrt(2.0d0) / (1.0d0 / t))
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.2e-201) {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 3.2e-91) {
tmp = (1.0 / ((Math.sqrt(2.0) * l) * Math.sqrt((1.0 / x)))) * (Math.sqrt(2.0) / (1.0 / t));
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.2e-201: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 3.2e-91: tmp = (1.0 / ((math.sqrt(2.0) * l) * math.sqrt((1.0 / x)))) * (math.sqrt(2.0) / (1.0 / t)) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.2e-201) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 3.2e-91) tmp = Float64(Float64(1.0 / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x)))) * Float64(sqrt(2.0) / Float64(1.0 / t))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.2e-201) tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 3.2e-91) tmp = (1.0 / ((sqrt(2.0) * l) * sqrt((1.0 / x)))) * (sqrt(2.0) / (1.0 / t)); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.2e-201], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-91], N[(N[(1.0 / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-201}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{1}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}} \cdot \frac{\sqrt{2}}{\frac{1}{t}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -2.2e-201Initial program 43.8%
Simplified43.8%
Taylor expanded in t around -inf 87.3%
associate-*r*87.3%
neg-mul-187.3%
sub-neg87.3%
metadata-eval87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
if -2.2e-201 < t < 3.19999999999999996e-91Initial program 8.8%
Simplified8.8%
Taylor expanded in x around inf 63.2%
add-exp-log60.1%
*-un-lft-identity60.1%
cancel-sign-sub-inv60.1%
metadata-eval60.1%
*-un-lft-identity60.1%
Applied egg-rr60.1%
*-un-lft-identity60.1%
div-inv60.1%
times-frac60.7%
add-exp-log63.6%
Applied egg-rr63.6%
Taylor expanded in t around 0 42.9%
if 3.19999999999999996e-91 < t Initial program 35.9%
Simplified35.8%
Taylor expanded in l around 0 87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
*-un-lft-identity87.2%
add-sqr-sqrt87.2%
sqrt-unprod87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
associate-/r*87.2%
*-inverses87.2%
Applied egg-rr87.2%
*-lft-identity87.2%
Simplified87.2%
Final simplification77.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.25e-202)
(/ (sqrt 2.0) (* (sqrt 2.0) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(if (<= t 3.2e-87)
(/ (sqrt 2.0) (/ (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x)))) t))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.25e-202) {
tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 3.2e-87) {
tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-1.25d-202)) then
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * -sqrt(((x + 1.0d0) / (x + (-1.0d0)))))
else if (t <= 3.2d-87) then
tmp = sqrt(2.0d0) / ((l * sqrt(((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)))) / t)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.25e-202) {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * -Math.sqrt(((x + 1.0) / (x + -1.0))));
} else if (t <= 3.2e-87) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.25e-202: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * -math.sqrt(((x + 1.0) / (x + -1.0)))) elif t <= 3.2e-87: tmp = math.sqrt(2.0) / ((l * math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.25e-202) tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); elseif (t <= 3.2e-87) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x)))) / t)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.25e-202) tmp = sqrt(2.0) / (sqrt(2.0) * -sqrt(((x + 1.0) / (x + -1.0)))); elseif (t <= 3.2e-87) tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.25e-202], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-87], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.24999999999999993e-202Initial program 43.8%
Simplified43.8%
Taylor expanded in t around -inf 87.3%
associate-*r*87.3%
neg-mul-187.3%
sub-neg87.3%
metadata-eval87.3%
+-commutative87.3%
+-commutative87.3%
Simplified87.3%
if -1.24999999999999993e-202 < t < 3.19999999999999979e-87Initial program 8.8%
Simplified8.8%
Taylor expanded in l around inf 3.2%
associate--l+23.5%
sub-neg23.5%
metadata-eval23.5%
+-commutative23.5%
sub-neg23.5%
metadata-eval23.5%
+-commutative23.5%
Simplified23.5%
Taylor expanded in x around inf 42.1%
if 3.19999999999999979e-87 < t Initial program 35.9%
Simplified35.8%
Taylor expanded in l around 0 87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
*-un-lft-identity87.2%
add-sqr-sqrt87.2%
sqrt-unprod87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
associate-/r*87.2%
*-inverses87.2%
Applied egg-rr87.2%
*-lft-identity87.2%
Simplified87.2%
Final simplification77.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4e-202)
(/ (sqrt 2.0) (- (sqrt (+ 2.0 (/ 4.0 x)))))
(if (<= t 3e-91)
(/ (sqrt 2.0) (/ (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x)))) t))
(sqrt (/ (+ x -1.0) (+ x 1.0))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4e-202) {
tmp = sqrt(2.0) / -sqrt((2.0 + (4.0 / x)));
} else if (t <= 3e-91) {
tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-4d-202)) then
tmp = sqrt(2.0d0) / -sqrt((2.0d0 + (4.0d0 / x)))
else if (t <= 3d-91) then
tmp = sqrt(2.0d0) / ((l * sqrt(((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)))) / t)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4e-202) {
tmp = Math.sqrt(2.0) / -Math.sqrt((2.0 + (4.0 / x)));
} else if (t <= 3e-91) {
tmp = Math.sqrt(2.0) / ((l * Math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4e-202: tmp = math.sqrt(2.0) / -math.sqrt((2.0 + (4.0 / x))) elif t <= 3e-91: tmp = math.sqrt(2.0) / ((l * math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4e-202) tmp = Float64(sqrt(2.0) / Float64(-sqrt(Float64(2.0 + Float64(4.0 / x))))); elseif (t <= 3e-91) tmp = Float64(sqrt(2.0) / Float64(Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x)))) / t)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4e-202) tmp = sqrt(2.0) / -sqrt((2.0 + (4.0 / x))); elseif (t <= 3e-91) tmp = sqrt(2.0) / ((l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))) / t); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -4e-202], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 3e-91], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-91}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -4.0000000000000001e-202Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 57.5%
add-exp-log54.0%
*-un-lft-identity54.0%
cancel-sign-sub-inv54.0%
metadata-eval54.0%
*-un-lft-identity54.0%
Applied egg-rr54.0%
Taylor expanded in t around -inf 79.9%
associate-*r*79.9%
neg-mul-179.9%
associate-*r/79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in t around 0 87.2%
mul-1-neg87.2%
associate-*r/87.2%
metadata-eval87.2%
Simplified87.2%
if -4.0000000000000001e-202 < t < 3.0000000000000002e-91Initial program 8.8%
Simplified8.8%
Taylor expanded in l around inf 3.2%
associate--l+23.5%
sub-neg23.5%
metadata-eval23.5%
+-commutative23.5%
sub-neg23.5%
metadata-eval23.5%
+-commutative23.5%
Simplified23.5%
Taylor expanded in x around inf 42.1%
if 3.0000000000000002e-91 < t Initial program 35.9%
Simplified35.8%
Taylor expanded in l around 0 87.2%
sub-neg87.2%
metadata-eval87.2%
+-commutative87.2%
+-commutative87.2%
Simplified87.2%
*-un-lft-identity87.2%
add-sqr-sqrt87.2%
sqrt-unprod87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
*-un-lft-identity87.2%
associate-/r*87.2%
*-inverses87.2%
Applied egg-rr87.2%
*-lft-identity87.2%
Simplified87.2%
Final simplification77.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.1e-201) (/ (sqrt 2.0) (- (sqrt (+ 2.0 (/ 4.0 x))))) (if (<= t 2.15e-240) (* (/ t l) (sqrt x)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.1e-201) {
tmp = sqrt(2.0) / -sqrt((2.0 + (4.0 / x)));
} else if (t <= 2.15e-240) {
tmp = (t / l) * sqrt(x);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-1.1d-201)) then
tmp = sqrt(2.0d0) / -sqrt((2.0d0 + (4.0d0 / x)))
else if (t <= 2.15d-240) then
tmp = (t / l) * sqrt(x)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.1e-201) {
tmp = Math.sqrt(2.0) / -Math.sqrt((2.0 + (4.0 / x)));
} else if (t <= 2.15e-240) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.1e-201: tmp = math.sqrt(2.0) / -math.sqrt((2.0 + (4.0 / x))) elif t <= 2.15e-240: tmp = (t / l) * math.sqrt(x) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.1e-201) tmp = Float64(sqrt(2.0) / Float64(-sqrt(Float64(2.0 + Float64(4.0 / x))))); elseif (t <= 2.15e-240) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.1e-201) tmp = sqrt(2.0) / -sqrt((2.0 + (4.0 / x))); elseif (t <= 2.15e-240) tmp = (t / l) * sqrt(x); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.1e-201], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 2.15e-240], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-201}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2 + \frac{4}{x}}}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-240}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.1e-201Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 57.5%
add-exp-log54.0%
*-un-lft-identity54.0%
cancel-sign-sub-inv54.0%
metadata-eval54.0%
*-un-lft-identity54.0%
Applied egg-rr54.0%
Taylor expanded in t around -inf 79.9%
associate-*r*79.9%
neg-mul-179.9%
associate-*r/79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in t around 0 87.2%
mul-1-neg87.2%
associate-*r/87.2%
metadata-eval87.2%
Simplified87.2%
if -1.1e-201 < t < 2.15000000000000007e-240Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 2.0%
associate--l+32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
Simplified32.7%
Taylor expanded in x around inf 67.0%
associate-*r/67.0%
Simplified67.0%
Taylor expanded in l around 0 49.4%
if 2.15000000000000007e-240 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
*-un-lft-identity77.1%
add-sqr-sqrt77.1%
sqrt-unprod77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
associate-/r*77.1%
*-inverses77.1%
Applied egg-rr77.1%
*-lft-identity77.1%
Simplified77.1%
Final simplification78.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -6.6e-202) (* (sqrt 2.0) (- (sqrt 0.5))) (if (<= t 2.5e-240) (* (/ t l) (sqrt x)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.6e-202) {
tmp = sqrt(2.0) * -sqrt(0.5);
} else if (t <= 2.5e-240) {
tmp = (t / l) * sqrt(x);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-6.6d-202)) then
tmp = sqrt(2.0d0) * -sqrt(0.5d0)
else if (t <= 2.5d-240) then
tmp = (t / l) * sqrt(x)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -6.6e-202) {
tmp = Math.sqrt(2.0) * -Math.sqrt(0.5);
} else if (t <= 2.5e-240) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.6e-202: tmp = math.sqrt(2.0) * -math.sqrt(0.5) elif t <= 2.5e-240: tmp = (t / l) * math.sqrt(x) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.6e-202) tmp = Float64(sqrt(2.0) * Float64(-sqrt(0.5))); elseif (t <= 2.5e-240) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.6e-202) tmp = sqrt(2.0) * -sqrt(0.5); elseif (t <= 2.5e-240) tmp = (t / l) * sqrt(x); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -6.6e-202], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 2.5e-240], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-202}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{0.5}\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-240}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -6.59999999999999979e-202Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 57.5%
add-exp-log54.0%
*-un-lft-identity54.0%
cancel-sign-sub-inv54.0%
metadata-eval54.0%
*-un-lft-identity54.0%
Applied egg-rr54.0%
Taylor expanded in t around -inf 85.9%
associate-*r*85.9%
neg-mul-185.9%
associate-*r/85.9%
metadata-eval85.9%
Simplified85.9%
Taylor expanded in x around inf 85.4%
mul-1-neg85.4%
distribute-rgt-neg-in85.4%
Simplified85.4%
if -6.59999999999999979e-202 < t < 2.5000000000000002e-240Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 2.0%
associate--l+32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
Simplified32.7%
Taylor expanded in x around inf 67.0%
associate-*r/67.0%
Simplified67.0%
Taylor expanded in l around 0 49.4%
if 2.5000000000000002e-240 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
*-un-lft-identity77.1%
add-sqr-sqrt77.1%
sqrt-unprod77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
associate-/r*77.1%
*-inverses77.1%
Applied egg-rr77.1%
*-lft-identity77.1%
Simplified77.1%
Final simplification77.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -2.8e-204) (/ (sqrt 2.0) (- (sqrt 2.0))) (if (<= t 4.2e-242) (* (/ t l) (sqrt x)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.8e-204) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= 4.2e-242) {
tmp = (t / l) * sqrt(x);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-2.8d-204)) then
tmp = sqrt(2.0d0) / -sqrt(2.0d0)
else if (t <= 4.2d-242) then
tmp = (t / l) * sqrt(x)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.8e-204) {
tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
} else if (t <= 4.2e-242) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.8e-204: tmp = math.sqrt(2.0) / -math.sqrt(2.0) elif t <= 4.2e-242: tmp = (t / l) * math.sqrt(x) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.8e-204) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= 4.2e-242) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.8e-204) tmp = sqrt(2.0) / -sqrt(2.0); elseif (t <= 4.2e-242) tmp = (t / l) * sqrt(x); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.8e-204], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 4.2e-242], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-204}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -2.8e-204Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 57.5%
add-exp-log54.0%
*-un-lft-identity54.0%
cancel-sign-sub-inv54.0%
metadata-eval54.0%
*-un-lft-identity54.0%
Applied egg-rr54.0%
Taylor expanded in t around -inf 79.9%
associate-*r*79.9%
neg-mul-179.9%
associate-*r/79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in x around inf 86.7%
mul-1-neg86.7%
Simplified86.7%
if -2.8e-204 < t < 4.20000000000000037e-242Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 2.0%
associate--l+32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
sub-neg32.7%
metadata-eval32.7%
+-commutative32.7%
Simplified32.7%
Taylor expanded in x around inf 67.0%
associate-*r/67.0%
Simplified67.0%
Taylor expanded in l around 0 49.4%
if 4.20000000000000037e-242 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
*-un-lft-identity77.1%
add-sqr-sqrt77.1%
sqrt-unprod77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
associate-/r*77.1%
*-inverses77.1%
Applied egg-rr77.1%
*-lft-identity77.1%
Simplified77.1%
Final simplification78.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-42) (- (sqrt (+ 4.0 (/ -8.0 x)))) (if (<= t 7.2e-242) (* (/ t l) (sqrt x)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-42) {
tmp = -sqrt((4.0 + (-8.0 / x)));
} else if (t <= 7.2e-242) {
tmp = (t / l) * sqrt(x);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-1d-42)) then
tmp = -sqrt((4.0d0 + ((-8.0d0) / x)))
else if (t <= 7.2d-242) then
tmp = (t / l) * sqrt(x)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-42) {
tmp = -Math.sqrt((4.0 + (-8.0 / x)));
} else if (t <= 7.2e-242) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-42: tmp = -math.sqrt((4.0 + (-8.0 / x))) elif t <= 7.2e-242: tmp = (t / l) * math.sqrt(x) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-42) tmp = Float64(-sqrt(Float64(4.0 + Float64(-8.0 / x)))); elseif (t <= 7.2e-242) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-42) tmp = -sqrt((4.0 + (-8.0 / x))); elseif (t <= 7.2e-242) tmp = (t / l) * sqrt(x); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-42], (-N[Sqrt[N[(4.0 + N[(-8.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 7.2e-242], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\
\;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.00000000000000004e-42Initial program 49.6%
Simplified49.6%
Taylor expanded in x around inf 52.9%
add-exp-log49.7%
*-un-lft-identity49.7%
cancel-sign-sub-inv49.7%
metadata-eval49.7%
*-un-lft-identity49.7%
Applied egg-rr49.7%
Taylor expanded in t around -inf 92.6%
associate-*r*92.6%
neg-mul-192.6%
associate-*r/92.6%
metadata-eval92.6%
Simplified92.6%
Applied egg-rr17.9%
sub0-neg17.9%
distribute-lft-in17.9%
metadata-eval17.9%
associate-*r/17.9%
metadata-eval17.9%
Simplified17.9%
if -1.00000000000000004e-42 < t < 7.20000000000000028e-242Initial program 15.0%
Simplified15.0%
Taylor expanded in l around inf 2.2%
associate--l+23.4%
sub-neg23.4%
metadata-eval23.4%
+-commutative23.4%
sub-neg23.4%
metadata-eval23.4%
+-commutative23.4%
Simplified23.4%
Taylor expanded in x around inf 44.5%
associate-*r/44.5%
Simplified44.5%
Taylor expanded in l around 0 33.9%
if 7.20000000000000028e-242 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
*-un-lft-identity77.1%
add-sqr-sqrt77.1%
sqrt-unprod77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
*-un-lft-identity77.1%
associate-/r*77.1%
*-inverses77.1%
Applied egg-rr77.1%
*-lft-identity77.1%
Simplified77.1%
Final simplification48.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-42) (- (sqrt (+ 4.0 (/ -8.0 x)))) (if (<= t 3.5e-241) (* (/ t l) (sqrt x)) (- 1.0 (/ 1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-42) {
tmp = -sqrt((4.0 + (-8.0 / x)));
} else if (t <= 3.5e-241) {
tmp = (t / l) * sqrt(x);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= (-1d-42)) then
tmp = -sqrt((4.0d0 + ((-8.0d0) / x)))
else if (t <= 3.5d-241) then
tmp = (t / l) * sqrt(x)
else
tmp = 1.0d0 - (1.0d0 / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-42) {
tmp = -Math.sqrt((4.0 + (-8.0 / x)));
} else if (t <= 3.5e-241) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-42: tmp = -math.sqrt((4.0 + (-8.0 / x))) elif t <= 3.5e-241: tmp = (t / l) * math.sqrt(x) else: tmp = 1.0 - (1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-42) tmp = Float64(-sqrt(Float64(4.0 + Float64(-8.0 / x)))); elseif (t <= 3.5e-241) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = Float64(1.0 - Float64(1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-42) tmp = -sqrt((4.0 + (-8.0 / x))); elseif (t <= 3.5e-241) tmp = (t / l) * sqrt(x); else tmp = 1.0 - (1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-42], (-N[Sqrt[N[(4.0 + N[(-8.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.5e-241], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-42}:\\
\;\;\;\;-\sqrt{4 + \frac{-8}{x}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-241}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if t < -1.00000000000000004e-42Initial program 49.6%
Simplified49.6%
Taylor expanded in x around inf 52.9%
add-exp-log49.7%
*-un-lft-identity49.7%
cancel-sign-sub-inv49.7%
metadata-eval49.7%
*-un-lft-identity49.7%
Applied egg-rr49.7%
Taylor expanded in t around -inf 92.6%
associate-*r*92.6%
neg-mul-192.6%
associate-*r/92.6%
metadata-eval92.6%
Simplified92.6%
Applied egg-rr17.9%
sub0-neg17.9%
distribute-lft-in17.9%
metadata-eval17.9%
associate-*r/17.9%
metadata-eval17.9%
Simplified17.9%
if -1.00000000000000004e-42 < t < 3.4999999999999999e-241Initial program 15.0%
Simplified15.0%
Taylor expanded in l around inf 2.2%
associate--l+23.4%
sub-neg23.4%
metadata-eval23.4%
+-commutative23.4%
sub-neg23.4%
metadata-eval23.4%
+-commutative23.4%
Simplified23.4%
Taylor expanded in x around inf 44.5%
associate-*r/44.5%
Simplified44.5%
Taylor expanded in l around 0 33.9%
if 3.4999999999999999e-241 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 77.0%
Final simplification48.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t 7.3e-242) (* (/ t l) (sqrt x)) (- 1.0 (/ 1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= 7.3e-242) {
tmp = (t / l) * sqrt(x);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this 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) :: tmp
if (t <= 7.3d-242) then
tmp = (t / l) * sqrt(x)
else
tmp = 1.0d0 - (1.0d0 / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= 7.3e-242) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= 7.3e-242: tmp = (t / l) * math.sqrt(x) else: tmp = 1.0 - (1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= 7.3e-242) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = Float64(1.0 - Float64(1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 7.3e-242) tmp = (t / l) * sqrt(x); else tmp = 1.0 - (1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, 7.3e-242], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.3 \cdot 10^{-242}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if t < 7.3000000000000001e-242Initial program 35.0%
Simplified35.0%
Taylor expanded in l around inf 2.5%
associate--l+11.2%
sub-neg11.2%
metadata-eval11.2%
+-commutative11.2%
sub-neg11.2%
metadata-eval11.2%
+-commutative11.2%
Simplified11.2%
Taylor expanded in x around inf 20.1%
associate-*r/20.1%
Simplified20.1%
Taylor expanded in l around 0 17.1%
if 7.3000000000000001e-242 < t Initial program 31.0%
Simplified31.0%
Taylor expanded in l around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
+-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 77.0%
Final simplification43.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (- 1.0 (/ 1.0 x)))
l = abs(l);
double code(double x, double l, double t) {
return 1.0 - (1.0 / x);
}
NOTE: l should be positive before calling this function
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 - (1.0d0 / x)
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return 1.0 - (1.0 / x);
}
l = abs(l) def code(x, l, t): return 1.0 - (1.0 / x)
l = abs(l) function code(x, l, t) return Float64(1.0 - Float64(1.0 / x)) end
l = abs(l) function tmp = code(x, l, t) tmp = 1.0 - (1.0 / x); end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
1 - \frac{1}{x}
\end{array}
Initial program 33.2%
Simplified33.2%
Taylor expanded in l around 0 36.2%
sub-neg36.2%
metadata-eval36.2%
+-commutative36.2%
+-commutative36.2%
Simplified36.2%
Taylor expanded in x around inf 36.2%
Final simplification36.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 1.0)
l = abs(l);
double code(double x, double l, double t) {
return 1.0;
}
NOTE: l should be positive before calling this function
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
l = Math.abs(l);
public static double code(double x, double l, double t) {
return 1.0;
}
l = abs(l) def code(x, l, t): return 1.0
l = abs(l) function code(x, l, t) return 1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = 1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := 1.0
\begin{array}{l}
l = |l|\\
\\
1
\end{array}
Initial program 33.2%
Simplified33.2%
Taylor expanded in l around 0 36.2%
sub-neg36.2%
metadata-eval36.2%
+-commutative36.2%
+-commutative36.2%
Simplified36.2%
Taylor expanded in x around inf 36.1%
Final simplification36.1%
herbie shell --seed 2023305
(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)))))