
(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 17 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 (+ (/ 2.0 x) (+ 2.0 (/ 2.0 x))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (/ (* l l) x))
(t_4
(*
t
(/
(sqrt 2.0)
(sqrt
(+
t_3
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma 2.0 (* t t) (* l l)) x))))))))
(if (<= t -1.45e-31)
(- t_2)
(if (<= t -1.7e-262)
t_4
(if (<= t -1.45e-305)
(*
(sqrt 2.0)
(/
t
(-
(* (* -0.5 (/ (+ t_3 t_3) t)) (sqrt (/ 1.0 t_1)))
(* t (sqrt t_1)))))
(if (<= t 8.5e-193)
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))
(if (<= t 1.35e-155) 1.0 (if (<= t 0.00192) t_4 t_2))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (2.0 / x) + (2.0 + (2.0 / x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = (l * l) / x;
double t_4 = t * (sqrt(2.0) / sqrt((t_3 + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(2.0, (t * t), (l * l)) / x)))));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_2;
} else if (t <= -1.7e-262) {
tmp = t_4;
} else if (t <= -1.45e-305) {
tmp = sqrt(2.0) * (t / (((-0.5 * ((t_3 + t_3) / t)) * sqrt((1.0 / t_1))) - (t * sqrt(t_1))));
} else if (t <= 8.5e-193) {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.00192) {
tmp = t_4;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(2.0 / x) + Float64(2.0 + Float64(2.0 / x))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(Float64(l * l) / x) t_4 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))) tmp = 0.0 if (t <= -1.45e-31) tmp = Float64(-t_2); elseif (t <= -1.7e-262) tmp = t_4; elseif (t <= -1.45e-305) tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(Float64(-0.5 * Float64(Float64(t_3 + t_3) / t)) * sqrt(Float64(1.0 / t_1))) - Float64(t * sqrt(t_1))))); elseif (t <= 8.5e-193) tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.00192) tmp = t_4; else tmp = t_2; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-31], (-t$95$2), If[LessEqual[t, -1.7e-262], t$95$4, If[LessEqual[t, -1.45e-305], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[(-0.5 * N[(N[(t$95$3 + t$95$3), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-193], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.00192], t$95$4, t$95$2]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{2}{x} + \left(2 + \frac{2}{x}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
t_4 := t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-262}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(-0.5 \cdot \frac{t_3 + t_3}{t}\right) \cdot \sqrt{\frac{1}{t_1}} - t \cdot \sqrt{t_1}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-193}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.00192:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.45e-31Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.45e-31 < t < -1.69999999999999995e-262 or 1.34999999999999991e-155 < t < 0.00192000000000000005Initial program 43.5%
associate-*l/43.5%
Simplified43.5%
Taylor expanded in x around inf 77.5%
associate--l+77.5%
unpow277.5%
distribute-lft-out77.5%
unpow277.5%
unpow277.5%
associate-*r/77.5%
mul-1-neg77.5%
unpow277.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
if -1.69999999999999995e-262 < t < -1.44999999999999994e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Taylor expanded in x around inf 12.7%
associate--l+12.7%
unpow212.7%
distribute-lft-out12.7%
unpow212.7%
unpow212.7%
associate-*r/12.7%
mul-1-neg12.7%
unpow212.7%
+-commutative12.7%
unpow212.7%
fma-udef12.7%
Simplified12.7%
Taylor expanded in t around -inf 76.6%
mul-1-neg76.6%
*-commutative76.6%
unsub-neg76.6%
Simplified76.6%
if -1.44999999999999994e-305 < t < 8.50000000000000004e-193Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in l around inf 55.5%
if 8.50000000000000004e-193 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 0.00192000000000000005 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification85.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (fma 2.0 (* t t) (* l l)))
(t_3
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(fma
2.0
(/ (* t t) (pow x 3.0))
(+
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (* l l) (pow x 3.0)))
(/ (+ t_2 t_2) (* x x))))
(+ (/ t_2 (pow x 3.0)) (/ t_2 x))))))))
(t_4 (/ (+ x 1.0) (+ x -1.0)))
(t_5 (/ t_1 (sqrt (- (* t_4 (+ (* l l) (* 2.0 (* t t)))) (* l l))))))
(if (<= t_5 -1e-299)
t_3
(if (<= t_5 0.0)
(/ t_1 (hypot (* t_1 (sqrt t_4)) l))
(if (<= t_5 INFINITY)
t_3
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = fma(2.0, (t * t), (l * l));
double t_3 = t * (sqrt(2.0) / sqrt((((l * l) / x) + (fma(2.0, ((t * t) / pow(x, 3.0)), (((2.0 * ((t * t) + ((t * t) / x))) + ((l * l) / pow(x, 3.0))) + ((t_2 + t_2) / (x * x)))) + ((t_2 / pow(x, 3.0)) + (t_2 / x))))));
double t_4 = (x + 1.0) / (x + -1.0);
double t_5 = t_1 / sqrt(((t_4 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double tmp;
if (t_5 <= -1e-299) {
tmp = t_3;
} else if (t_5 <= 0.0) {
tmp = t_1 / hypot((t_1 * sqrt(t_4)), l);
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = fma(2.0, Float64(t * t), Float64(l * l)) t_3 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(fma(2.0, Float64(Float64(t * t) / (x ^ 3.0)), Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(l * l) / (x ^ 3.0))) + Float64(Float64(t_2 + t_2) / Float64(x * x)))) + Float64(Float64(t_2 / (x ^ 3.0)) + Float64(t_2 / x))))))) t_4 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_5 = Float64(t_1 / sqrt(Float64(Float64(t_4 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) tmp = 0.0 if (t_5 <= -1e-299) tmp = t_3; elseif (t_5 <= 0.0) tmp = Float64(t_1 / hypot(Float64(t_1 * sqrt(t_4)), l)); elseif (t_5 <= Inf) tmp = t_3; else tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 + t$95$2), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$4 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -1e-299], t$95$3, If[LessEqual[t$95$5, 0.0], N[(t$95$1 / N[Sqrt[N[(t$95$1 * N[Sqrt[t$95$4], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$3, N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_3 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\ell \cdot \ell}{{x}^{3}}\right) + \frac{t_2 + t_2}{x \cdot x}\right) + \left(\frac{t_2}{{x}^{3}} + \frac{t_2}{x}\right)\right)}}\\
t_4 := \frac{x + 1}{x + -1}\\
t_5 := \frac{t_1}{\sqrt{t_4 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_5 \leq -1 \cdot 10^{-299}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(t_1 \cdot \sqrt{t_4}, \ell\right)}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -9.99999999999999992e-300 or -0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 57.2%
associate-*l/57.3%
Simplified57.3%
Taylor expanded in x around -inf 83.7%
Simplified83.7%
if -9.99999999999999992e-300 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.0Initial program 3.1%
associate-*r/3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
+-commutative3.1%
fma-def3.1%
Simplified3.1%
Applied egg-rr100.0%
Taylor expanded in l around 0 100.0%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*r/0.0%
fma-neg0.0%
remove-double-neg0.0%
fma-neg0.0%
sub-neg0.0%
metadata-eval0.0%
remove-double-neg0.0%
+-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in x around inf 18.2%
associate--l+18.2%
unpow218.2%
distribute-lft-out18.2%
unpow218.2%
unpow218.2%
associate-*r/18.2%
mul-1-neg18.2%
unpow218.2%
+-commutative18.2%
unpow218.2%
fma-udef18.2%
Simplified18.2%
Taylor expanded in l around inf 42.9%
Final simplification80.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (/ (+ x 1.0) (+ x -1.0)))
(t_3 (/ t_1 (sqrt (- (* t_2 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_4 (fma 2.0 (* t t) (* l l)))
(t_5
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (+ t_4 t_4) (* x x)))
(/ t_4 x))))))))
(if (<= t_3 -1e-299)
t_5
(if (<= t_3 0.0)
(/ t_1 (hypot (* t_1 (sqrt t_2)) l))
(if (<= t_3 INFINITY)
t_5
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = (x + 1.0) / (x + -1.0);
double t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_4 = fma(2.0, (t * t), (l * l));
double t_5 = t * (sqrt(2.0) / sqrt((((l * l) / x) + (((2.0 * ((t * t) + ((t * t) / x))) + ((t_4 + t_4) / (x * x))) + (t_4 / x)))));
double tmp;
if (t_3 <= -1e-299) {
tmp = t_5;
} else if (t_3 <= 0.0) {
tmp = t_1 / hypot((t_1 * sqrt(t_2)), l);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_3 = Float64(t_1 / sqrt(Float64(Float64(t_2 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_4 = fma(2.0, Float64(t * t), Float64(l * l)) t_5 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(t_4 + t_4) / Float64(x * x))) + Float64(t_4 / x)))))) tmp = 0.0 if (t_3 <= -1e-299) tmp = t_5; elseif (t_3 <= 0.0) tmp = Float64(t_1 / hypot(Float64(t_1 * sqrt(t_2)), l)); elseif (t_3 <= Inf) tmp = t_5; else tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 + t$95$4), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-299], t$95$5, If[LessEqual[t$95$3, 0.0], N[(t$95$1 / N[Sqrt[N[(t$95$1 * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$5, N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_4 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_5 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_4 + t_4}{x \cdot x}\right) + \frac{t_4}{x}\right)}}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-299}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(t_1 \cdot \sqrt{t_2}, \ell\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -9.99999999999999992e-300 or -0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 57.2%
associate-*l/57.3%
Simplified57.3%
Taylor expanded in x around -inf 83.4%
associate--l+83.4%
unpow283.4%
sub-neg83.4%
Simplified83.4%
if -9.99999999999999992e-300 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.0Initial program 3.1%
associate-*r/3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
+-commutative3.1%
fma-def3.1%
Simplified3.1%
Applied egg-rr100.0%
Taylor expanded in l around 0 100.0%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*r/0.0%
fma-neg0.0%
remove-double-neg0.0%
fma-neg0.0%
sub-neg0.0%
metadata-eval0.0%
remove-double-neg0.0%
+-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in x around inf 18.2%
associate--l+18.2%
unpow218.2%
distribute-lft-out18.2%
unpow218.2%
unpow218.2%
associate-*r/18.2%
mul-1-neg18.2%
unpow218.2%
+-commutative18.2%
unpow218.2%
fma-udef18.2%
Simplified18.2%
Taylor expanded in l around inf 42.9%
Final simplification80.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (/ (+ x 1.0) (+ x -1.0)))
(t_3 (/ t_1 (sqrt (- (* t_2 (+ (* l l) (* 2.0 (* t t)))) (* l l))))))
(if (<= t_3 -1e-299)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma 2.0 (* t t) (* l l)) x))))))
(if (<= t_3 2.0)
(/ t_1 (hypot (* t_1 (sqrt t_2)) l))
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = (x + 1.0) / (x + -1.0);
double t_3 = t_1 / sqrt(((t_2 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double tmp;
if (t_3 <= -1e-299) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(2.0, (t * t), (l * l)) / x)))));
} else if (t_3 <= 2.0) {
tmp = t_1 / hypot((t_1 * sqrt(t_2)), l);
} else {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_3 = Float64(t_1 / sqrt(Float64(Float64(t_2 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) tmp = 0.0 if (t_3 <= -1e-299) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); elseif (t_3 <= 2.0) tmp = Float64(t_1 / hypot(Float64(t_1 * sqrt(t_2)), l)); else tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$2 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-299], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(t$95$1 / N[Sqrt[N[(t$95$1 * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \frac{x + 1}{x + -1}\\
t_3 := \frac{t_1}{\sqrt{t_2 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-299}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(t_1 \cdot \sqrt{t_2}, \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -9.99999999999999992e-300Initial program 52.0%
associate-*l/52.2%
Simplified52.2%
Taylor expanded in x around inf 80.4%
associate--l+80.4%
unpow280.4%
distribute-lft-out80.4%
unpow280.4%
unpow280.4%
associate-*r/80.4%
mul-1-neg80.4%
unpow280.4%
+-commutative80.4%
unpow280.4%
fma-udef80.4%
Simplified80.4%
if -9.99999999999999992e-300 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 2Initial program 49.9%
associate-*r/49.8%
fma-neg49.8%
remove-double-neg49.8%
fma-neg49.8%
sub-neg49.8%
metadata-eval49.8%
remove-double-neg49.8%
+-commutative49.8%
fma-def49.8%
Simplified49.8%
Applied egg-rr98.3%
Taylor expanded in l around 0 98.3%
if 2 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 1.2%
associate-*r/1.2%
fma-neg1.2%
remove-double-neg1.2%
fma-neg1.2%
sub-neg1.2%
metadata-eval1.2%
remove-double-neg1.2%
+-commutative1.2%
fma-def1.2%
Simplified1.2%
Taylor expanded in x around inf 38.7%
associate--l+38.7%
unpow238.7%
distribute-lft-out38.7%
unpow238.7%
unpow238.7%
associate-*r/38.7%
mul-1-neg38.7%
unpow238.7%
+-commutative38.7%
unpow238.7%
fma-udef38.7%
Simplified38.7%
Taylor expanded in l around inf 36.6%
Final simplification75.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (/ (* l l) x)))
(if (<= t -1.12e-33)
(- t_2)
(if (<= t -2e-258)
(* (sqrt 2.0) (/ t (sqrt (+ t_3 (+ t_3 t_1)))))
(if (<= t -3.1e-305)
(+ (/ 1.0 x) -1.0)
(if (<= t 2e-196)
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))
(if (<= t 1.35e-155)
1.0
(if (<= t 0.0058)
(*
(sqrt 2.0)
(/ t (sqrt (+ t_3 (+ t_1 (/ (fma 2.0 (* t t) (* l l)) x))))))
t_2))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = (l * l) / x;
double tmp;
if (t <= -1.12e-33) {
tmp = -t_2;
} else if (t <= -2e-258) {
tmp = sqrt(2.0) * (t / sqrt((t_3 + (t_3 + t_1))));
} else if (t <= -3.1e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 2e-196) {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0058) {
tmp = sqrt(2.0) * (t / sqrt((t_3 + (t_1 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -1.12e-33) tmp = Float64(-t_2); elseif (t <= -2e-258) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_3 + Float64(t_3 + t_1))))); elseif (t <= -3.1e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 2e-196) tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0058) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_3 + Float64(t_1 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = t_2; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -1.12e-33], (-t$95$2), If[LessEqual[t, -2e-258], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$3 + N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 2e-196], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.0058], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$3 + N[(t$95$1 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{-33}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-258}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-196}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.0058:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.11999999999999999e-33Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.11999999999999999e-33 < t < -1.99999999999999991e-258Initial program 31.1%
associate-*r/31.1%
fma-neg31.1%
remove-double-neg31.1%
fma-neg31.1%
sub-neg31.1%
metadata-eval31.1%
remove-double-neg31.1%
+-commutative31.1%
fma-def31.1%
Simplified31.1%
Taylor expanded in x around inf 74.4%
associate--l+74.4%
unpow274.4%
distribute-lft-out74.4%
unpow274.4%
unpow274.4%
associate-*r/74.4%
mul-1-neg74.4%
unpow274.4%
+-commutative74.4%
unpow274.4%
fma-udef74.4%
Simplified74.4%
Taylor expanded in t around 0 74.4%
associate-*r/74.4%
mul-1-neg74.4%
unpow274.4%
distribute-rgt-neg-in74.4%
Simplified74.4%
if -1.99999999999999991e-258 < t < -3.0999999999999998e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if -3.0999999999999998e-305 < t < 2.0000000000000001e-196Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in l around inf 55.5%
if 2.0000000000000001e-196 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 1.34999999999999991e-155 < t < 0.0058Initial program 59.5%
associate-*r/59.4%
fma-neg59.3%
remove-double-neg59.3%
fma-neg59.4%
sub-neg59.4%
metadata-eval59.4%
remove-double-neg59.4%
+-commutative59.4%
fma-def59.4%
Simplified59.4%
Taylor expanded in x around inf 81.3%
associate--l+81.5%
unpow281.5%
distribute-lft-out81.5%
unpow281.5%
unpow281.5%
associate-*r/81.5%
mul-1-neg81.5%
unpow281.5%
+-commutative81.5%
unpow281.5%
fma-udef81.5%
Simplified81.3%
if 0.0058 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification85.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma 2.0 (* t t) (* l l)) x)))))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -1.45e-31)
(- t_2)
(if (<= t -4.3e-253)
t_1
(if (<= t -4e-305)
(+ (/ 1.0 x) -1.0)
(if (<= t 1.7e-191)
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))
(if (<= t 1.35e-155) 1.0 (if (<= t 0.0054) t_1 t_2))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(2.0, (t * t), (l * l)) / x)))));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_2;
} else if (t <= -4.3e-253) {
tmp = t_1;
} else if (t <= -4e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.7e-191) {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0054) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.45e-31) tmp = Float64(-t_2); elseif (t <= -4.3e-253) tmp = t_1; elseif (t <= -4e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 1.7e-191) tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0054) tmp = t_1; else tmp = 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[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.45e-31], (-t$95$2), If[LessEqual[t, -4.3e-253], t$95$1, If[LessEqual[t, -4e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.7e-191], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.0054], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-191}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.0054:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.45e-31Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.45e-31 < t < -4.3000000000000002e-253 or 1.34999999999999991e-155 < t < 0.0054000000000000003Initial program 43.5%
associate-*l/43.5%
Simplified43.5%
Taylor expanded in x around inf 77.5%
associate--l+77.5%
unpow277.5%
distribute-lft-out77.5%
unpow277.5%
unpow277.5%
associate-*r/77.5%
mul-1-neg77.5%
unpow277.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.5%
if -4.3000000000000002e-253 < t < -3.99999999999999999e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if -3.99999999999999999e-305 < t < 1.69999999999999997e-191Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in l around inf 55.5%
if 1.69999999999999997e-191 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 0.0054000000000000003 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification85.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
(sqrt 2.0)
(/ t (sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -1.4e-31)
(- t_1)
(if (<= t -4.7e-259)
t_3
(if (<= t -4e-305)
(+ (/ 1.0 x) -1.0)
(if (<= t 9.8e-191)
(* (sqrt 2.0) (/ t (* (sqrt 2.0) (* l (sqrt (/ 1.0 x))))))
(if (<= t 1.35e-155) 1.0 (if (<= t 0.0045) t_3 t_1))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.4e-31) {
tmp = -t_1;
} else if (t <= -4.7e-259) {
tmp = t_3;
} else if (t <= -4e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 9.8e-191) {
tmp = sqrt(2.0) * (t / (sqrt(2.0) * (l * sqrt((1.0 / x)))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0045) {
tmp = t_3;
} else {
tmp = t_1;
}
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) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
t_3 = sqrt(2.0d0) * (t / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
if (t <= (-1.4d-31)) then
tmp = -t_1
else if (t <= (-4.7d-259)) then
tmp = t_3
else if (t <= (-4d-305)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 9.8d-191) then
tmp = sqrt(2.0d0) * (t / (sqrt(2.0d0) * (l * sqrt((1.0d0 / x)))))
else if (t <= 1.35d-155) then
tmp = 1.0d0
else if (t <= 0.0045d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.4e-31) {
tmp = -t_1;
} else if (t <= -4.7e-259) {
tmp = t_3;
} else if (t <= -4e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 9.8e-191) {
tmp = Math.sqrt(2.0) * (t / (Math.sqrt(2.0) * (l * Math.sqrt((1.0 / x)))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0045) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x t_3 = math.sqrt(2.0) * (t / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) tmp = 0 if t <= -1.4e-31: tmp = -t_1 elif t <= -4.7e-259: tmp = t_3 elif t <= -4e-305: tmp = (1.0 / x) + -1.0 elif t <= 9.8e-191: tmp = math.sqrt(2.0) * (t / (math.sqrt(2.0) * (l * math.sqrt((1.0 / x))))) elif t <= 1.35e-155: tmp = 1.0 elif t <= 0.0045: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))) tmp = 0.0 if (t <= -1.4e-31) tmp = Float64(-t_1); elseif (t <= -4.7e-259) tmp = t_3; elseif (t <= -4e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 9.8e-191) tmp = Float64(sqrt(2.0) * Float64(t / Float64(sqrt(2.0) * Float64(l * sqrt(Float64(1.0 / x)))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0045) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); tmp = 0.0; if (t <= -1.4e-31) tmp = -t_1; elseif (t <= -4.7e-259) tmp = t_3; elseif (t <= -4e-305) tmp = (1.0 / x) + -1.0; elseif (t <= 9.8e-191) tmp = sqrt(2.0) * (t / (sqrt(2.0) * (l * sqrt((1.0 / x))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0045) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-31], (-t$95$1), If[LessEqual[t, -4.7e-259], t$95$3, If[LessEqual[t, -4e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 9.8e-191], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.0045], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{2} \cdot \frac{t}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-31}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-259}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-191}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{1}{x}}\right)}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.0045:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.3999999999999999e-31Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.3999999999999999e-31 < t < -4.69999999999999998e-259 or 1.34999999999999991e-155 < t < 0.00449999999999999966Initial program 43.5%
associate-*r/43.4%
fma-neg43.4%
remove-double-neg43.4%
fma-neg43.4%
sub-neg43.4%
metadata-eval43.4%
remove-double-neg43.4%
+-commutative43.4%
fma-def43.4%
Simplified43.4%
Taylor expanded in x around inf 77.4%
associate--l+77.5%
unpow277.5%
distribute-lft-out77.5%
unpow277.5%
unpow277.5%
associate-*r/77.5%
mul-1-neg77.5%
unpow277.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.4%
Taylor expanded in t around 0 77.3%
associate-*r/77.3%
mul-1-neg77.3%
unpow277.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
if -4.69999999999999998e-259 < t < -3.99999999999999999e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if -3.99999999999999999e-305 < t < 9.7999999999999999e-191Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in l around inf 55.5%
associate-*l*55.5%
Simplified55.5%
if 9.7999999999999999e-191 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 0.00449999999999999966 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification84.9%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
(sqrt 2.0)
(/ t (sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -1.45e-31)
(- t_1)
(if (<= t -7.8e-262)
t_3
(if (<= t -1.45e-305)
(+ (/ 1.0 x) -1.0)
(if (<= t 1.05e-199)
(* (sqrt 2.0) (/ t (* (* (sqrt 2.0) l) (sqrt (/ 1.0 x)))))
(if (<= t 1.35e-155) 1.0 (if (<= t 0.0019) t_3 t_1))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_1;
} else if (t <= -7.8e-262) {
tmp = t_3;
} else if (t <= -1.45e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.05e-199) {
tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0019) {
tmp = t_3;
} else {
tmp = t_1;
}
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) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
t_3 = sqrt(2.0d0) * (t / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
if (t <= (-1.45d-31)) then
tmp = -t_1
else if (t <= (-7.8d-262)) then
tmp = t_3
else if (t <= (-1.45d-305)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 1.05d-199) then
tmp = sqrt(2.0d0) * (t / ((sqrt(2.0d0) * l) * sqrt((1.0d0 / x))))
else if (t <= 1.35d-155) then
tmp = 1.0d0
else if (t <= 0.0019d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_1;
} else if (t <= -7.8e-262) {
tmp = t_3;
} else if (t <= -1.45e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.05e-199) {
tmp = Math.sqrt(2.0) * (t / ((Math.sqrt(2.0) * l) * Math.sqrt((1.0 / x))));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.0019) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x t_3 = math.sqrt(2.0) * (t / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) tmp = 0 if t <= -1.45e-31: tmp = -t_1 elif t <= -7.8e-262: tmp = t_3 elif t <= -1.45e-305: tmp = (1.0 / x) + -1.0 elif t <= 1.05e-199: tmp = math.sqrt(2.0) * (t / ((math.sqrt(2.0) * l) * math.sqrt((1.0 / x)))) elif t <= 1.35e-155: tmp = 1.0 elif t <= 0.0019: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))) tmp = 0.0 if (t <= -1.45e-31) tmp = Float64(-t_1); elseif (t <= -7.8e-262) tmp = t_3; elseif (t <= -1.45e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 1.05e-199) tmp = Float64(sqrt(2.0) * Float64(t / Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(1.0 / x))))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0019) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); tmp = 0.0; if (t <= -1.45e-31) tmp = -t_1; elseif (t <= -7.8e-262) tmp = t_3; elseif (t <= -1.45e-305) tmp = (1.0 / x) + -1.0; elseif (t <= 1.05e-199) tmp = sqrt(2.0) * (t / ((sqrt(2.0) * l) * sqrt((1.0 / x)))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.0019) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-31], (-t$95$1), If[LessEqual[t, -7.8e-262], t$95$3, If[LessEqual[t, -1.45e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.05e-199], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.0019], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{2} \cdot \frac{t}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-262}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-199}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\frac{1}{x}}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.0019:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.45e-31Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.45e-31 < t < -7.79999999999999967e-262 or 1.34999999999999991e-155 < t < 0.0019Initial program 43.5%
associate-*r/43.4%
fma-neg43.4%
remove-double-neg43.4%
fma-neg43.4%
sub-neg43.4%
metadata-eval43.4%
remove-double-neg43.4%
+-commutative43.4%
fma-def43.4%
Simplified43.4%
Taylor expanded in x around inf 77.4%
associate--l+77.5%
unpow277.5%
distribute-lft-out77.5%
unpow277.5%
unpow277.5%
associate-*r/77.5%
mul-1-neg77.5%
unpow277.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.4%
Taylor expanded in t around 0 77.3%
associate-*r/77.3%
mul-1-neg77.3%
unpow277.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
if -7.79999999999999967e-262 < t < -1.44999999999999994e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if -1.44999999999999994e-305 < t < 1.05000000000000001e-199Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in l around inf 55.5%
if 1.05000000000000001e-199 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 0.0019 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification84.9%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
(sqrt 2.0)
(/ t (sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -1.45e-31)
(- t_1)
(if (<= t -1.65e-255)
t_3
(if (<= t -1.45e-305)
(+ (/ 1.0 x) -1.0)
(if (<= t 1.12e-198)
(* (sqrt 2.0) (/ t (sqrt (+ t_2 t_2))))
(if (<= t 1.35e-155) 1.0 (if (<= t 0.00192) t_3 t_1))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_1;
} else if (t <= -1.65e-255) {
tmp = t_3;
} else if (t <= -1.45e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.12e-198) {
tmp = sqrt(2.0) * (t / sqrt((t_2 + t_2)));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.00192) {
tmp = t_3;
} else {
tmp = t_1;
}
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) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
t_3 = sqrt(2.0d0) * (t / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
if (t <= (-1.45d-31)) then
tmp = -t_1
else if (t <= (-1.65d-255)) then
tmp = t_3
else if (t <= (-1.45d-305)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 1.12d-198) then
tmp = sqrt(2.0d0) * (t / sqrt((t_2 + t_2)))
else if (t <= 1.35d-155) then
tmp = 1.0d0
else if (t <= 0.00192d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -1.45e-31) {
tmp = -t_1;
} else if (t <= -1.65e-255) {
tmp = t_3;
} else if (t <= -1.45e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.12e-198) {
tmp = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + t_2)));
} else if (t <= 1.35e-155) {
tmp = 1.0;
} else if (t <= 0.00192) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x t_3 = math.sqrt(2.0) * (t / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) tmp = 0 if t <= -1.45e-31: tmp = -t_1 elif t <= -1.65e-255: tmp = t_3 elif t <= -1.45e-305: tmp = (1.0 / x) + -1.0 elif t <= 1.12e-198: tmp = math.sqrt(2.0) * (t / math.sqrt((t_2 + t_2))) elif t <= 1.35e-155: tmp = 1.0 elif t <= 0.00192: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))) tmp = 0.0 if (t <= -1.45e-31) tmp = Float64(-t_1); elseif (t <= -1.65e-255) tmp = t_3; elseif (t <= -1.45e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 1.12e-198) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + t_2)))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.00192) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); tmp = 0.0; if (t <= -1.45e-31) tmp = -t_1; elseif (t <= -1.65e-255) tmp = t_3; elseif (t <= -1.45e-305) tmp = (1.0 / x) + -1.0; elseif (t <= 1.12e-198) tmp = sqrt(2.0) * (t / sqrt((t_2 + t_2))); elseif (t <= 1.35e-155) tmp = 1.0; elseif (t <= 0.00192) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-31], (-t$95$1), If[LessEqual[t, -1.65e-255], t$95$3, If[LessEqual[t, -1.45e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.12e-198], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$2 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-155], 1.0, If[LessEqual[t, 0.00192], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{2} \cdot \frac{t}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-255}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-198}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_2 + t_2}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-155}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 0.00192:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.45e-31Initial program 42.5%
associate-*r/42.4%
fma-neg42.4%
remove-double-neg42.4%
fma-neg42.4%
sub-neg42.4%
metadata-eval42.4%
remove-double-neg42.4%
+-commutative42.4%
fma-def42.4%
Simplified42.4%
Applied egg-rr84.5%
Taylor expanded in t around -inf 92.5%
mul-1-neg92.5%
sub-neg92.5%
metadata-eval92.5%
Simplified92.5%
if -1.45e-31 < t < -1.64999999999999994e-255 or 1.34999999999999991e-155 < t < 0.00192000000000000005Initial program 43.5%
associate-*r/43.4%
fma-neg43.4%
remove-double-neg43.4%
fma-neg43.4%
sub-neg43.4%
metadata-eval43.4%
remove-double-neg43.4%
+-commutative43.4%
fma-def43.4%
Simplified43.4%
Taylor expanded in x around inf 77.4%
associate--l+77.5%
unpow277.5%
distribute-lft-out77.5%
unpow277.5%
unpow277.5%
associate-*r/77.5%
mul-1-neg77.5%
unpow277.5%
+-commutative77.5%
unpow277.5%
fma-udef77.5%
Simplified77.4%
Taylor expanded in t around 0 77.3%
associate-*r/77.3%
mul-1-neg77.3%
unpow277.3%
distribute-rgt-neg-in77.3%
Simplified77.3%
if -1.64999999999999994e-255 < t < -1.44999999999999994e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if -1.44999999999999994e-305 < t < 1.12000000000000007e-198Initial program 4.3%
associate-*r/4.3%
fma-neg4.2%
remove-double-neg4.2%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
remove-double-neg4.3%
+-commutative4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in x around inf 64.7%
associate--l+64.6%
unpow264.6%
distribute-lft-out64.6%
unpow264.6%
unpow264.6%
associate-*r/64.6%
mul-1-neg64.6%
unpow264.6%
+-commutative64.6%
unpow264.6%
fma-udef64.6%
Simplified64.7%
Taylor expanded in t around 0 64.7%
sub-neg64.7%
unpow264.7%
mul-1-neg64.7%
remove-double-neg64.7%
unpow264.7%
Simplified64.7%
if 1.12000000000000007e-198 < t < 1.34999999999999991e-155Initial program 12.8%
associate-*r/12.8%
fma-neg12.8%
remove-double-neg12.8%
fma-neg12.8%
sub-neg12.8%
metadata-eval12.8%
remove-double-neg12.8%
+-commutative12.8%
fma-def12.8%
Simplified12.8%
Applied egg-rr47.8%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt79.2%
Simplified79.2%
if 0.00192000000000000005 < t Initial program 39.5%
associate-*r/39.4%
fma-neg39.4%
remove-double-neg39.4%
fma-neg39.4%
sub-neg39.4%
metadata-eval39.4%
remove-double-neg39.4%
+-commutative39.4%
fma-def39.4%
Simplified39.4%
Applied egg-rr84.4%
Taylor expanded in t around inf 95.1%
Final simplification85.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3 (* (sqrt 2.0) (/ t (sqrt (+ t_2 t_2))))))
(if (<= t -4.5e-130)
(- t_1)
(if (<= t -2.85e-254)
t_3
(if (<= t -4e-305) (+ (/ 1.0 x) -1.0) (if (<= t 7.4e-200) t_3 t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = sqrt(2.0) * (t / sqrt((t_2 + t_2)));
double tmp;
if (t <= -4.5e-130) {
tmp = -t_1;
} else if (t <= -2.85e-254) {
tmp = t_3;
} else if (t <= -4e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 7.4e-200) {
tmp = t_3;
} else {
tmp = t_1;
}
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) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
t_3 = sqrt(2.0d0) * (t / sqrt((t_2 + t_2)))
if (t <= (-4.5d-130)) then
tmp = -t_1
else if (t <= (-2.85d-254)) then
tmp = t_3
else if (t <= (-4d-305)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 7.4d-200) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + t_2)));
double tmp;
if (t <= -4.5e-130) {
tmp = -t_1;
} else if (t <= -2.85e-254) {
tmp = t_3;
} else if (t <= -4e-305) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 7.4e-200) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x t_3 = math.sqrt(2.0) * (t / math.sqrt((t_2 + t_2))) tmp = 0 if t <= -4.5e-130: tmp = -t_1 elif t <= -2.85e-254: tmp = t_3 elif t <= -4e-305: tmp = (1.0 / x) + -1.0 elif t <= 7.4e-200: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + t_2)))) tmp = 0.0 if (t <= -4.5e-130) tmp = Float64(-t_1); elseif (t <= -2.85e-254) tmp = t_3; elseif (t <= -4e-305) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 7.4e-200) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; t_3 = sqrt(2.0) * (t / sqrt((t_2 + t_2))); tmp = 0.0; if (t <= -4.5e-130) tmp = -t_1; elseif (t <= -2.85e-254) tmp = t_3; elseif (t <= -4e-305) tmp = (1.0 / x) + -1.0; elseif (t <= 7.4e-200) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$2 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e-130], (-t$95$1), If[LessEqual[t, -2.85e-254], t$95$3, If[LessEqual[t, -4e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 7.4e-200], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{2} \cdot \frac{t}{\sqrt{t_2 + t_2}}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-130}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-254}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-200}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.5e-130Initial program 44.0%
associate-*r/44.0%
fma-neg44.0%
remove-double-neg44.0%
fma-neg44.0%
sub-neg44.0%
metadata-eval44.0%
remove-double-neg44.0%
+-commutative44.0%
fma-def44.0%
Simplified44.0%
Applied egg-rr74.9%
Taylor expanded in t around -inf 87.1%
mul-1-neg87.1%
sub-neg87.1%
metadata-eval87.1%
Simplified87.1%
if -4.5e-130 < t < -2.8500000000000001e-254 or -3.99999999999999999e-305 < t < 7.40000000000000022e-200Initial program 9.5%
associate-*r/9.5%
fma-neg9.5%
remove-double-neg9.5%
fma-neg9.5%
sub-neg9.5%
metadata-eval9.5%
remove-double-neg9.5%
+-commutative9.5%
fma-def9.5%
Simplified9.5%
Taylor expanded in x around inf 67.2%
associate--l+67.0%
unpow267.0%
distribute-lft-out67.0%
unpow267.0%
unpow267.0%
associate-*r/67.0%
mul-1-neg67.0%
unpow267.0%
+-commutative67.0%
unpow267.0%
fma-udef67.0%
Simplified67.2%
Taylor expanded in t around 0 59.0%
sub-neg59.0%
unpow259.0%
mul-1-neg59.0%
remove-double-neg59.0%
unpow259.0%
Simplified59.0%
if -2.8500000000000001e-254 < t < -3.99999999999999999e-305Initial program 2.9%
associate-*r/2.9%
fma-neg2.9%
remove-double-neg2.9%
fma-neg2.9%
sub-neg2.9%
metadata-eval2.9%
remove-double-neg2.9%
+-commutative2.9%
fma-def2.9%
Simplified2.9%
Applied egg-rr30.6%
Taylor expanded in t around -inf 67.0%
mul-1-neg67.0%
sub-neg67.0%
metadata-eval67.0%
Simplified67.0%
Taylor expanded in x around inf 67.0%
if 7.40000000000000022e-200 < t Initial program 43.3%
associate-*r/43.2%
fma-neg43.2%
remove-double-neg43.2%
fma-neg43.2%
sub-neg43.2%
metadata-eval43.2%
remove-double-neg43.2%
+-commutative43.2%
fma-def43.2%
Simplified43.2%
Applied egg-rr75.0%
Taylor expanded in t around inf 85.0%
Final simplification81.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))) (if (<= t -1e-309) (- t_1) t_1)))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1e-309) {
tmp = -t_1;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-1d-309)) then
tmp = -t_1
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1e-309) {
tmp = -t_1;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -1e-309: tmp = -t_1 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1e-309) tmp = Float64(-t_1); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -1e-309) tmp = -t_1; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1e-309], (-t$95$1), t$95$1]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-t_1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around inf 77.4%
Final simplification76.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x)))) (sqrt (/ (+ x -1.0) (+ x 1.0)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * 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-309) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * 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-309) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $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 -1 \cdot 10^{-309}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around inf 73.8%
associate--l+73.8%
associate-*r/73.8%
metadata-eval73.8%
unpow273.8%
Simplified73.8%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around inf 77.4%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x)))) (- 1.0 (/ 1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * 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-309) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) else: tmp = 1.0 - (1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * 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-309) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * 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-309], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $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^{-309}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around inf 73.8%
associate--l+73.8%
associate-*r/73.8%
metadata-eval73.8%
unpow273.8%
Simplified73.8%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt76.6%
Simplified76.6%
Final simplification75.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) -1.0 (- 1.0 (/ 1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0;
} 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-309)) then
tmp = -1.0d0
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-309) {
tmp = -1.0;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 else: tmp = 1.0 - (1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = -1.0; 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-309) tmp = -1.0; 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-309], -1.0, N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around inf 72.2%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt76.6%
Simplified76.6%
Final simplification74.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) (+ (/ 1.0 x) -1.0) (- 1.0 (/ 1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = (1.0 / x) + -1.0;
} 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-309)) then
tmp = (1.0d0 / x) + (-1.0d0)
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-309) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 - (1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 - (1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = Float64(Float64(1.0 / x) + -1.0); 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-309) tmp = (1.0 / x) + -1.0; 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-309], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $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^{-309}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around inf 73.4%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt76.6%
Simplified76.6%
Final simplification75.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0;
} else {
tmp = 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-309)) then
tmp = -1.0d0
else
tmp = 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-309) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-309], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 35.0%
associate-*r/34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
+-commutative34.9%
fma-def34.9%
Simplified34.9%
Applied egg-rr63.1%
Taylor expanded in t around -inf 74.6%
mul-1-neg74.6%
sub-neg74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around inf 72.2%
if -1.000000000000002e-309 < t Initial program 39.0%
associate-*r/38.9%
fma-neg38.9%
remove-double-neg38.9%
fma-neg38.9%
sub-neg38.9%
metadata-eval38.9%
remove-double-neg38.9%
+-commutative38.9%
fma-def38.9%
Simplified38.9%
Applied egg-rr71.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt76.4%
Simplified76.4%
Final simplification74.4%
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 37.1%
associate-*r/37.0%
fma-neg37.0%
remove-double-neg37.0%
fma-neg37.0%
sub-neg37.0%
metadata-eval37.0%
remove-double-neg37.0%
+-commutative37.0%
fma-def37.0%
Simplified37.0%
Applied egg-rr67.3%
Taylor expanded in t around -inf 36.2%
mul-1-neg36.2%
sub-neg36.2%
metadata-eval36.2%
Simplified36.2%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt41.1%
Simplified41.1%
Final simplification41.1%
herbie shell --seed 2023216
(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)))))