
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (* t t)))
(t_2
(/
t
(sqrt
(/
(+ (fma 2.0 (/ (* t t) x) (fma l (/ l x) t_1)) (/ (fma l l t_1) x))
2.0))))
(t_3 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_4 (* t (/ (sqrt x) l))))
(if (<= t -5e+67)
(- t_3)
(if (<= t -3.45e-158)
t_2
(if (<= t -1.4e-225)
(+ -1.0 (/ 1.0 x))
(if (<= t 2.15e-276)
t_4
(if (<= t 5.2e-190)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (* 2.0 (fma 2.0 (* t t) (* l l))) (* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 5.6e-152) t_4 (if (<= t 8.5e+22) t_2 t_3)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * (t * t);
double t_2 = t / sqrt(((fma(2.0, ((t * t) / x), fma(l, (l / x), t_1)) + (fma(l, l, t_1) / x)) / 2.0));
double t_3 = sqrt(((x + -1.0) / (x + 1.0)));
double t_4 = t * (sqrt(x) / l);
double tmp;
if (t <= -5e+67) {
tmp = -t_3;
} else if (t <= -3.45e-158) {
tmp = t_2;
} else if (t <= -1.4e-225) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 2.15e-276) {
tmp = t_4;
} else if (t <= 5.2e-190) {
tmp = t * (sqrt(2.0) / fma(0.5, ((2.0 * fma(2.0, (t * t), (l * l))) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 5.6e-152) {
tmp = t_4;
} else if (t <= 8.5e+22) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * Float64(t * t)) t_2 = Float64(t / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(l, Float64(l / x), t_1)) + Float64(fma(l, l, t_1) / x)) / 2.0))) t_3 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_4 = Float64(t * Float64(sqrt(x) / l)) tmp = 0.0 if (t <= -5e+67) tmp = Float64(-t_3); elseif (t <= -3.45e-158) tmp = t_2; elseif (t <= -1.4e-225) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 2.15e-276) tmp = t_4; elseif (t <= 5.2e-190) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(2.0 * fma(2.0, Float64(t * t), Float64(l * l))) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 5.6e-152) tmp = t_4; elseif (t <= 8.5e+22) tmp = t_2; else tmp = t_3; 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[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + t$95$1), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+67], (-t$95$3), If[LessEqual[t, -3.45e-158], t$95$2, If[LessEqual[t, -1.4e-225], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-276], t$95$4, If[LessEqual[t, 5.2e-190], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(2.0 * N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-152], t$95$4, If[LessEqual[t, 8.5e+22], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t\right)\\
t_2 := \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(\ell, \frac{\ell}{x}, t_1\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, t_1\right)}{x}}{2}}}\\
t_3 := \sqrt{\frac{x + -1}{x + 1}}\\
t_4 := t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+67}:\\
\;\;\;\;-t_3\\
\mathbf{elif}\;t \leq -3.45 \cdot 10^{-158}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-225}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-276}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-190}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-152}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+22}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -4.99999999999999976e67Initial program 22.8%
associate-*l/22.8%
Simplified22.8%
Taylor expanded in t around inf 9.5%
+-commutative9.5%
associate-*r/27.2%
sub-neg27.2%
metadata-eval27.2%
unpow227.2%
+-commutative27.2%
Simplified27.2%
Taylor expanded in t around -inf 90.9%
mul-1-neg90.9%
sub-neg90.9%
metadata-eval90.9%
Simplified90.9%
if -4.99999999999999976e67 < t < -3.4499999999999998e-158 or 5.59999999999999969e-152 < t < 8.49999999999999979e22Initial program 58.3%
associate-*l/58.4%
Simplified58.4%
*-commutative58.4%
clear-num58.3%
un-div-inv58.3%
sqrt-undiv58.7%
metadata-eval58.7%
sub-neg58.7%
associate-*l/53.7%
sub-neg53.7%
metadata-eval53.7%
Applied egg-rr53.7%
metadata-eval53.7%
sub-neg53.7%
associate-/l*36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 88.0%
sub-neg88.0%
fma-def88.0%
unpow288.0%
+-commutative88.0%
unpow288.0%
associate-*l/88.0%
*-commutative88.0%
fma-def88.0%
unpow288.0%
mul-1-neg88.0%
remove-double-neg88.0%
Simplified88.0%
if -3.4499999999999998e-158 < t < -1.4e-225Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in t around inf 10.2%
+-commutative10.2%
associate-*r/10.2%
sub-neg10.2%
metadata-eval10.2%
unpow210.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in t around -inf 84.2%
mul-1-neg84.2%
sub-neg84.2%
metadata-eval84.2%
Simplified84.2%
Taylor expanded in x around inf 84.2%
if -1.4e-225 < t < 2.1499999999999998e-276 or 5.1999999999999996e-190 < t < 5.59999999999999969e-152Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in t around 0 6.2%
unpow26.2%
+-commutative6.2%
sub-neg6.2%
metadata-eval6.2%
+-commutative6.2%
unpow26.2%
Simplified6.2%
Taylor expanded in x around inf 55.9%
unpow255.9%
sub-neg55.9%
unpow255.9%
neg-mul-155.9%
remove-double-neg55.9%
distribute-lft-out55.9%
Simplified55.9%
Taylor expanded in l around 0 62.4%
associate-*l/62.5%
*-lft-identity62.5%
Simplified62.5%
if 2.1499999999999998e-276 < t < 5.1999999999999996e-190Initial program 2.2%
associate-*l/2.2%
Simplified2.2%
Taylor expanded in x around inf 82.1%
fma-def82.1%
cancel-sign-sub-inv82.1%
metadata-eval82.1%
distribute-rgt1-in82.1%
metadata-eval82.1%
fma-def82.1%
unpow282.1%
unpow282.1%
associate-*r*82.1%
Simplified82.1%
if 8.49999999999999979e22 < t Initial program 31.3%
associate-*l/31.3%
Simplified31.3%
Taylor expanded in t around inf 17.0%
+-commutative17.0%
associate-*r/38.9%
sub-neg38.9%
metadata-eval38.9%
unpow238.9%
+-commutative38.9%
Simplified38.9%
Taylor expanded in t around 0 93.4%
Final simplification87.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))))
(t_2 (* 2.0 (* t t)))
(t_3
(/
t
(sqrt
(/
(+ (fma 2.0 (/ (* t t) x) (fma l (/ l x) t_2)) (/ (fma l l t_2) x))
2.0)))))
(if (<= t -6.2e+68)
(- t_1)
(if (<= t -1.32e-157)
t_3
(if (<= t -1.4e-225)
(+ -1.0 (/ 1.0 x))
(if (<= t 5.6e-152)
(* t (/ (sqrt x) l))
(if (<= t 9.5e+23) 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 = 2.0 * (t * t);
double t_3 = t / sqrt(((fma(2.0, ((t * t) / x), fma(l, (l / x), t_2)) + (fma(l, l, t_2) / x)) / 2.0));
double tmp;
if (t <= -6.2e+68) {
tmp = -t_1;
} else if (t <= -1.32e-157) {
tmp = t_3;
} else if (t <= -1.4e-225) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 5.6e-152) {
tmp = t * (sqrt(x) / l);
} else if (t <= 9.5e+23) {
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(2.0 * Float64(t * t)) t_3 = Float64(t / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(l, Float64(l / x), t_2)) + Float64(fma(l, l, t_2) / x)) / 2.0))) tmp = 0.0 if (t <= -6.2e+68) tmp = Float64(-t_1); elseif (t <= -1.32e-157) tmp = t_3; elseif (t <= -1.4e-225) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 5.6e-152) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 9.5e+23) tmp = t_3; else tmp = t_1; end return 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[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(l * N[(l / x), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+68], (-t$95$1), If[LessEqual[t, -1.32e-157], t$95$3, If[LessEqual[t, -1.4e-225], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-152], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+23], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := 2 \cdot \left(t \cdot t\right)\\
t_3 := \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(\ell, \frac{\ell}{x}, t_2\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, t_2\right)}{x}}{2}}}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+68}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -1.32 \cdot 10^{-157}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-225}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-152}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+23}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.1999999999999997e68Initial program 22.8%
associate-*l/22.8%
Simplified22.8%
Taylor expanded in t around inf 9.5%
+-commutative9.5%
associate-*r/27.2%
sub-neg27.2%
metadata-eval27.2%
unpow227.2%
+-commutative27.2%
Simplified27.2%
Taylor expanded in t around -inf 90.9%
mul-1-neg90.9%
sub-neg90.9%
metadata-eval90.9%
Simplified90.9%
if -6.1999999999999997e68 < t < -1.3200000000000001e-157 or 5.59999999999999969e-152 < t < 9.50000000000000038e23Initial program 58.3%
associate-*l/58.4%
Simplified58.4%
*-commutative58.4%
clear-num58.3%
un-div-inv58.3%
sqrt-undiv58.7%
metadata-eval58.7%
sub-neg58.7%
associate-*l/53.7%
sub-neg53.7%
metadata-eval53.7%
Applied egg-rr53.7%
metadata-eval53.7%
sub-neg53.7%
associate-/l*36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 88.0%
sub-neg88.0%
fma-def88.0%
unpow288.0%
+-commutative88.0%
unpow288.0%
associate-*l/88.0%
*-commutative88.0%
fma-def88.0%
unpow288.0%
mul-1-neg88.0%
remove-double-neg88.0%
Simplified88.0%
if -1.3200000000000001e-157 < t < -1.4e-225Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in t around inf 10.2%
+-commutative10.2%
associate-*r/10.2%
sub-neg10.2%
metadata-eval10.2%
unpow210.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in t around -inf 84.2%
mul-1-neg84.2%
sub-neg84.2%
metadata-eval84.2%
Simplified84.2%
Taylor expanded in x around inf 84.2%
if -1.4e-225 < t < 5.59999999999999969e-152Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Taylor expanded in t around 0 6.9%
unpow26.9%
+-commutative6.9%
sub-neg6.9%
metadata-eval6.9%
+-commutative6.9%
unpow26.9%
Simplified6.9%
Taylor expanded in x around inf 46.3%
unpow246.3%
sub-neg46.3%
unpow246.3%
neg-mul-146.3%
remove-double-neg46.3%
distribute-lft-out46.3%
Simplified46.3%
Taylor expanded in l around 0 55.6%
associate-*l/55.6%
*-lft-identity55.6%
Simplified55.6%
if 9.50000000000000038e23 < t Initial program 31.3%
associate-*l/31.3%
Simplified31.3%
Taylor expanded in t around inf 17.0%
+-commutative17.0%
associate-*r/38.9%
sub-neg38.9%
metadata-eval38.9%
unpow238.9%
+-commutative38.9%
Simplified38.9%
Taylor expanded in t around 0 93.4%
Final simplification85.4%
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)))
(if (<= t -1.45e+67)
(- t_1)
(if (<= t -3.45e-158)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) t_2))))))
(if (<= t -5e-226)
(+ -1.0 (/ 1.0 x))
(if (<= t 5.6e-152)
(* t (/ (sqrt x) l))
(if (<= t 1.9e-37)
(/
t
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (* t t)) (+ x -1.0))
(* (* l l) (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))
2.0)))
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 tmp;
if (t <= -1.45e+67) {
tmp = -t_1;
} else if (t <= -3.45e-158) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + fma(2.0, ((t * t) / x), fma(2.0, (t * t), t_2)))));
} else if (t <= -5e-226) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 5.6e-152) {
tmp = t * (sqrt(x) / l);
} else if (t <= 1.9e-37) {
tmp = t / sqrt((fma(2.0, (((x + 1.0) * (t * t)) / (x + -1.0)), ((l * l) * ((1.0 / x) + (1.0 / (x + -1.0))))) / 2.0));
} 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) tmp = 0.0 if (t <= -1.45e+67) tmp = Float64(-t_1); elseif (t <= -3.45e-158) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), t_2)))))); elseif (t <= -5e-226) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 5.6e-152) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 1.9e-37) tmp = Float64(t / sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * Float64(t * t)) / Float64(x + -1.0)), Float64(Float64(l * l) * Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))))) / 2.0))); else tmp = t_1; end return 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]}, If[LessEqual[t, -1.45e+67], (-t$95$1), If[LessEqual[t, -3.45e-158], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-226], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-152], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-37], N[(t / N[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+67}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -3.45 \cdot 10^{-158}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, t_2\right)\right)}}\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-226}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-152}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-37}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot \left(t \cdot t\right)}{x + -1}, \left(\ell \cdot \ell\right) \cdot \left(\frac{1}{x} + \frac{1}{x + -1}\right)\right)}{2}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.45000000000000012e67Initial program 22.8%
associate-*l/22.8%
Simplified22.8%
Taylor expanded in t around inf 9.5%
+-commutative9.5%
associate-*r/27.2%
sub-neg27.2%
metadata-eval27.2%
unpow227.2%
+-commutative27.2%
Simplified27.2%
Taylor expanded in t around -inf 90.9%
mul-1-neg90.9%
sub-neg90.9%
metadata-eval90.9%
Simplified90.9%
if -1.45000000000000012e67 < t < -3.4499999999999998e-158Initial program 61.4%
associate-*l/61.5%
Simplified61.5%
Taylor expanded in x around inf 92.5%
sub-neg92.5%
fma-def92.5%
unpow292.5%
fma-def92.5%
unpow292.5%
unpow292.5%
mul-1-neg92.5%
remove-double-neg92.5%
fma-def92.5%
unpow292.5%
unpow292.5%
Simplified92.5%
Taylor expanded in t around 0 92.1%
unpow292.1%
Simplified92.1%
if -3.4499999999999998e-158 < t < -4.9999999999999998e-226Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in t around inf 10.2%
+-commutative10.2%
associate-*r/10.2%
sub-neg10.2%
metadata-eval10.2%
unpow210.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in t around -inf 84.2%
mul-1-neg84.2%
sub-neg84.2%
metadata-eval84.2%
Simplified84.2%
Taylor expanded in x around inf 84.2%
if -4.9999999999999998e-226 < t < 5.59999999999999969e-152Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Taylor expanded in t around 0 6.9%
unpow26.9%
+-commutative6.9%
sub-neg6.9%
metadata-eval6.9%
+-commutative6.9%
unpow26.9%
Simplified6.9%
Taylor expanded in x around inf 46.3%
unpow246.3%
sub-neg46.3%
unpow246.3%
neg-mul-146.3%
remove-double-neg46.3%
distribute-lft-out46.3%
Simplified46.3%
Taylor expanded in l around 0 55.6%
associate-*l/55.6%
*-lft-identity55.6%
Simplified55.6%
if 5.59999999999999969e-152 < t < 1.9000000000000002e-37Initial program 49.0%
associate-*l/49.1%
Simplified49.1%
*-commutative49.1%
clear-num49.0%
un-div-inv49.0%
sqrt-undiv49.2%
metadata-eval49.2%
sub-neg49.2%
associate-*l/49.8%
sub-neg49.8%
metadata-eval49.8%
Applied egg-rr49.8%
metadata-eval49.8%
sub-neg49.8%
associate-/l*12.8%
sub-neg12.8%
metadata-eval12.8%
+-commutative12.8%
Simplified12.8%
Taylor expanded in l around 0 64.0%
fma-def64.0%
unpow264.0%
sub-neg64.0%
metadata-eval64.0%
unpow264.0%
associate--l+68.0%
sub-neg68.0%
metadata-eval68.0%
sub-neg68.0%
metadata-eval68.0%
Simplified68.0%
Taylor expanded in x around inf 82.9%
if 1.9000000000000002e-37 < t Initial program 36.1%
associate-*l/36.1%
Simplified36.1%
Taylor expanded in t around inf 23.7%
+-commutative23.7%
associate-*r/44.1%
sub-neg44.1%
metadata-eval44.1%
unpow244.1%
+-commutative44.1%
Simplified44.1%
Taylor expanded in t around 0 91.8%
Final simplification85.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
t
(sqrt
(/
(fma
2.0
(/ (* (+ x 1.0) (* t t)) (+ x -1.0))
(* (* l l) (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))
2.0))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.7e-7)
(- t_2)
(if (<= t -3.45e-158)
t_1
(if (<= t -1.25e-227)
(+ -1.0 (/ 1.0 x))
(if (<= t 5.6e-152)
(* t (/ (sqrt x) l))
(if (<= t 1.9e-37) t_1 t_2)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t / sqrt((fma(2.0, (((x + 1.0) * (t * t)) / (x + -1.0)), ((l * l) * ((1.0 / x) + (1.0 / (x + -1.0))))) / 2.0));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.7e-7) {
tmp = -t_2;
} else if (t <= -3.45e-158) {
tmp = t_1;
} else if (t <= -1.25e-227) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 5.6e-152) {
tmp = t * (sqrt(x) / l);
} else if (t <= 1.9e-37) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t / sqrt(Float64(fma(2.0, Float64(Float64(Float64(x + 1.0) * Float64(t * t)) / Float64(x + -1.0)), Float64(Float64(l * l) * Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))))) / 2.0))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.7e-7) tmp = Float64(-t_2); elseif (t <= -3.45e-158) tmp = t_1; elseif (t <= -1.25e-227) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 5.6e-152) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 1.9e-37) 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[Sqrt[N[(N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] * N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $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, -2.7e-7], (-t$95$2), If[LessEqual[t, -3.45e-158], t$95$1, If[LessEqual[t, -1.25e-227], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e-152], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-37], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{\left(x + 1\right) \cdot \left(t \cdot t\right)}{x + -1}, \left(\ell \cdot \ell\right) \cdot \left(\frac{1}{x} + \frac{1}{x + -1}\right)\right)}{2}}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-7}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -3.45 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-227}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-152}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.70000000000000009e-7Initial program 32.7%
associate-*l/32.8%
Simplified32.8%
Taylor expanded in t around inf 19.7%
+-commutative19.7%
associate-*r/39.0%
sub-neg39.0%
metadata-eval39.0%
unpow239.0%
+-commutative39.0%
Simplified39.0%
Taylor expanded in t around -inf 90.2%
mul-1-neg90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
if -2.70000000000000009e-7 < t < -3.4499999999999998e-158 or 5.59999999999999969e-152 < t < 1.9000000000000002e-37Initial program 51.7%
associate-*l/51.8%
Simplified51.8%
*-commutative51.8%
clear-num51.8%
un-div-inv51.7%
sqrt-undiv52.0%
metadata-eval52.0%
sub-neg52.0%
associate-*l/52.3%
sub-neg52.3%
metadata-eval52.3%
Applied egg-rr52.3%
metadata-eval52.3%
sub-neg52.3%
associate-/l*18.7%
sub-neg18.7%
metadata-eval18.7%
+-commutative18.7%
Simplified18.7%
Taylor expanded in l around 0 65.5%
fma-def65.5%
unpow265.5%
sub-neg65.5%
metadata-eval65.5%
unpow265.5%
associate--l+71.9%
sub-neg71.9%
metadata-eval71.9%
sub-neg71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in x around inf 88.6%
if -3.4499999999999998e-158 < t < -1.2499999999999999e-227Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in t around inf 10.2%
+-commutative10.2%
associate-*r/10.2%
sub-neg10.2%
metadata-eval10.2%
unpow210.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in t around -inf 84.2%
mul-1-neg84.2%
sub-neg84.2%
metadata-eval84.2%
Simplified84.2%
Taylor expanded in x around inf 84.2%
if -1.2499999999999999e-227 < t < 5.59999999999999969e-152Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Taylor expanded in t around 0 6.9%
unpow26.9%
+-commutative6.9%
sub-neg6.9%
metadata-eval6.9%
+-commutative6.9%
unpow26.9%
Simplified6.9%
Taylor expanded in x around inf 46.3%
unpow246.3%
sub-neg46.3%
unpow246.3%
neg-mul-146.3%
remove-double-neg46.3%
distribute-lft-out46.3%
Simplified46.3%
Taylor expanded in l around 0 55.6%
associate-*l/55.6%
*-lft-identity55.6%
Simplified55.6%
if 1.9000000000000002e-37 < t Initial program 36.1%
associate-*l/36.1%
Simplified36.1%
Taylor expanded in t around inf 23.7%
+-commutative23.7%
associate-*r/44.1%
sub-neg44.1%
metadata-eval44.1%
unpow244.1%
+-commutative44.1%
Simplified44.1%
Taylor expanded in t around 0 91.8%
Final simplification85.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.3e-227) (- (/ 1.0 x) (+ 1.0 (/ 0.5 (* x x)))) (if (<= t 1.05e-127) (* t (/ (sqrt x) l)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.3e-227) {
tmp = (1.0 / x) - (1.0 + (0.5 / (x * x)));
} else if (t <= 1.05e-127) {
tmp = t * (sqrt(x) / l);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.3d-227)) then
tmp = (1.0d0 / x) - (1.0d0 + (0.5d0 / (x * x)))
else if (t <= 1.05d-127) then
tmp = t * (sqrt(x) / l)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.3e-227) {
tmp = (1.0 / x) - (1.0 + (0.5 / (x * x)));
} else if (t <= 1.05e-127) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.3e-227: tmp = (1.0 / x) - (1.0 + (0.5 / (x * x))) elif t <= 1.05e-127: tmp = t * (math.sqrt(x) / l) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.3e-227) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + Float64(0.5 / Float64(x * x)))); elseif (t <= 1.05e-127) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.3e-227) tmp = (1.0 / x) - (1.0 + (0.5 / (x * x))); elseif (t <= 1.05e-127) tmp = t * (sqrt(x) / l); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.3e-227], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-127], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $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.3 \cdot 10^{-227}:\\
\;\;\;\;\frac{1}{x} - \left(1 + \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-127}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -1.30000000000000006e-227Initial program 34.8%
associate-*l/34.8%
Simplified34.8%
Taylor expanded in t around inf 29.5%
+-commutative29.5%
associate-*r/42.4%
sub-neg42.4%
metadata-eval42.4%
unpow242.4%
+-commutative42.4%
Simplified42.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in x around inf 83.6%
associate-*r/83.6%
metadata-eval83.6%
unpow283.6%
Simplified83.6%
if -1.30000000000000006e-227 < t < 1.05000000000000005e-127Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in t around 0 6.3%
unpow26.3%
+-commutative6.3%
sub-neg6.3%
metadata-eval6.3%
+-commutative6.3%
unpow26.3%
Simplified6.3%
Taylor expanded in x around inf 43.5%
unpow243.5%
sub-neg43.5%
unpow243.5%
neg-mul-143.5%
remove-double-neg43.5%
distribute-lft-out43.5%
Simplified43.5%
Taylor expanded in l around 0 56.1%
associate-*l/56.2%
*-lft-identity56.2%
Simplified56.2%
if 1.05000000000000005e-127 < t Initial program 40.1%
associate-*l/40.2%
Simplified40.2%
Taylor expanded in t around inf 32.3%
+-commutative32.3%
associate-*r/48.5%
sub-neg48.5%
metadata-eval48.5%
unpow248.5%
+-commutative48.5%
Simplified48.5%
Taylor expanded in t around 0 86.4%
Final simplification80.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 -5e-229) (- t_1) (if (<= t 1.5e-127) (* t (/ (sqrt x) l)) 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 <= -5e-229) {
tmp = -t_1;
} else if (t <= 1.5e-127) {
tmp = t * (sqrt(x) / l);
} 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 <= (-5d-229)) then
tmp = -t_1
else if (t <= 1.5d-127) then
tmp = t * (sqrt(x) / l)
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 <= -5e-229) {
tmp = -t_1;
} else if (t <= 1.5e-127) {
tmp = t * (Math.sqrt(x) / l);
} 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 <= -5e-229: tmp = -t_1 elif t <= 1.5e-127: tmp = t * (math.sqrt(x) / l) 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 <= -5e-229) tmp = Float64(-t_1); elseif (t <= 1.5e-127) tmp = Float64(t * Float64(sqrt(x) / l)); 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 <= -5e-229) tmp = -t_1; elseif (t <= 1.5e-127) tmp = t * (sqrt(x) / l); 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, -5e-229], (-t$95$1), If[LessEqual[t, 1.5e-127], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-229}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-127}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.00000000000000016e-229Initial program 34.8%
associate-*l/34.8%
Simplified34.8%
Taylor expanded in t around inf 29.5%
+-commutative29.5%
associate-*r/42.4%
sub-neg42.4%
metadata-eval42.4%
unpow242.4%
+-commutative42.4%
Simplified42.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
if -5.00000000000000016e-229 < t < 1.50000000000000004e-127Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in t around 0 6.3%
unpow26.3%
+-commutative6.3%
sub-neg6.3%
metadata-eval6.3%
+-commutative6.3%
unpow26.3%
Simplified6.3%
Taylor expanded in x around inf 43.5%
unpow243.5%
sub-neg43.5%
unpow243.5%
neg-mul-143.5%
remove-double-neg43.5%
distribute-lft-out43.5%
Simplified43.5%
Taylor expanded in l around 0 56.1%
associate-*l/56.2%
*-lft-identity56.2%
Simplified56.2%
if 1.50000000000000004e-127 < t Initial program 40.1%
associate-*l/40.2%
Simplified40.2%
Taylor expanded in t around inf 32.3%
+-commutative32.3%
associate-*r/48.5%
sub-neg48.5%
metadata-eval48.5%
unpow248.5%
+-commutative48.5%
Simplified48.5%
Taylor expanded in t around 0 86.4%
Final simplification80.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ 0.5 (* x x))))
(if (<= t -8.5e-228)
(- (/ 1.0 x) (+ 1.0 t_1))
(if (<= t 1.05e-216) (* (sqrt x) (/ t l)) (+ 1.0 (+ t_1 (/ -1.0 x)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -8.5e-228) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 1.05e-216) {
tmp = sqrt(x) * (t / l);
} else {
tmp = 1.0 + (t_1 + (-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) :: t_1
real(8) :: tmp
t_1 = 0.5d0 / (x * x)
if (t <= (-8.5d-228)) then
tmp = (1.0d0 / x) - (1.0d0 + t_1)
else if (t <= 1.05d-216) then
tmp = sqrt(x) * (t / l)
else
tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -8.5e-228) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 1.05e-216) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -8.5e-228: tmp = (1.0 / x) - (1.0 + t_1) elif t <= 1.05e-216: tmp = math.sqrt(x) * (t / l) else: tmp = 1.0 + (t_1 + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -8.5e-228) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1)); elseif (t <= 1.05e-216) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -8.5e-228) tmp = (1.0 / x) - (1.0 + t_1); elseif (t <= 1.05e-216) tmp = sqrt(x) * (t / l); else tmp = 1.0 + (t_1 + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e-228], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-216], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-216}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -8.49999999999999947e-228Initial program 34.8%
associate-*l/34.8%
Simplified34.8%
Taylor expanded in t around inf 29.5%
+-commutative29.5%
associate-*r/42.4%
sub-neg42.4%
metadata-eval42.4%
unpow242.4%
+-commutative42.4%
Simplified42.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in x around inf 83.6%
associate-*r/83.6%
metadata-eval83.6%
unpow283.6%
Simplified83.6%
if -8.49999999999999947e-228 < t < 1.0500000000000001e-216Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
*-commutative1.9%
clear-num1.9%
un-div-inv1.9%
sqrt-undiv1.9%
metadata-eval1.9%
sub-neg1.9%
associate-*l/9.7%
sub-neg9.7%
metadata-eval9.7%
Applied egg-rr9.7%
metadata-eval9.7%
sub-neg9.7%
associate-/l*1.4%
sub-neg1.4%
metadata-eval1.4%
+-commutative1.4%
Simplified1.4%
Taylor expanded in x around inf 55.7%
sub-neg55.7%
fma-def55.7%
unpow255.7%
+-commutative55.7%
unpow255.7%
associate-*l/55.7%
*-commutative55.7%
fma-def55.6%
unpow255.6%
mul-1-neg55.6%
remove-double-neg55.6%
Simplified55.6%
Taylor expanded in t around 0 65.4%
if 1.0500000000000001e-216 < t Initial program 34.9%
associate-*l/34.9%
Simplified34.9%
Taylor expanded in t around inf 29.3%
+-commutative29.3%
associate-*r/42.9%
sub-neg42.9%
metadata-eval42.9%
unpow242.9%
+-commutative42.9%
Simplified42.9%
Taylor expanded in x around inf 79.9%
associate--l+79.9%
associate-*r/79.9%
metadata-eval79.9%
unpow279.9%
Simplified79.9%
Final simplification80.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ 0.5 (* x x))))
(if (<= t -1.1e-226)
(- (/ 1.0 x) (+ 1.0 t_1))
(if (<= t 1.05e-127) (* t (/ (sqrt x) l)) (+ 1.0 (+ t_1 (/ -1.0 x)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -1.1e-226) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 1.05e-127) {
tmp = t * (sqrt(x) / l);
} else {
tmp = 1.0 + (t_1 + (-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) :: t_1
real(8) :: tmp
t_1 = 0.5d0 / (x * x)
if (t <= (-1.1d-226)) then
tmp = (1.0d0 / x) - (1.0d0 + t_1)
else if (t <= 1.05d-127) then
tmp = t * (sqrt(x) / l)
else
tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -1.1e-226) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 1.05e-127) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -1.1e-226: tmp = (1.0 / x) - (1.0 + t_1) elif t <= 1.05e-127: tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 + (t_1 + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -1.1e-226) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1)); elseif (t <= 1.05e-127) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -1.1e-226) tmp = (1.0 / x) - (1.0 + t_1); elseif (t <= 1.05e-127) tmp = t * (sqrt(x) / l); else tmp = 1.0 + (t_1 + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e-226], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-127], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-226}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-127}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.1e-226Initial program 34.8%
associate-*l/34.8%
Simplified34.8%
Taylor expanded in t around inf 29.5%
+-commutative29.5%
associate-*r/42.4%
sub-neg42.4%
metadata-eval42.4%
unpow242.4%
+-commutative42.4%
Simplified42.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in x around inf 83.6%
associate-*r/83.6%
metadata-eval83.6%
unpow283.6%
Simplified83.6%
if -1.1e-226 < t < 1.05000000000000005e-127Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in t around 0 6.3%
unpow26.3%
+-commutative6.3%
sub-neg6.3%
metadata-eval6.3%
+-commutative6.3%
unpow26.3%
Simplified6.3%
Taylor expanded in x around inf 43.5%
unpow243.5%
sub-neg43.5%
unpow243.5%
neg-mul-143.5%
remove-double-neg43.5%
distribute-lft-out43.5%
Simplified43.5%
Taylor expanded in l around 0 56.1%
associate-*l/56.2%
*-lft-identity56.2%
Simplified56.2%
if 1.05000000000000005e-127 < t Initial program 40.1%
associate-*l/40.2%
Simplified40.2%
Taylor expanded in t around inf 32.3%
+-commutative32.3%
associate-*r/48.5%
sub-neg48.5%
metadata-eval48.5%
unpow248.5%
+-commutative48.5%
Simplified48.5%
Taylor expanded in x around inf 85.7%
associate--l+85.7%
associate-*r/85.7%
metadata-eval85.7%
unpow285.7%
Simplified85.7%
Final simplification80.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -3.6e-293) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -3.6e-293) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-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 <= (-3.6d-293)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-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 <= -3.6e-293) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -3.6e-293: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -3.6e-293) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -3.6e-293) tmp = -1.0 + (1.0 / x); else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -3.6e-293], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-293}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -3.59999999999999985e-293Initial program 31.9%
associate-*l/31.9%
Simplified31.9%
Taylor expanded in t around inf 27.1%
+-commutative27.1%
associate-*r/38.9%
sub-neg38.9%
metadata-eval38.9%
unpow238.9%
+-commutative38.9%
Simplified38.9%
Taylor expanded in t around -inf 79.0%
mul-1-neg79.0%
sub-neg79.0%
metadata-eval79.0%
Simplified79.0%
Taylor expanded in x around inf 78.1%
if -3.59999999999999985e-293 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around inf 27.0%
+-commutative27.0%
associate-*r/39.5%
sub-neg39.5%
metadata-eval39.5%
unpow239.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 75.1%
associate--l+75.1%
associate-*r/75.1%
metadata-eval75.1%
unpow275.1%
Simplified75.1%
Final simplification76.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (+ (/ 0.5 (* x x)) (/ -1.0 x)))) (if (<= t -5e-310) (- -1.0 t_1) (+ 1.0 t_1))))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = (0.5 / (x * x)) + (-1.0 / x);
double tmp;
if (t <= -5e-310) {
tmp = -1.0 - t_1;
} else {
tmp = 1.0 + 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 = (0.5d0 / (x * x)) + ((-1.0d0) / x)
if (t <= (-5d-310)) then
tmp = (-1.0d0) - t_1
else
tmp = 1.0d0 + 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 = (0.5 / (x * x)) + (-1.0 / x);
double tmp;
if (t <= -5e-310) {
tmp = -1.0 - t_1;
} else {
tmp = 1.0 + t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (0.5 / (x * x)) + (-1.0 / x) tmp = 0 if t <= -5e-310: tmp = -1.0 - t_1 else: tmp = 1.0 + t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x)) tmp = 0.0 if (t <= -5e-310) tmp = Float64(-1.0 - t_1); else tmp = Float64(1.0 + t_1); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (0.5 / (x * x)) + (-1.0 / x); tmp = 0.0; if (t <= -5e-310) tmp = -1.0 - t_1; else tmp = 1.0 + 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[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-310], N[(-1.0 - t$95$1), $MachinePrecision], N[(1.0 + t$95$1), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x} + \frac{-1}{x}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 - t_1\\
\mathbf{else}:\\
\;\;\;\;1 + t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 31.6%
associate-*l/31.7%
Simplified31.7%
Taylor expanded in t around inf 26.9%
+-commutative26.9%
associate-*r/38.6%
sub-neg38.6%
metadata-eval38.6%
unpow238.6%
+-commutative38.6%
Simplified38.6%
Taylor expanded in t around -inf 78.4%
mul-1-neg78.4%
sub-neg78.4%
metadata-eval78.4%
Simplified78.4%
Taylor expanded in x around inf 77.7%
associate--l+77.7%
sub-neg77.7%
associate-*r/77.7%
metadata-eval77.7%
unpow277.7%
distribute-neg-frac77.7%
metadata-eval77.7%
Simplified77.7%
if -4.999999999999985e-310 < t Initial program 32.4%
associate-*l/32.4%
Simplified32.4%
Taylor expanded in t around inf 27.2%
+-commutative27.2%
associate-*r/39.8%
sub-neg39.8%
metadata-eval39.8%
unpow239.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in x around inf 75.6%
associate--l+75.6%
associate-*r/75.6%
metadata-eval75.6%
unpow275.6%
Simplified75.6%
Final simplification76.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (/ 0.5 (* x x)))) (if (<= t -3.6e-293) (- (/ 1.0 x) (+ 1.0 t_1)) (+ 1.0 (+ t_1 (/ -1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -3.6e-293) {
tmp = (1.0 / x) - (1.0 + t_1);
} else {
tmp = 1.0 + (t_1 + (-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) :: t_1
real(8) :: tmp
t_1 = 0.5d0 / (x * x)
if (t <= (-3.6d-293)) then
tmp = (1.0d0 / x) - (1.0d0 + t_1)
else
tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -3.6e-293) {
tmp = (1.0 / x) - (1.0 + t_1);
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -3.6e-293: tmp = (1.0 / x) - (1.0 + t_1) else: tmp = 1.0 + (t_1 + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -3.6e-293) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1)); else tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -3.6e-293) tmp = (1.0 / x) - (1.0 + t_1); else tmp = 1.0 + (t_1 + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e-293], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{-293}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -3.59999999999999985e-293Initial program 31.9%
associate-*l/31.9%
Simplified31.9%
Taylor expanded in t around inf 27.1%
+-commutative27.1%
associate-*r/38.9%
sub-neg38.9%
metadata-eval38.9%
unpow238.9%
+-commutative38.9%
Simplified38.9%
Taylor expanded in t around -inf 79.0%
mul-1-neg79.0%
sub-neg79.0%
metadata-eval79.0%
Simplified79.0%
Taylor expanded in x around inf 78.3%
associate-*r/78.3%
metadata-eval78.3%
unpow278.3%
Simplified78.3%
if -3.59999999999999985e-293 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around inf 27.0%
+-commutative27.0%
associate-*r/39.5%
sub-neg39.5%
metadata-eval39.5%
unpow239.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 75.1%
associate--l+75.1%
associate-*r/75.1%
metadata-eval75.1%
unpow275.1%
Simplified75.1%
Final simplification76.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -3.6e-293) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -3.6e-293) {
tmp = -1.0 + (1.0 / 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 <= (-3.6d-293)) then
tmp = (-1.0d0) + (1.0d0 / 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 <= -3.6e-293) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -3.6e-293: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -3.6e-293) tmp = Float64(-1.0 + Float64(1.0 / 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 <= -3.6e-293) tmp = -1.0 + (1.0 / 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, -3.6e-293], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-293}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -3.59999999999999985e-293Initial program 31.9%
associate-*l/31.9%
Simplified31.9%
Taylor expanded in t around inf 27.1%
+-commutative27.1%
associate-*r/38.9%
sub-neg38.9%
metadata-eval38.9%
unpow238.9%
+-commutative38.9%
Simplified38.9%
Taylor expanded in t around -inf 79.0%
mul-1-neg79.0%
sub-neg79.0%
metadata-eval79.0%
Simplified79.0%
Taylor expanded in x around inf 78.1%
if -3.59999999999999985e-293 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around inf 27.0%
+-commutative27.0%
associate-*r/39.5%
sub-neg39.5%
metadata-eval39.5%
unpow239.5%
+-commutative39.5%
Simplified39.5%
Taylor expanded in x around inf 75.0%
Final simplification76.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (+ 1.0 (/ -1.0 x)))
l = abs(l);
double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0 + ((-1.0d0) / x)
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
l = abs(l) def code(x, l, t): return 1.0 + (-1.0 / x)
l = abs(l) function code(x, l, t) return Float64(1.0 + Float64(-1.0 / x)) end
l = abs(l) function tmp = code(x, l, t) tmp = 1.0 + (-1.0 / x); end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
1 + \frac{-1}{x}
\end{array}
Initial program 32.0%
associate-*l/32.0%
Simplified32.0%
Taylor expanded in t around inf 27.1%
+-commutative27.1%
associate-*r/39.2%
sub-neg39.2%
metadata-eval39.2%
unpow239.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in x around inf 39.2%
Final simplification39.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 1.0)
l = abs(l);
double code(double x, double l, double t) {
return 1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return 1.0;
}
l = abs(l) def code(x, l, t): return 1.0
l = abs(l) function code(x, l, t) return 1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = 1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := 1.0
\begin{array}{l}
l = |l|\\
\\
1
\end{array}
Initial program 32.0%
associate-*l/32.0%
Simplified32.0%
Taylor expanded in t around inf 27.1%
+-commutative27.1%
associate-*r/39.2%
sub-neg39.2%
metadata-eval39.2%
unpow239.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in x around inf 39.2%
Final simplification39.2%
herbie shell --seed 2023293
(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)))))