
(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 16 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 (+ t (/ t x))))
(t_2 (fma 2.0 (* t t) (* l l)))
(t_3 (/ t_2 x))
(t_4 (/ (* l l) x)))
(if (<= t -9.2e+49)
(/
(sqrt 2.0)
(/ (* (* t (sqrt 2.0)) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))) t))
(if (<= t -5e-158)
(/ t (sqrt (/ (+ (+ t_4 (* 2.0 t_1)) t_3) 2.0)))
(if (<= t 1.15e-161)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (* x x)) (/ 2.0 (pow x 3.0))))))))
(if (<= t 4.8e+44)
(/
t
(sqrt
(/ (+ t_4 (+ (fma 2.0 t_1 (/ (* 2.0 t_2) (* x x))) t_3)) 2.0)))
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (t + (t / x));
double t_2 = fma(2.0, (t * t), (l * l));
double t_3 = t_2 / x;
double t_4 = (l * l) / x;
double tmp;
if (t <= -9.2e+49) {
tmp = sqrt(2.0) / (((t * sqrt(2.0)) * -sqrt(((x + 1.0) / (x + -1.0)))) / t);
} else if (t <= -5e-158) {
tmp = t / sqrt((((t_4 + (2.0 * t_1)) + t_3) / 2.0));
} else if (t <= 1.15e-161) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / pow(x, 3.0)))))));
} else if (t <= 4.8e+44) {
tmp = t / sqrt(((t_4 + (fma(2.0, t_1, ((2.0 * t_2) / (x * x))) + t_3)) / 2.0));
} else {
tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(t + Float64(t / x))) t_2 = fma(2.0, Float64(t * t), Float64(l * l)) t_3 = Float64(t_2 / x) t_4 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -9.2e+49) tmp = Float64(sqrt(2.0) / Float64(Float64(Float64(t * sqrt(2.0)) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))) / t)); elseif (t <= -5e-158) tmp = Float64(t / sqrt(Float64(Float64(Float64(t_4 + Float64(2.0 * t_1)) + t_3) / 2.0))); elseif (t <= 1.15e-161) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / (x ^ 3.0)))))))); elseif (t <= 4.8e+44) tmp = Float64(t / sqrt(Float64(Float64(t_4 + Float64(fma(2.0, t_1, Float64(Float64(2.0 * t_2) / Float64(x * x))) + t_3)) / 2.0))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / x), $MachinePrecision]}, Block[{t$95$4 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -9.2e+49], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-158], N[(t / N[Sqrt[N[(N[(N[(t$95$4 + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+44], N[(t / N[Sqrt[N[(N[(t$95$4 + N[(N[(2.0 * t$95$1 + N[(N[(2.0 * t$95$2), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \left(t + \frac{t}{x}\right)\\
t_2 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_3 := \frac{t_2}{x}\\
t_4 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\left(t \cdot \sqrt{2}\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}{t}}\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-158}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\left(t_4 + 2 \cdot t_1\right) + t_3}{2}}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+44}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{t_4 + \left(\mathsf{fma}\left(2, t_1, \frac{2 \cdot t_2}{x \cdot x}\right) + t_3\right)}{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -9.20000000000000008e49Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
associate-/r/27.1%
fma-neg27.1%
metadata-eval27.1%
sub-neg27.1%
fma-udef27.1%
+-commutative27.1%
fma-neg27.1%
Applied egg-rr12.2%
Taylor expanded in t around -inf 92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
*-commutative92.9%
+-commutative92.9%
Simplified92.9%
if -9.20000000000000008e49 < t < -4.99999999999999972e-158Initial program 57.3%
associate-*l/57.5%
Simplified57.5%
*-commutative57.5%
clear-num57.4%
un-div-inv57.3%
sqrt-undiv57.7%
metadata-eval57.7%
sub-neg57.7%
associate-*l/55.6%
sub-neg55.6%
metadata-eval55.6%
Applied egg-rr55.6%
+-commutative55.6%
*-commutative55.6%
+-commutative55.6%
+-commutative55.6%
Simplified55.6%
Taylor expanded in x around inf 92.2%
unpow292.2%
+-commutative92.2%
distribute-lft-out92.2%
unpow292.2%
unpow292.2%
associate-*l/92.2%
distribute-rgt-out92.2%
associate-*r/92.2%
mul-1-neg92.2%
+-commutative92.2%
unpow292.2%
unpow292.2%
fma-udef92.2%
Simplified92.2%
if -4.99999999999999972e-158 < t < 1.15e-161Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in l around inf 7.2%
*-commutative7.2%
associate--l+7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
Simplified7.3%
Taylor expanded in x around inf 57.3%
associate-*r/57.3%
metadata-eval57.3%
+-commutative57.3%
associate-*r/57.3%
metadata-eval57.3%
unpow257.3%
associate-*r/57.3%
metadata-eval57.3%
Simplified57.3%
if 1.15e-161 < t < 4.80000000000000026e44Initial program 54.8%
associate-*l/55.0%
Simplified55.0%
*-commutative55.0%
clear-num54.9%
un-div-inv54.7%
sqrt-undiv55.1%
metadata-eval55.1%
sub-neg55.1%
associate-*l/52.7%
sub-neg52.7%
metadata-eval52.7%
Applied egg-rr52.7%
+-commutative52.7%
*-commutative52.7%
+-commutative52.7%
+-commutative52.7%
Simplified52.7%
Taylor expanded in x around -inf 88.2%
Simplified88.2%
if 4.80000000000000026e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0)))))
(if (<= t -3.25e+50)
(/
(sqrt 2.0)
(/ (* (* t (sqrt 2.0)) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))) t))
(if (<= t -4.5e-158)
t_1
(if (<= t 1.6e-162)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (* x x)) (/ 2.0 (pow x 3.0))))))))
(if (<= t 1.35e+45)
t_1
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double tmp;
if (t <= -3.25e+50) {
tmp = sqrt(2.0) / (((t * sqrt(2.0)) * -sqrt(((x + 1.0) / (x + -1.0)))) / t);
} else if (t <= -4.5e-158) {
tmp = t_1;
} else if (t <= 1.6e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / pow(x, 3.0)))))));
} else if (t <= 1.35e+45) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) tmp = 0.0 if (t <= -3.25e+50) tmp = Float64(sqrt(2.0) / Float64(Float64(Float64(t * sqrt(2.0)) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))) / t)); elseif (t <= -4.5e-158) tmp = t_1; elseif (t <= 1.6e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / (x ^ 3.0)))))))); elseif (t <= 1.35e+45) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e+50], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$1, If[LessEqual[t, 1.6e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+45], t$95$1, N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{+50}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\left(t \cdot \sqrt{2}\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}{t}}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -3.2500000000000001e50Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
associate-/r/27.1%
fma-neg27.1%
metadata-eval27.1%
sub-neg27.1%
fma-udef27.1%
+-commutative27.1%
fma-neg27.1%
Applied egg-rr12.2%
Taylor expanded in t around -inf 92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
*-commutative92.9%
+-commutative92.9%
Simplified92.9%
if -3.2500000000000001e50 < t < -4.5e-158 or 1.59999999999999988e-162 < t < 1.34999999999999992e45Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
*-commutative56.4%
clear-num56.2%
un-div-inv56.1%
sqrt-undiv56.5%
metadata-eval56.5%
sub-neg56.5%
associate-*l/54.3%
sub-neg54.3%
metadata-eval54.3%
Applied egg-rr54.3%
+-commutative54.3%
*-commutative54.3%
+-commutative54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in x around inf 90.2%
unpow290.2%
+-commutative90.2%
distribute-lft-out90.2%
unpow290.2%
unpow290.2%
associate-*l/90.2%
distribute-rgt-out90.2%
associate-*r/90.2%
mul-1-neg90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
fma-udef90.2%
Simplified90.2%
if -4.5e-158 < t < 1.59999999999999988e-162Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in l around inf 7.2%
*-commutative7.2%
associate--l+7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
Simplified7.3%
Taylor expanded in x around inf 57.3%
associate-*r/57.3%
metadata-eval57.3%
+-commutative57.3%
associate-*r/57.3%
metadata-eval57.3%
unpow257.3%
associate-*r/57.3%
metadata-eval57.3%
Simplified57.3%
if 1.34999999999999992e45 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x -1.0) (+ x 1.0)))
(t_2
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0)))))
(if (<= t -1.65e+50)
(* t (* (sqrt t_1) (/ (- (sqrt 2.0)) (/ t (sqrt 0.5)))))
(if (<= t -4.5e-158)
t_2
(if (<= t 1.75e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 3.3e+44) t_2 (sqrt (* 2.0 (* 0.5 t_1)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (x + -1.0) / (x + 1.0);
double t_2 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double tmp;
if (t <= -1.65e+50) {
tmp = t * (sqrt(t_1) * (-sqrt(2.0) / (t / sqrt(0.5))));
} else if (t <= -4.5e-158) {
tmp = t_2;
} else if (t <= 1.75e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 3.3e+44) {
tmp = t_2;
} else {
tmp = sqrt((2.0 * (0.5 * t_1)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(x + -1.0) / Float64(x + 1.0)) t_2 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) tmp = 0.0 if (t <= -1.65e+50) tmp = Float64(t * Float64(sqrt(t_1) * Float64(Float64(-sqrt(2.0)) / Float64(t / sqrt(0.5))))); elseif (t <= -4.5e-158) tmp = t_2; elseif (t <= 1.75e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 3.3e+44) tmp = t_2; else tmp = sqrt(Float64(2.0 * Float64(0.5 * t_1))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+50], N[(t * N[(N[Sqrt[t$95$1], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / N[(t / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$2, If[LessEqual[t, 1.75e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+44], t$95$2, N[Sqrt[N[(2.0 * N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{x + -1}{x + 1}\\
t_2 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \left(\sqrt{t_1} \cdot \frac{-\sqrt{2}}{\frac{t}{\sqrt{0.5}}}\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot t_1\right)}\\
\end{array}
\end{array}
if t < -1.65e50Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
Taylor expanded in t around -inf 91.5%
mul-1-neg91.5%
*-commutative91.5%
distribute-rgt-neg-in91.5%
sub-neg91.5%
metadata-eval91.5%
+-commutative91.5%
+-commutative91.5%
associate-/l*91.9%
Simplified91.9%
if -1.65e50 < t < -4.5e-158 or 1.74999999999999995e-162 < t < 3.30000000000000013e44Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
*-commutative56.4%
clear-num56.2%
un-div-inv56.1%
sqrt-undiv56.5%
metadata-eval56.5%
sub-neg56.5%
associate-*l/54.3%
sub-neg54.3%
metadata-eval54.3%
Applied egg-rr54.3%
+-commutative54.3%
*-commutative54.3%
+-commutative54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in x around inf 90.2%
unpow290.2%
+-commutative90.2%
distribute-lft-out90.2%
unpow290.2%
unpow290.2%
associate-*l/90.2%
distribute-rgt-out90.2%
associate-*r/90.2%
mul-1-neg90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
fma-udef90.2%
Simplified90.2%
if -4.5e-158 < t < 1.74999999999999995e-162Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around -inf 48.4%
associate--l+48.4%
unpow248.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in l around inf 57.2%
*-commutative57.2%
associate-*r/57.2%
metadata-eval57.2%
unpow257.2%
associate-*r/57.2%
metadata-eval57.2%
Simplified57.2%
if 3.30000000000000013e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0)))))
(if (<= t -1.65e+50)
(*
t
(/ (sqrt 2.0) (* (* t (sqrt 2.0)) (- (sqrt (/ (+ x 1.0) (+ x -1.0)))))))
(if (<= t -4.5e-158)
t_1
(if (<= t 1.28e-163)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 1e+45)
t_1
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double tmp;
if (t <= -1.65e+50) {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * -sqrt(((x + 1.0) / (x + -1.0)))));
} else if (t <= -4.5e-158) {
tmp = t_1;
} else if (t <= 1.28e-163) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 1e+45) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) tmp = 0.0 if (t <= -1.65e+50) tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))))); elseif (t <= -4.5e-158) tmp = t_1; elseif (t <= 1.28e-163) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 1e+45) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+50], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$1, If[LessEqual[t, 1.28e-163], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+45], t$95$1, N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.28 \cdot 10^{-163}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -1.65e50Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
*-commutative92.5%
distribute-rgt-neg-in92.5%
+-commutative92.5%
sub-neg92.5%
metadata-eval92.5%
+-commutative92.5%
distribute-rgt-neg-out92.5%
Simplified92.5%
if -1.65e50 < t < -4.5e-158 or 1.28e-163 < t < 9.9999999999999993e44Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
*-commutative56.4%
clear-num56.2%
un-div-inv56.1%
sqrt-undiv56.5%
metadata-eval56.5%
sub-neg56.5%
associate-*l/54.3%
sub-neg54.3%
metadata-eval54.3%
Applied egg-rr54.3%
+-commutative54.3%
*-commutative54.3%
+-commutative54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in x around inf 90.2%
unpow290.2%
+-commutative90.2%
distribute-lft-out90.2%
unpow290.2%
unpow290.2%
associate-*l/90.2%
distribute-rgt-out90.2%
associate-*r/90.2%
mul-1-neg90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
fma-udef90.2%
Simplified90.2%
if -4.5e-158 < t < 1.28e-163Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around -inf 48.4%
associate--l+48.4%
unpow248.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in l around inf 57.2%
*-commutative57.2%
associate-*r/57.2%
metadata-eval57.2%
unpow257.2%
associate-*r/57.2%
metadata-eval57.2%
Simplified57.2%
if 9.9999999999999993e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0)))))
(if (<= t -7.3e+49)
(/
(sqrt 2.0)
(/ (* (* t (sqrt 2.0)) (- (sqrt (/ (+ x 1.0) (+ x -1.0))))) t))
(if (<= t -4.5e-158)
t_1
(if (<= t 1.55e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 2.5e+44)
t_1
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double tmp;
if (t <= -7.3e+49) {
tmp = sqrt(2.0) / (((t * sqrt(2.0)) * -sqrt(((x + 1.0) / (x + -1.0)))) / t);
} else if (t <= -4.5e-158) {
tmp = t_1;
} else if (t <= 1.55e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 2.5e+44) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) tmp = 0.0 if (t <= -7.3e+49) tmp = Float64(sqrt(2.0) / Float64(Float64(Float64(t * sqrt(2.0)) * Float64(-sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))) / t)); elseif (t <= -4.5e-158) tmp = t_1; elseif (t <= 1.55e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 2.5e+44) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.3e+49], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$1, If[LessEqual[t, 1.55e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+44], t$95$1, N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -7.3 \cdot 10^{+49}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\left(t \cdot \sqrt{2}\right) \cdot \left(-\sqrt{\frac{x + 1}{x + -1}}\right)}{t}}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -7.30000000000000014e49Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
associate-/r/27.1%
fma-neg27.1%
metadata-eval27.1%
sub-neg27.1%
fma-udef27.1%
+-commutative27.1%
fma-neg27.1%
Applied egg-rr12.2%
Taylor expanded in t around -inf 92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
*-commutative92.9%
+-commutative92.9%
Simplified92.9%
if -7.30000000000000014e49 < t < -4.5e-158 or 1.5499999999999999e-162 < t < 2.4999999999999998e44Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
*-commutative56.4%
clear-num56.2%
un-div-inv56.1%
sqrt-undiv56.5%
metadata-eval56.5%
sub-neg56.5%
associate-*l/54.3%
sub-neg54.3%
metadata-eval54.3%
Applied egg-rr54.3%
+-commutative54.3%
*-commutative54.3%
+-commutative54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in x around inf 90.2%
unpow290.2%
+-commutative90.2%
distribute-lft-out90.2%
unpow290.2%
unpow290.2%
associate-*l/90.2%
distribute-rgt-out90.2%
associate-*r/90.2%
mul-1-neg90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
fma-udef90.2%
Simplified90.2%
if -4.5e-158 < t < 1.5499999999999999e-162Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around -inf 48.4%
associate--l+48.4%
unpow248.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in l around inf 57.2%
*-commutative57.2%
associate-*r/57.2%
metadata-eval57.2%
unpow257.2%
associate-*r/57.2%
metadata-eval57.2%
Simplified57.2%
if 2.4999999999999998e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0))))
(t_2 (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -3.25e+50)
(* (sqrt 2.0) (* (sqrt t_2) (- (sqrt 0.5))))
(if (<= t -4.5e-158)
t_1
(if (<= t 1.95e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 6e+44) t_1 (sqrt (* 2.0 (* 0.5 t_2)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double t_2 = (x + -1.0) / (x + 1.0);
double tmp;
if (t <= -3.25e+50) {
tmp = sqrt(2.0) * (sqrt(t_2) * -sqrt(0.5));
} else if (t <= -4.5e-158) {
tmp = t_1;
} else if (t <= 1.95e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 6e+44) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (0.5 * t_2)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) t_2 = Float64(Float64(x + -1.0) / Float64(x + 1.0)) tmp = 0.0 if (t <= -3.25e+50) tmp = Float64(sqrt(2.0) * Float64(sqrt(t_2) * Float64(-sqrt(0.5)))); elseif (t <= -4.5e-158) tmp = t_1; elseif (t <= 1.95e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 6e+44) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(0.5 * t_2))); 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[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e+50], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[t$95$2], $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$1, If[LessEqual[t, 1.95e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+44], t$95$1, N[Sqrt[N[(2.0 * N[(0.5 * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
t_2 := \frac{x + -1}{x + 1}\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{t_2} \cdot \left(-\sqrt{0.5}\right)\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot t_2\right)}\\
\end{array}
\end{array}
if t < -3.2500000000000001e50Initial program 27.0%
associate-*l/27.1%
Simplified27.1%
Taylor expanded in t around -inf 91.5%
mul-1-neg91.5%
associate-*l*91.5%
sub-neg91.5%
metadata-eval91.5%
+-commutative91.5%
+-commutative91.5%
Simplified91.5%
if -3.2500000000000001e50 < t < -4.5e-158 or 1.95e-162 < t < 5.99999999999999974e44Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
*-commutative56.4%
clear-num56.2%
un-div-inv56.1%
sqrt-undiv56.5%
metadata-eval56.5%
sub-neg56.5%
associate-*l/54.3%
sub-neg54.3%
metadata-eval54.3%
Applied egg-rr54.3%
+-commutative54.3%
*-commutative54.3%
+-commutative54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in x around inf 90.2%
unpow290.2%
+-commutative90.2%
distribute-lft-out90.2%
unpow290.2%
unpow290.2%
associate-*l/90.2%
distribute-rgt-out90.2%
associate-*r/90.2%
mul-1-neg90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
fma-udef90.2%
Simplified90.2%
if -4.5e-158 < t < 1.95e-162Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around -inf 48.4%
associate--l+48.4%
unpow248.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in l around inf 57.2%
*-commutative57.2%
associate-*r/57.2%
metadata-eval57.2%
unpow257.2%
associate-*r/57.2%
metadata-eval57.2%
Simplified57.2%
if 5.99999999999999974e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(+
(+ (/ (* l l) x) (* 2.0 (* t (+ t (/ t x)))))
(/ (fma 2.0 (* t t) (* l l)) x))
2.0)))))
(if (<= t -4.6e+119)
(/ (sqrt 2.0) (- (sqrt 2.0)))
(if (<= t -4.5e-158)
t_1
(if (<= t 2.9e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 6.6e+44)
t_1
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((((((l * l) / x) + (2.0 * (t * (t + (t / x))))) + (fma(2.0, (t * t), (l * l)) / x)) / 2.0));
double tmp;
if (t <= -4.6e+119) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= -4.5e-158) {
tmp = t_1;
} else if (t <= 2.9e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 6.6e+44) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / x) + Float64(2.0 * Float64(t * Float64(t + Float64(t / x))))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)) / 2.0))) tmp = 0.0 if (t <= -4.6e+119) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= -4.5e-158) tmp = t_1; elseif (t <= 2.9e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 6.6e+44) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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[(N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+119], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -4.5e-158], t$95$1, If[LessEqual[t, 2.9e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+44], t$95$1, N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\left(\frac{\ell \cdot \ell}{x} + 2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right)\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+119}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -4.6000000000000001e119Initial program 12.0%
associate-*l/12.0%
Simplified12.0%
associate-/r/12.0%
fma-neg12.0%
metadata-eval12.0%
sub-neg12.0%
fma-udef12.0%
+-commutative12.0%
fma-neg12.0%
Applied egg-rr4.4%
Taylor expanded in x around inf 11.4%
unpow211.4%
Simplified11.4%
Taylor expanded in t around -inf 93.0%
mul-1-neg93.0%
Simplified93.0%
if -4.6000000000000001e119 < t < -4.5e-158 or 2.9000000000000001e-162 < t < 6.60000000000000027e44Initial program 59.7%
associate-*l/59.9%
Simplified59.9%
*-commutative59.9%
clear-num59.7%
un-div-inv59.6%
sqrt-undiv60.0%
metadata-eval60.0%
sub-neg60.0%
associate-*l/52.4%
sub-neg52.4%
metadata-eval52.4%
Applied egg-rr52.4%
+-commutative52.4%
*-commutative52.4%
+-commutative52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in x around inf 89.2%
unpow289.2%
+-commutative89.2%
distribute-lft-out89.2%
unpow289.2%
unpow289.2%
associate-*l/89.2%
distribute-rgt-out89.2%
associate-*r/89.2%
mul-1-neg89.2%
+-commutative89.2%
unpow289.2%
unpow289.2%
fma-udef89.2%
Simplified89.2%
if -4.5e-158 < t < 2.9000000000000001e-162Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around -inf 48.4%
associate--l+48.4%
unpow248.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in l around inf 57.2%
*-commutative57.2%
associate-*r/57.2%
metadata-eval57.2%
unpow257.2%
associate-*r/57.2%
metadata-eval57.2%
Simplified57.2%
if 6.60000000000000027e44 < t Initial program 39.6%
associate-*l/39.8%
Simplified39.8%
Taylor expanded in t around inf 95.3%
associate-*l*95.4%
sub-neg95.4%
metadata-eval95.4%
+-commutative95.4%
+-commutative95.4%
Simplified95.4%
add-cbrt-cube96.7%
sqrt-unprod96.7%
+-commutative96.7%
sqrt-unprod96.7%
+-commutative96.7%
Applied egg-rr96.7%
associate-*l*96.7%
cube-unmult96.7%
metadata-eval96.7%
sub-neg96.7%
Simplified96.7%
*-un-lft-identity96.7%
rem-cbrt-cube95.4%
sqrt-unprod96.8%
sub-neg96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification86.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -5.5e-118)
(*
t
(/
(sqrt 2.0)
(* t (- (sqrt (+ (+ 2.0 (/ 2.0 x)) (+ (/ 2.0 x) (/ 4.0 (* x x)))))))))
(if (<= t 1.9e-161)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5.5e-118) {
tmp = t * (sqrt(2.0) / (t * -sqrt(((2.0 + (2.0 / x)) + ((2.0 / x) + (4.0 / (x * x)))))));
} else if (t <= 1.9e-161) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = sqrt((2.0 * (0.5 * ((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 <= (-5.5d-118)) then
tmp = t * (sqrt(2.0d0) / (t * -sqrt(((2.0d0 + (2.0d0 / x)) + ((2.0d0 / x) + (4.0d0 / (x * x)))))))
else if (t <= 1.9d-161) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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 <= -5.5e-118) {
tmp = t * (Math.sqrt(2.0) / (t * -Math.sqrt(((2.0 + (2.0 / x)) + ((2.0 / x) + (4.0 / (x * x)))))));
} else if (t <= 1.9e-161) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5.5e-118: tmp = t * (math.sqrt(2.0) / (t * -math.sqrt(((2.0 + (2.0 / x)) + ((2.0 / x) + (4.0 / (x * x))))))) elif t <= 1.9e-161: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5.5e-118) tmp = Float64(t * Float64(sqrt(2.0) / Float64(t * Float64(-sqrt(Float64(Float64(2.0 + Float64(2.0 / x)) + Float64(Float64(2.0 / x) + Float64(4.0 / Float64(x * x))))))))); elseif (t <= 1.9e-161) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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 <= -5.5e-118) tmp = t * (sqrt(2.0) / (t * -sqrt(((2.0 + (2.0 / x)) + ((2.0 / x) + (4.0 / (x * x))))))); elseif (t <= 1.9e-161) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); else tmp = sqrt((2.0 * (0.5 * ((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, -5.5e-118], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t * (-N[Sqrt[N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t \cdot \left(-\sqrt{\left(2 + \frac{2}{x}\right) + \left(\frac{2}{x} + \frac{4}{x \cdot x}\right)}\right)}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -5.5000000000000003e-118Initial program 40.8%
associate-*l/41.0%
Simplified41.0%
Taylor expanded in x around -inf 50.3%
associate--l+50.3%
unpow250.3%
sub-neg50.3%
Simplified50.3%
Taylor expanded in t around -inf 87.2%
mul-1-neg87.2%
*-commutative87.2%
distribute-rgt-neg-in87.2%
distribute-lft-in87.2%
metadata-eval87.2%
associate-*r/87.2%
metadata-eval87.2%
associate-*r/87.2%
metadata-eval87.2%
+-commutative87.2%
associate-*r/87.2%
metadata-eval87.2%
unpow287.2%
Simplified87.2%
if -5.5000000000000003e-118 < t < 1.9000000000000001e-161Initial program 7.2%
associate-*l/7.2%
Simplified7.2%
Taylor expanded in x around -inf 55.9%
associate--l+55.9%
unpow255.9%
sub-neg55.9%
Simplified55.9%
Taylor expanded in l around inf 50.7%
*-commutative50.7%
associate-*r/50.7%
metadata-eval50.7%
unpow250.7%
associate-*r/50.7%
metadata-eval50.7%
Simplified50.7%
if 1.9000000000000001e-161 < t Initial program 45.9%
associate-*l/46.1%
Simplified46.1%
Taylor expanded in t around inf 84.1%
associate-*l*84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
+-commutative84.1%
Simplified84.1%
add-cbrt-cube85.3%
sqrt-unprod85.3%
+-commutative85.3%
sqrt-unprod85.4%
+-commutative85.4%
Applied egg-rr85.4%
associate-*l*85.4%
cube-unmult85.4%
metadata-eval85.4%
sub-neg85.4%
Simplified85.4%
*-un-lft-identity85.4%
rem-cbrt-cube84.1%
sqrt-unprod85.4%
sub-neg85.4%
metadata-eval85.4%
Applied egg-rr85.4%
Final simplification78.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.75e-118)
(/ (sqrt 2.0) (- (sqrt 2.0)))
(if (<= t 3.4e-163)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.75e-118) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= 3.4e-163) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = sqrt((2.0 * (0.5 * ((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.75d-118)) then
tmp = sqrt(2.0d0) / -sqrt(2.0d0)
else if (t <= 3.4d-163) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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.75e-118) {
tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
} else if (t <= 3.4e-163) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.75e-118: tmp = math.sqrt(2.0) / -math.sqrt(2.0) elif t <= 3.4e-163: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.75e-118) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= 3.4e-163) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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.75e-118) tmp = sqrt(2.0) / -sqrt(2.0); elseif (t <= 3.4e-163) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); else tmp = sqrt((2.0 * (0.5 * ((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.75e-118], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 3.4e-163], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{-118}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-163}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -1.75e-118Initial program 40.8%
associate-*l/41.0%
Simplified41.0%
associate-/r/40.9%
fma-neg40.9%
metadata-eval40.9%
sub-neg40.9%
fma-udef40.9%
+-commutative40.9%
fma-neg40.9%
Applied egg-rr30.6%
Taylor expanded in x around inf 46.6%
unpow246.6%
Simplified46.6%
Taylor expanded in t around -inf 86.8%
mul-1-neg86.8%
Simplified86.8%
if -1.75e-118 < t < 3.40000000000000014e-163Initial program 7.2%
associate-*l/7.2%
Simplified7.2%
Taylor expanded in x around -inf 55.9%
associate--l+55.9%
unpow255.9%
sub-neg55.9%
Simplified55.9%
Taylor expanded in l around inf 50.7%
*-commutative50.7%
associate-*r/50.7%
metadata-eval50.7%
unpow250.7%
associate-*r/50.7%
metadata-eval50.7%
Simplified50.7%
if 3.40000000000000014e-163 < t Initial program 45.9%
associate-*l/46.1%
Simplified46.1%
Taylor expanded in t around inf 84.1%
associate-*l*84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
+-commutative84.1%
Simplified84.1%
add-cbrt-cube85.3%
sqrt-unprod85.3%
+-commutative85.3%
sqrt-unprod85.4%
+-commutative85.4%
Applied egg-rr85.4%
associate-*l*85.4%
cube-unmult85.4%
metadata-eval85.4%
sub-neg85.4%
Simplified85.4%
*-un-lft-identity85.4%
rem-cbrt-cube84.1%
sqrt-unprod85.4%
sub-neg85.4%
metadata-eval85.4%
Applied egg-rr85.4%
Final simplification78.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.7e-118)
(/ (sqrt 2.0) (- (sqrt 2.0)))
(if (<= t 7.5e-155)
(* t (/ (sqrt 2.0) (* l (sqrt (/ 2.0 x)))))
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.7e-118) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else if (t <= 7.5e-155) {
tmp = t * (sqrt(2.0) / (l * sqrt((2.0 / x))));
} else {
tmp = sqrt((2.0 * (0.5 * ((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.7d-118)) then
tmp = sqrt(2.0d0) / -sqrt(2.0d0)
else if (t <= 7.5d-155) then
tmp = t * (sqrt(2.0d0) / (l * sqrt((2.0d0 / x))))
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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.7e-118) {
tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
} else if (t <= 7.5e-155) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt((2.0 / x))));
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.7e-118: tmp = math.sqrt(2.0) / -math.sqrt(2.0) elif t <= 7.5e-155: tmp = t * (math.sqrt(2.0) / (l * math.sqrt((2.0 / x)))) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.7e-118) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); elseif (t <= 7.5e-155) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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.7e-118) tmp = sqrt(2.0) / -sqrt(2.0); elseif (t <= 7.5e-155) tmp = t * (sqrt(2.0) / (l * sqrt((2.0 / x)))); else tmp = sqrt((2.0 * (0.5 * ((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.7e-118], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, 7.5e-155], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-118}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -2.69999999999999994e-118Initial program 40.8%
associate-*l/41.0%
Simplified41.0%
associate-/r/40.9%
fma-neg40.9%
metadata-eval40.9%
sub-neg40.9%
fma-udef40.9%
+-commutative40.9%
fma-neg40.9%
Applied egg-rr30.6%
Taylor expanded in x around inf 46.6%
unpow246.6%
Simplified46.6%
Taylor expanded in t around -inf 86.8%
mul-1-neg86.8%
Simplified86.8%
if -2.69999999999999994e-118 < t < 7.5000000000000006e-155Initial program 7.2%
associate-*l/7.2%
Simplified7.2%
Taylor expanded in l around inf 6.1%
*-commutative6.1%
associate--l+6.2%
sub-neg6.2%
metadata-eval6.2%
+-commutative6.2%
sub-neg6.2%
metadata-eval6.2%
+-commutative6.2%
Simplified6.2%
Taylor expanded in x around inf 49.5%
if 7.5000000000000006e-155 < t Initial program 45.9%
associate-*l/46.1%
Simplified46.1%
Taylor expanded in t around inf 84.1%
associate-*l*84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
+-commutative84.1%
Simplified84.1%
add-cbrt-cube85.3%
sqrt-unprod85.3%
+-commutative85.3%
sqrt-unprod85.4%
+-commutative85.4%
Applied egg-rr85.4%
associate-*l*85.4%
cube-unmult85.4%
metadata-eval85.4%
sub-neg85.4%
Simplified85.4%
*-un-lft-identity85.4%
rem-cbrt-cube84.1%
sqrt-unprod85.4%
sub-neg85.4%
metadata-eval85.4%
Applied egg-rr85.4%
Final simplification78.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (* (sqrt 2.0) (- (sqrt 0.5))) (sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = sqrt(2.0) * -sqrt(0.5);
} else {
tmp = sqrt((2.0 * (0.5 * ((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 <= (-5d-310)) then
tmp = sqrt(2.0d0) * -sqrt(0.5d0)
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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 <= -5e-310) {
tmp = Math.sqrt(2.0) * -Math.sqrt(0.5);
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = math.sqrt(2.0) * -math.sqrt(0.5) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(sqrt(2.0) * Float64(-sqrt(0.5))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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 <= -5e-310) tmp = sqrt(2.0) * -sqrt(0.5); else tmp = sqrt((2.0 * (0.5 * ((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, -5e-310], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[0.5], $MachinePrecision])), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around inf 1.7%
associate-*l*1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt74.1%
mul-1-neg74.1%
Simplified74.1%
if -4.999999999999985e-310 < t Initial program 35.2%
associate-*l/35.4%
Simplified35.4%
Taylor expanded in t around inf 69.0%
associate-*l*69.1%
sub-neg69.1%
metadata-eval69.1%
+-commutative69.1%
+-commutative69.1%
Simplified69.1%
add-cbrt-cube70.0%
sqrt-unprod70.0%
+-commutative70.0%
sqrt-unprod70.0%
+-commutative70.0%
Applied egg-rr70.0%
associate-*l*70.0%
cube-unmult70.0%
metadata-eval70.0%
sub-neg70.0%
Simplified70.0%
*-un-lft-identity70.0%
rem-cbrt-cube69.1%
sqrt-unprod70.1%
sub-neg70.1%
metadata-eval70.1%
Applied egg-rr70.1%
Final simplification72.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (/ (sqrt 2.0) (- (sqrt 2.0))) (sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = sqrt(2.0) / -sqrt(2.0);
} else {
tmp = sqrt((2.0 * (0.5 * ((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 <= (-5d-310)) then
tmp = sqrt(2.0d0) / -sqrt(2.0d0)
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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 <= -5e-310) {
tmp = Math.sqrt(2.0) / -Math.sqrt(2.0);
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = math.sqrt(2.0) / -math.sqrt(2.0) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(sqrt(2.0) / Float64(-sqrt(2.0))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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 <= -5e-310) tmp = sqrt(2.0) / -sqrt(2.0); else tmp = sqrt((2.0 * (0.5 * ((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, -5e-310], N[(N[Sqrt[2.0], $MachinePrecision] / (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{2}}{-\sqrt{2}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
associate-/r/35.8%
fma-neg35.8%
metadata-eval35.8%
sub-neg35.8%
fma-udef35.8%
+-commutative35.8%
fma-neg35.8%
Applied egg-rr27.5%
Taylor expanded in x around inf 41.5%
unpow241.5%
Simplified41.5%
Taylor expanded in t around -inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if -4.999999999999985e-310 < t Initial program 35.2%
associate-*l/35.4%
Simplified35.4%
Taylor expanded in t around inf 69.0%
associate-*l*69.1%
sub-neg69.1%
metadata-eval69.1%
+-commutative69.1%
+-commutative69.1%
Simplified69.1%
add-cbrt-cube70.0%
sqrt-unprod70.0%
+-commutative70.0%
sqrt-unprod70.0%
+-commutative70.0%
Applied egg-rr70.0%
associate-*l*70.0%
cube-unmult70.0%
metadata-eval70.0%
sub-neg70.0%
Simplified70.0%
*-un-lft-identity70.0%
rem-cbrt-cube69.1%
sqrt-unprod70.1%
sub-neg70.1%
metadata-eval70.1%
Applied egg-rr70.1%
Final simplification72.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -7e-48)
(/ t (sqrt (/ (* 2.0 (/ (+ x 1.0) (/ (+ x -1.0) (* t t)))) 2.0)))
(if (<= t -4.5e-158)
(/
t
(sqrt (/ (- (/ (* (* t t) (+ 2.0 (* 2.0 x))) (+ x -1.0)) (* l l)) 2.0)))
(sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -7e-48) {
tmp = t / sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0));
} else if (t <= -4.5e-158) {
tmp = t / sqrt((((((t * t) * (2.0 + (2.0 * x))) / (x + -1.0)) - (l * l)) / 2.0));
} else {
tmp = sqrt((2.0 * (0.5 * ((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 <= (-7d-48)) then
tmp = t / sqrt(((2.0d0 * ((x + 1.0d0) / ((x + (-1.0d0)) / (t * t)))) / 2.0d0))
else if (t <= (-4.5d-158)) then
tmp = t / sqrt((((((t * t) * (2.0d0 + (2.0d0 * x))) / (x + (-1.0d0))) - (l * l)) / 2.0d0))
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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 <= -7e-48) {
tmp = t / Math.sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0));
} else if (t <= -4.5e-158) {
tmp = t / Math.sqrt((((((t * t) * (2.0 + (2.0 * x))) / (x + -1.0)) - (l * l)) / 2.0));
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -7e-48: tmp = t / math.sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0)) elif t <= -4.5e-158: tmp = t / math.sqrt((((((t * t) * (2.0 + (2.0 * x))) / (x + -1.0)) - (l * l)) / 2.0)) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -7e-48) tmp = Float64(t / sqrt(Float64(Float64(2.0 * Float64(Float64(x + 1.0) / Float64(Float64(x + -1.0) / Float64(t * t)))) / 2.0))); elseif (t <= -4.5e-158) tmp = Float64(t / sqrt(Float64(Float64(Float64(Float64(Float64(t * t) * Float64(2.0 + Float64(2.0 * x))) / Float64(x + -1.0)) - Float64(l * l)) / 2.0))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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 <= -7e-48) tmp = t / sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0)); elseif (t <= -4.5e-158) tmp = t / sqrt((((((t * t) * (2.0 + (2.0 * x))) / (x + -1.0)) - (l * l)) / 2.0)); else tmp = sqrt((2.0 * (0.5 * ((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, -7e-48], N[(t / N[Sqrt[N[(N[(2.0 * N[(N[(x + 1.0), $MachinePrecision] / N[(N[(x + -1.0), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-158], N[(t / N[Sqrt[N[(N[(N[(N[(N[(t * t), $MachinePrecision] * N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-48}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{2 \cdot \frac{x + 1}{\frac{x + -1}{t \cdot t}}}{2}}}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-158}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\frac{\left(t \cdot t\right) \cdot \left(2 + 2 \cdot x\right)}{x + -1} - \ell \cdot \ell}{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -6.99999999999999982e-48Initial program 35.6%
associate-*l/35.7%
Simplified35.7%
*-commutative35.7%
clear-num35.6%
un-div-inv35.6%
sqrt-undiv35.8%
metadata-eval35.8%
sub-neg35.8%
associate-*l/23.7%
sub-neg23.7%
metadata-eval23.7%
Applied egg-rr23.7%
+-commutative23.7%
*-commutative23.7%
+-commutative23.7%
+-commutative23.7%
Simplified23.7%
Taylor expanded in t around inf 29.4%
associate-/l*42.6%
+-commutative42.6%
sub-neg42.6%
metadata-eval42.6%
unpow242.6%
Simplified42.6%
if -6.99999999999999982e-48 < t < -4.5e-158Initial program 55.8%
associate-*l/56.0%
Simplified56.0%
*-commutative56.0%
clear-num55.8%
un-div-inv55.8%
sqrt-undiv56.2%
metadata-eval56.2%
sub-neg56.2%
associate-*l/56.4%
sub-neg56.4%
metadata-eval56.4%
Applied egg-rr56.4%
+-commutative56.4%
*-commutative56.4%
+-commutative56.4%
+-commutative56.4%
Simplified56.4%
Taylor expanded in t around inf 52.0%
associate-*r*52.0%
distribute-lft-in52.0%
metadata-eval52.0%
unpow252.0%
Simplified52.0%
if -4.5e-158 < t Initial program 31.9%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around inf 62.5%
associate-*l*62.5%
sub-neg62.5%
metadata-eval62.5%
+-commutative62.5%
+-commutative62.5%
Simplified62.5%
add-cbrt-cube63.4%
sqrt-unprod63.4%
+-commutative63.4%
sqrt-unprod63.4%
+-commutative63.4%
Applied egg-rr63.4%
associate-*l*63.4%
cube-unmult63.4%
metadata-eval63.4%
sub-neg63.4%
Simplified63.4%
*-un-lft-identity63.4%
rem-cbrt-cube62.5%
sqrt-unprod63.4%
sub-neg63.4%
metadata-eval63.4%
Applied egg-rr63.4%
Final simplification55.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5.2e-160) (/ t (sqrt (/ (* 2.0 (/ (+ x 1.0) (/ (+ x -1.0) (* t t)))) 2.0))) (sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0)))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5.2e-160) {
tmp = t / sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0));
} else {
tmp = sqrt((2.0 * (0.5 * ((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 <= (-5.2d-160)) then
tmp = t / sqrt(((2.0d0 * ((x + 1.0d0) / ((x + (-1.0d0)) / (t * t)))) / 2.0d0))
else
tmp = sqrt((2.0d0 * (0.5d0 * ((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 <= -5.2e-160) {
tmp = t / Math.sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0));
} else {
tmp = Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5.2e-160: tmp = t / math.sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0)) else: tmp = math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5.2e-160) tmp = Float64(t / sqrt(Float64(Float64(2.0 * Float64(Float64(x + 1.0) / Float64(Float64(x + -1.0) / Float64(t * t)))) / 2.0))); else tmp = sqrt(Float64(2.0 * Float64(0.5 * 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 <= -5.2e-160) tmp = t / sqrt(((2.0 * ((x + 1.0) / ((x + -1.0) / (t * t)))) / 2.0)); else tmp = sqrt((2.0 * (0.5 * ((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, -5.2e-160], N[(t / N[Sqrt[N[(N[(2.0 * N[(N[(x + 1.0), $MachinePrecision] / N[(N[(x + -1.0), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-160}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{2 \cdot \frac{x + 1}{\frac{x + -1}{t \cdot t}}}{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}\\
\end{array}
\end{array}
if t < -5.20000000000000007e-160Initial program 39.7%
associate-*l/39.8%
Simplified39.8%
*-commutative39.8%
clear-num39.7%
un-div-inv39.7%
sqrt-undiv39.9%
metadata-eval39.9%
sub-neg39.9%
associate-*l/30.6%
sub-neg30.6%
metadata-eval30.6%
Applied egg-rr30.6%
+-commutative30.6%
*-commutative30.6%
+-commutative30.6%
+-commutative30.6%
Simplified30.6%
Taylor expanded in t around inf 37.5%
associate-/l*37.1%
+-commutative37.1%
sub-neg37.1%
metadata-eval37.1%
unpow237.1%
Simplified37.1%
if -5.20000000000000007e-160 < t Initial program 32.1%
associate-*l/32.3%
Simplified32.3%
Taylor expanded in t around inf 62.9%
associate-*l*62.9%
sub-neg62.9%
metadata-eval62.9%
+-commutative62.9%
+-commutative62.9%
Simplified62.9%
add-cbrt-cube63.8%
sqrt-unprod63.8%
+-commutative63.8%
sqrt-unprod63.8%
+-commutative63.8%
Applied egg-rr63.8%
associate-*l*63.8%
cube-unmult63.8%
metadata-eval63.8%
sub-neg63.8%
Simplified63.8%
*-un-lft-identity63.8%
rem-cbrt-cube62.9%
sqrt-unprod63.8%
sub-neg63.8%
metadata-eval63.8%
Applied egg-rr63.8%
Final simplification51.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (sqrt (* 2.0 (* 0.5 (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
return sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 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 = sqrt((2.0d0 * (0.5d0 * ((x + (-1.0d0)) / (x + 1.0d0)))))
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return Math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))));
}
l = abs(l) def code(x, l, t): return math.sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0)))))
l = abs(l) function code(x, l, t) return sqrt(Float64(2.0 * Float64(0.5 * Float64(Float64(x + -1.0) / Float64(x + 1.0))))) end
l = abs(l) function tmp = code(x, l, t) tmp = sqrt((2.0 * (0.5 * ((x + -1.0) / (x + 1.0))))); end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[Sqrt[N[(2.0 * N[(0.5 * N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(0.5 \cdot \frac{x + -1}{x + 1}\right)}
\end{array}
Initial program 35.5%
associate-*l/35.7%
Simplified35.7%
Taylor expanded in t around inf 35.4%
associate-*l*35.4%
sub-neg35.4%
metadata-eval35.4%
+-commutative35.4%
+-commutative35.4%
Simplified35.4%
add-cbrt-cube35.9%
sqrt-unprod35.9%
+-commutative35.9%
sqrt-unprod35.9%
+-commutative35.9%
Applied egg-rr35.9%
associate-*l*35.9%
cube-unmult35.9%
metadata-eval35.9%
sub-neg35.9%
Simplified35.9%
*-un-lft-identity35.9%
rem-cbrt-cube35.4%
sqrt-unprod35.9%
sub-neg35.9%
metadata-eval35.9%
Applied egg-rr35.9%
Final simplification35.9%
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 35.5%
associate-*l/35.7%
Simplified35.7%
Taylor expanded in x around inf 35.3%
Taylor expanded in t around 0 35.5%
Final simplification35.5%
herbie shell --seed 2023263
(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)))))