
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (fma t t (/ t (/ x t)))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -1.6e+143)
(- -1.0 (/ -1.0 x))
(if (<= t -5.4e-164)
t_1
(if (<= t 2.6e-233)
(*
(sqrt 2.0)
(/
t
(* l (sqrt (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))))))
(if (<= t 1.26e-155)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/
(+ (* l l) (fma 2.0 (* t t) (fma (* t 2.0) t (* l l))))
(* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 5e+144)
t_1
(/
(sqrt 2.0)
(* (sqrt 2.0) (sqrt (/ (+ 1.0 x) (+ x -1.0))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * fma(t, t, (t / (x / t)))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -1.6e+143) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -5.4e-164) {
tmp = t_1;
} else if (t <= 2.6e-233) {
tmp = sqrt(2.0) * (t / (l * sqrt((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))))));
} else if (t <= 1.26e-155) {
tmp = t * (sqrt(2.0) / fma(0.5, (((l * l) + fma(2.0, (t * t), fma((t * 2.0), t, (l * l)))) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 5e+144) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * fma(t, t, Float64(t / Float64(x / t)))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -1.6e+143) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= -5.4e-164) tmp = t_1; elseif (t <= 2.6e-233) tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 1.26e-155) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(Float64(l * l) + fma(2.0, Float64(t * t), fma(Float64(t * 2.0), t, Float64(l * l)))) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 5e+144) tmp = t_1; else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+143], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.4e-164], t$95$1, If[LessEqual[t, 2.6e-233], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-155], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(t * 2.0), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $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, 5e+144], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \mathsf{fma}\left(t, t, \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+143}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{-164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-233}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \mathsf{fma}\left(2, t \cdot t, \mathsf{fma}\left(t \cdot 2, t, \ell \cdot \ell\right)\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x + -1}}}\\
\end{array}
\end{array}
if t < -1.60000000000000008e143Initial program 2.4%
associate-*r/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Applied egg-rr91.9%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 97.9%
if -1.60000000000000008e143 < t < -5.4000000000000003e-164 or 1.26e-155 < t < 4.9999999999999999e144Initial program 53.2%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in x around inf 76.5%
associate--l+76.5%
unpow276.5%
distribute-lft-out76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
unpow276.5%
associate-*l*76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in t around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
unpow276.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
pow1/276.0%
associate-/l*76.0%
+-commutative76.0%
fma-def76.0%
associate-/l*76.0%
associate-/l*86.6%
Applied egg-rr86.6%
if -5.4000000000000003e-164 < t < 2.5999999999999998e-233Initial program 4.3%
associate-*r/4.3%
fma-neg4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
fma-def4.3%
distribute-rgt-neg-in4.3%
Simplified4.3%
Taylor expanded in l around inf 7.2%
*-commutative7.2%
associate--l+7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
sub-neg7.3%
metadata-eval7.3%
+-commutative7.3%
Simplified7.3%
Taylor expanded in x around inf 45.2%
associate-+r+45.2%
associate-*r/45.2%
metadata-eval45.2%
associate-*r/45.2%
metadata-eval45.2%
associate-*r/45.2%
metadata-eval45.2%
unpow245.2%
Simplified45.2%
if 2.5999999999999998e-233 < t < 1.26e-155Initial program 7.7%
associate-*l/7.8%
Simplified7.8%
Taylor expanded in x around inf 70.0%
fma-def70.0%
Simplified70.0%
if 4.9999999999999999e144 < t Initial program 4.7%
associate-/l*4.7%
fma-neg4.7%
remove-double-neg4.7%
fma-neg4.7%
sub-neg4.7%
metadata-eval4.7%
remove-double-neg4.7%
fma-def4.7%
Simplified4.7%
Taylor expanded in l around 0 98.1%
+-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
+-commutative98.1%
Simplified98.1%
Final simplification83.9%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (fma t t (/ t (/ x t)))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -1.65e+144)
(- -1.0 (/ -1.0 x))
(if (<= t -6e-165)
t_1
(if (<= t 2.25e-225)
(*
(sqrt 2.0)
(/
t
(* l (sqrt (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))))))
(if (<= t 1.26e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 5e+147)
t_1
(/
(sqrt 2.0)
(* (sqrt 2.0) (sqrt (/ (+ 1.0 x) (+ x -1.0))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * fma(t, t, (t / (x / t)))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -1.65e+144) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -6e-165) {
tmp = t_1;
} else if (t <= 2.25e-225) {
tmp = sqrt(2.0) * (t / (l * sqrt((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 5e+147) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * fma(t, t, Float64(t / Float64(x / t)))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -1.65e+144) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= -6e-165) tmp = t_1; elseif (t <= 2.25e-225) tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 1.26e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 5e+147) tmp = t_1; else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t * t + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+144], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-165], t$95$1, If[LessEqual[t, 2.25e-225], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+147], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \mathsf{fma}\left(t, t, \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+144}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-225}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x + -1}}}\\
\end{array}
\end{array}
if t < -1.65e144Initial program 2.4%
associate-*r/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Applied egg-rr91.9%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 97.9%
if -1.65e144 < t < -5.99999999999999958e-165 or 1.26e-155 < t < 5.0000000000000002e147Initial program 53.2%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in x around inf 76.5%
associate--l+76.5%
unpow276.5%
distribute-lft-out76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
unpow276.5%
associate-*l*76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in t around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
unpow276.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
pow1/276.0%
associate-/l*76.0%
+-commutative76.0%
fma-def76.0%
associate-/l*76.0%
associate-/l*86.6%
Applied egg-rr86.6%
if -5.99999999999999958e-165 < t < 2.25e-225Initial program 4.1%
associate-*r/4.1%
fma-neg4.1%
sub-neg4.1%
metadata-eval4.1%
+-commutative4.1%
fma-def4.1%
distribute-rgt-neg-in4.1%
Simplified4.1%
Taylor expanded in l around inf 6.9%
*-commutative6.9%
associate--l+7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
Simplified7.0%
Taylor expanded in x around inf 45.5%
associate-+r+45.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
Simplified45.5%
if 2.25e-225 < t < 1.26e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 5.0000000000000002e147 < t Initial program 4.7%
associate-/l*4.7%
fma-neg4.7%
remove-double-neg4.7%
fma-neg4.7%
sub-neg4.7%
metadata-eval4.7%
remove-double-neg4.7%
fma-def4.7%
Simplified4.7%
Taylor expanded in l around 0 98.1%
+-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
+-commutative98.1%
Simplified98.1%
Final simplification83.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x)))))))))
(if (<= t -2e+149)
(- -1.0 (/ -1.0 x))
(if (<= t -9.2e-166)
t_1
(if (<= t 2.1e-225)
(*
(sqrt 2.0)
(/
t
(* l (sqrt (+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))))))
(if (<= t 1.26e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 5e+144)
t_1
(/
(sqrt 2.0)
(* (sqrt 2.0) (sqrt (/ (+ 1.0 x) (+ x -1.0))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -2e+149) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -9.2e-166) {
tmp = t_1;
} else if (t <= 2.1e-225) {
tmp = sqrt(2.0) * (t / (l * sqrt((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 5e+144) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
if (t <= (-2d+149)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= (-9.2d-166)) then
tmp = t_1
else if (t <= 2.1d-225) then
tmp = sqrt(2.0d0) * (t / (l * sqrt((((2.0d0 / x) + (2.0d0 / (x ** 3.0d0))) + (2.0d0 / (x * x))))))
else if (t <= 1.26d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 5d+144) then
tmp = t_1
else
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * sqrt(((1.0d0 + x) / (x + (-1.0d0)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -2e+149) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -9.2e-166) {
tmp = t_1;
} else if (t <= 2.1e-225) {
tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt((((2.0 / x) + (2.0 / Math.pow(x, 3.0))) + (2.0 / (x * x))))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 5e+144) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * Math.sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))) tmp = 0 if t <= -2e+149: tmp = -1.0 - (-1.0 / x) elif t <= -9.2e-166: tmp = t_1 elif t <= 2.1e-225: tmp = math.sqrt(2.0) * (t / (l * math.sqrt((((2.0 / x) + (2.0 / math.pow(x, 3.0))) + (2.0 / (x * x)))))) elif t <= 1.26e-155: tmp = 1.0 + (-1.0 / x) elif t <= 5e+144: tmp = t_1 else: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * math.sqrt(((1.0 + x) / (x + -1.0)))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -2e+149) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= -9.2e-166) tmp = t_1; elseif (t <= 2.1e-225) tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 1.26e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 5e+144) tmp = t_1; else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))); tmp = 0.0; if (t <= -2e+149) tmp = -1.0 - (-1.0 / x); elseif (t <= -9.2e-166) tmp = t_1; elseif (t <= 2.1e-225) tmp = sqrt(2.0) * (t / (l * sqrt((((2.0 / x) + (2.0 / (x ^ 3.0))) + (2.0 / (x * x)))))); elseif (t <= 1.26e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 5e+144) tmp = t_1; else tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+149], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-166], t$95$1, If[LessEqual[t, 2.1e-225], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+144], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{+149}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-166}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-225}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.0000000000000001e149Initial program 2.4%
associate-*r/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Applied egg-rr91.9%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 97.9%
if -2.0000000000000001e149 < t < -9.19999999999999995e-166 or 1.26e-155 < t < 4.9999999999999999e144Initial program 53.2%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in x around inf 76.5%
associate--l+76.5%
unpow276.5%
distribute-lft-out76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
unpow276.5%
associate-*l*76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in t around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
unpow276.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
expm1-log1p-u72.8%
expm1-udef49.8%
Applied egg-rr59.4%
expm1-def82.5%
expm1-log1p86.6%
+-commutative86.6%
sub-neg86.6%
associate-+l+86.6%
fma-udef86.6%
associate-/r/86.6%
distribute-rgt-out86.6%
Simplified86.5%
if -9.19999999999999995e-166 < t < 2.1e-225Initial program 4.1%
associate-*r/4.1%
fma-neg4.1%
sub-neg4.1%
metadata-eval4.1%
+-commutative4.1%
fma-def4.1%
distribute-rgt-neg-in4.1%
Simplified4.1%
Taylor expanded in l around inf 6.9%
*-commutative6.9%
associate--l+7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
Simplified7.0%
Taylor expanded in x around inf 45.5%
associate-+r+45.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
Simplified45.5%
if 2.1e-225 < t < 1.26e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 4.9999999999999999e144 < t Initial program 4.7%
associate-/l*4.7%
fma-neg4.7%
remove-double-neg4.7%
fma-neg4.7%
sub-neg4.7%
metadata-eval4.7%
remove-double-neg4.7%
fma-def4.7%
Simplified4.7%
Taylor expanded in l around 0 98.1%
+-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
+-commutative98.1%
Simplified98.1%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x)))))))))
(if (<= t -5e+142)
(- -1.0 (/ -1.0 x))
(if (<= t -1.3e-162)
t_1
(if (<= t 1.22e-226)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(if (<= t 1.26e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 9.2e+145)
t_1
(/
(sqrt 2.0)
(* (sqrt 2.0) (sqrt (/ (+ 1.0 x) (+ x -1.0))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -5e+142) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -1.3e-162) {
tmp = t_1;
} else if (t <= 1.22e-226) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 9.2e+145) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
if (t <= (-5d+142)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= (-1.3d-162)) then
tmp = t_1
else if (t <= 1.22d-226) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x)))))
else if (t <= 1.26d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 9.2d+145) then
tmp = t_1
else
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * sqrt(((1.0d0 + x) / (x + (-1.0d0)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -5e+142) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -1.3e-162) {
tmp = t_1;
} else if (t <= 1.22e-226) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 9.2e+145) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * Math.sqrt(((1.0 + x) / (x + -1.0))));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))) tmp = 0 if t <= -5e+142: tmp = -1.0 - (-1.0 / x) elif t <= -1.3e-162: tmp = t_1 elif t <= 1.22e-226: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))) elif t <= 1.26e-155: tmp = 1.0 + (-1.0 / x) elif t <= 9.2e+145: tmp = t_1 else: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * math.sqrt(((1.0 + x) / (x + -1.0)))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -5e+142) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= -1.3e-162) tmp = t_1; elseif (t <= 1.22e-226) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); elseif (t <= 1.26e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 9.2e+145) tmp = t_1; else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))); tmp = 0.0; if (t <= -5e+142) tmp = -1.0 - (-1.0 / x); elseif (t <= -1.3e-162) tmp = t_1; elseif (t <= 1.22e-226) tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))); elseif (t <= 1.26e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 9.2e+145) tmp = t_1; else tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((1.0 + x) / (x + -1.0)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+142], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e-162], t$95$1, If[LessEqual[t, 1.22e-226], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e+145], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+142}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-226}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{1 + x}{x + -1}}}\\
\end{array}
\end{array}
if t < -5.0000000000000001e142Initial program 2.4%
associate-*r/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Applied egg-rr91.9%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 97.9%
if -5.0000000000000001e142 < t < -1.3e-162 or 1.26e-155 < t < 9.2e145Initial program 53.2%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in x around inf 76.5%
associate--l+76.5%
unpow276.5%
distribute-lft-out76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
unpow276.5%
associate-*l*76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in t around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
unpow276.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
expm1-log1p-u72.8%
expm1-udef49.8%
Applied egg-rr59.4%
expm1-def82.5%
expm1-log1p86.6%
+-commutative86.6%
sub-neg86.6%
associate-+l+86.6%
fma-udef86.6%
associate-/r/86.6%
distribute-rgt-out86.6%
Simplified86.5%
if -1.3e-162 < t < 1.22e-226Initial program 4.1%
associate-*r/4.1%
fma-neg4.1%
sub-neg4.1%
metadata-eval4.1%
+-commutative4.1%
fma-def4.1%
distribute-rgt-neg-in4.1%
Simplified4.1%
Taylor expanded in l around inf 6.9%
*-commutative6.9%
associate--l+7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
Simplified7.0%
Taylor expanded in x around inf 45.2%
associate-*r/45.2%
metadata-eval45.2%
unpow245.2%
associate-*r/45.2%
metadata-eval45.2%
Simplified45.2%
associate-*r/45.2%
Applied egg-rr45.2%
if 1.22e-226 < t < 1.26e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 9.2e145 < t Initial program 4.7%
associate-/l*4.7%
fma-neg4.7%
remove-double-neg4.7%
fma-neg4.7%
sub-neg4.7%
metadata-eval4.7%
remove-double-neg4.7%
fma-def4.7%
Simplified4.7%
Taylor expanded in l around 0 98.1%
+-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
+-commutative98.1%
Simplified98.1%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x)))))))))
(if (<= t -6.1e+141)
(- -1.0 (/ -1.0 x))
(if (<= t -3.1e-163)
t_1
(if (<= t 6.4e-228)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(if (<= t 1.26e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 4.7e+145) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -6.1e+141) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -3.1e-163) {
tmp = t_1;
} else if (t <= 6.4e-228) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 4.7e+145) {
tmp = t_1;
} else {
tmp = sqrt(((x + -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) :: t_1
real(8) :: tmp
t_1 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
if (t <= (-6.1d+141)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= (-3.1d-163)) then
tmp = t_1
else if (t <= 6.4d-228) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x)))))
else if (t <= 1.26d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 4.7d+145) then
tmp = t_1
else
tmp = sqrt(((x + (-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 t_1 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -6.1e+141) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= -3.1e-163) {
tmp = t_1;
} else if (t <= 6.4e-228) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 1.26e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 4.7e+145) {
tmp = t_1;
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))) tmp = 0 if t <= -6.1e+141: tmp = -1.0 - (-1.0 / x) elif t <= -3.1e-163: tmp = t_1 elif t <= 6.4e-228: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))) elif t <= 1.26e-155: tmp = 1.0 + (-1.0 / x) elif t <= 4.7e+145: tmp = t_1 else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -6.1e+141) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= -3.1e-163) tmp = t_1; elseif (t <= 6.4e-228) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); elseif (t <= 1.26e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 4.7e+145) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))); tmp = 0.0; if (t <= -6.1e+141) tmp = -1.0 - (-1.0 / x); elseif (t <= -3.1e-163) tmp = t_1; elseif (t <= 6.4e-228) tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))); elseif (t <= 1.26e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 4.7e+145) tmp = t_1; else tmp = sqrt(((x + -1.0) / (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[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.1e+141], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-163], t$95$1, If[LessEqual[t, 6.4e-228], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+145], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{+141}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-228}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -6.09999999999999992e141Initial program 2.4%
associate-*r/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Applied egg-rr91.9%
Taylor expanded in t around -inf 97.9%
mul-1-neg97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in x around inf 97.9%
if -6.09999999999999992e141 < t < -3.09999999999999975e-163 or 1.26e-155 < t < 4.7000000000000002e145Initial program 53.2%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in x around inf 76.5%
associate--l+76.5%
unpow276.5%
distribute-lft-out76.5%
unpow276.5%
unpow276.5%
associate-*r/76.5%
mul-1-neg76.5%
+-commutative76.5%
unpow276.5%
associate-*l*76.5%
unpow276.5%
fma-udef76.5%
Simplified76.5%
Taylor expanded in t around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
unpow276.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
expm1-log1p-u72.8%
expm1-udef49.8%
Applied egg-rr59.4%
expm1-def82.5%
expm1-log1p86.6%
+-commutative86.6%
sub-neg86.6%
associate-+l+86.6%
fma-udef86.6%
associate-/r/86.6%
distribute-rgt-out86.6%
Simplified86.5%
if -3.09999999999999975e-163 < t < 6.40000000000000044e-228Initial program 4.1%
associate-*r/4.1%
fma-neg4.1%
sub-neg4.1%
metadata-eval4.1%
+-commutative4.1%
fma-def4.1%
distribute-rgt-neg-in4.1%
Simplified4.1%
Taylor expanded in l around inf 6.9%
*-commutative6.9%
associate--l+7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
sub-neg7.0%
metadata-eval7.0%
+-commutative7.0%
Simplified7.0%
Taylor expanded in x around inf 45.2%
associate-*r/45.2%
metadata-eval45.2%
unpow245.2%
associate-*r/45.2%
metadata-eval45.2%
Simplified45.2%
associate-*r/45.2%
Applied egg-rr45.2%
if 6.40000000000000044e-228 < t < 1.26e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 4.7000000000000002e145 < t Initial program 4.7%
associate-*r/4.7%
fma-neg4.7%
sub-neg4.7%
metadata-eval4.7%
+-commutative4.7%
fma-def4.7%
distribute-rgt-neg-in4.7%
Simplified4.7%
Applied egg-rr96.2%
Taylor expanded in l around 0 98.1%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) (/ t (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))))
(t_2 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -8.8e-66)
(- t_2)
(if (<= t -1.95e-90)
t_1
(if (<= t -1.65e-159)
(- -1.0 (/ -1.0 x))
(if (<= t 2.25e-225)
t_1
(if (<= t 2.5e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 1.16e-67) t_1 t_2))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
double t_2 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -8.8e-66) {
tmp = -t_2;
} else if (t <= -1.95e-90) {
tmp = t_1;
} else if (t <= -1.65e-159) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 2.25e-225) {
tmp = t_1;
} else if (t <= 2.5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 1.16e-67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt(2.0d0) * (t / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
t_2 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-8.8d-66)) then
tmp = -t_2
else if (t <= (-1.95d-90)) then
tmp = t_1
else if (t <= (-1.65d-159)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= 2.25d-225) then
tmp = t_1
else if (t <= 2.5d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 1.16d-67) then
tmp = t_1
else
tmp = t_2
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(2.0) * (t / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
double t_2 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -8.8e-66) {
tmp = -t_2;
} else if (t <= -1.95e-90) {
tmp = t_1;
} else if (t <= -1.65e-159) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 2.25e-225) {
tmp = t_1;
} else if (t <= 2.5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 1.16e-67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) * (t / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) t_2 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -8.8e-66: tmp = -t_2 elif t <= -1.95e-90: tmp = t_1 elif t <= -1.65e-159: tmp = -1.0 - (-1.0 / x) elif t <= 2.25e-225: tmp = t_1 elif t <= 2.5e-155: tmp = 1.0 + (-1.0 / x) elif t <= 1.16e-67: tmp = t_1 else: tmp = t_2 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -8.8e-66) tmp = Float64(-t_2); elseif (t <= -1.95e-90) tmp = t_1; elseif (t <= -1.65e-159) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= 2.25e-225) tmp = t_1; elseif (t <= 2.5e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 1.16e-67) tmp = t_1; else tmp = t_2; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) * (t / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); t_2 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -8.8e-66) tmp = -t_2; elseif (t <= -1.95e-90) tmp = t_1; elseif (t <= -1.65e-159) tmp = -1.0 - (-1.0 / x); elseif (t <= 2.25e-225) tmp = t_1; elseif (t <= 2.5e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 1.16e-67) tmp = t_1; else tmp = t_2; end tmp_2 = 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] * N[(t / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8.8e-66], (-t$95$2), If[LessEqual[t, -1.95e-90], t$95$1, If[LessEqual[t, -1.65e-159], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-225], t$95$1, If[LessEqual[t, 2.5e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e-67], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
t_2 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{-66}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-159}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-225}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -8.8000000000000004e-66Initial program 25.1%
associate-*r/25.0%
fma-neg25.0%
sub-neg25.0%
metadata-eval25.0%
+-commutative25.0%
fma-def25.0%
distribute-rgt-neg-in25.0%
Simplified25.0%
Applied egg-rr78.3%
Taylor expanded in t around -inf 90.1%
mul-1-neg90.1%
sub-neg90.1%
metadata-eval90.1%
+-commutative90.1%
Simplified90.1%
if -8.8000000000000004e-66 < t < -1.95000000000000002e-90 or -1.6500000000000001e-159 < t < 2.25e-225 or 2.4999999999999999e-155 < t < 1.16e-67Initial program 8.3%
associate-*r/8.3%
fma-neg8.3%
sub-neg8.3%
metadata-eval8.3%
+-commutative8.3%
fma-def8.3%
distribute-rgt-neg-in8.3%
Simplified8.3%
Taylor expanded in l around inf 5.3%
*-commutative5.3%
associate--l+5.4%
sub-neg5.4%
metadata-eval5.4%
+-commutative5.4%
sub-neg5.4%
metadata-eval5.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in x around inf 43.9%
associate-*r/43.9%
metadata-eval43.9%
unpow243.9%
associate-*r/43.9%
metadata-eval43.9%
Simplified43.9%
if -1.95000000000000002e-90 < t < -1.6500000000000001e-159Initial program 36.2%
associate-*r/36.2%
fma-neg36.2%
sub-neg36.2%
metadata-eval36.2%
+-commutative36.2%
fma-def36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Applied egg-rr50.3%
Taylor expanded in t around -inf 68.3%
mul-1-neg68.3%
sub-neg68.3%
metadata-eval68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in x around inf 68.3%
if 2.25e-225 < t < 2.4999999999999999e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 1.16e-67 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification77.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(t_2 (/ (* t (sqrt 2.0)) t_1))
(t_3 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -9.2e-66)
(- t_3)
(if (<= t -1.82e-90)
(* (sqrt 2.0) (/ t t_1))
(if (<= t -1.7e-160)
(- -1.0 (/ -1.0 x))
(if (<= t 1.22e-226)
t_2
(if (<= t 9.2e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 8e-68) t_2 t_3))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = l * sqrt(((2.0 / x) + (2.0 / (x * x))));
double t_2 = (t * sqrt(2.0)) / t_1;
double t_3 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -9.2e-66) {
tmp = -t_3;
} else if (t <= -1.82e-90) {
tmp = sqrt(2.0) * (t / t_1);
} else if (t <= -1.7e-160) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 1.22e-226) {
tmp = t_2;
} else if (t <= 9.2e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 8e-68) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))
t_2 = (t * sqrt(2.0d0)) / t_1
t_3 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-9.2d-66)) then
tmp = -t_3
else if (t <= (-1.82d-90)) then
tmp = sqrt(2.0d0) * (t / t_1)
else if (t <= (-1.7d-160)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= 1.22d-226) then
tmp = t_2
else if (t <= 9.2d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 8d-68) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))));
double t_2 = (t * Math.sqrt(2.0)) / t_1;
double t_3 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -9.2e-66) {
tmp = -t_3;
} else if (t <= -1.82e-90) {
tmp = Math.sqrt(2.0) * (t / t_1);
} else if (t <= -1.7e-160) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 1.22e-226) {
tmp = t_2;
} else if (t <= 9.2e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 8e-68) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))) t_2 = (t * math.sqrt(2.0)) / t_1 t_3 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -9.2e-66: tmp = -t_3 elif t <= -1.82e-90: tmp = math.sqrt(2.0) * (t / t_1) elif t <= -1.7e-160: tmp = -1.0 - (-1.0 / x) elif t <= 1.22e-226: tmp = t_2 elif t <= 9.2e-155: tmp = 1.0 + (-1.0 / x) elif t <= 8e-68: tmp = t_2 else: tmp = t_3 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))) t_2 = Float64(Float64(t * sqrt(2.0)) / t_1) t_3 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -9.2e-66) tmp = Float64(-t_3); elseif (t <= -1.82e-90) tmp = Float64(sqrt(2.0) * Float64(t / t_1)); elseif (t <= -1.7e-160) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= 1.22e-226) tmp = t_2; elseif (t <= 9.2e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 8e-68) tmp = t_2; else tmp = t_3; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = l * sqrt(((2.0 / x) + (2.0 / (x * x)))); t_2 = (t * sqrt(2.0)) / t_1; t_3 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -9.2e-66) tmp = -t_3; elseif (t <= -1.82e-90) tmp = sqrt(2.0) * (t / t_1); elseif (t <= -1.7e-160) tmp = -1.0 - (-1.0 / x); elseif (t <= 1.22e-226) tmp = t_2; elseif (t <= 9.2e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 8e-68) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -9.2e-66], (-t$95$3), If[LessEqual[t, -1.82e-90], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-160], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-226], t$95$2, If[LessEqual[t, 9.2e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-68], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}\\
t_2 := \frac{t \cdot \sqrt{2}}{t_1}\\
t_3 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-66}:\\
\;\;\;\;-t_3\\
\mathbf{elif}\;t \leq -1.82 \cdot 10^{-90}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{t_1}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-160}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-68}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -9.19999999999999967e-66Initial program 25.1%
associate-*r/25.0%
fma-neg25.0%
sub-neg25.0%
metadata-eval25.0%
+-commutative25.0%
fma-def25.0%
distribute-rgt-neg-in25.0%
Simplified25.0%
Applied egg-rr78.3%
Taylor expanded in t around -inf 90.1%
mul-1-neg90.1%
sub-neg90.1%
metadata-eval90.1%
+-commutative90.1%
Simplified90.1%
if -9.19999999999999967e-66 < t < -1.8199999999999999e-90Initial program 19.6%
associate-*r/19.6%
fma-neg19.4%
sub-neg19.4%
metadata-eval19.4%
+-commutative19.4%
fma-def19.4%
distribute-rgt-neg-in19.4%
Simplified19.4%
Taylor expanded in l around inf 1.7%
*-commutative1.7%
associate--l+1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around inf 40.7%
associate-*r/40.7%
metadata-eval40.7%
unpow240.7%
associate-*r/40.7%
metadata-eval40.7%
Simplified40.7%
if -1.8199999999999999e-90 < t < -1.70000000000000011e-160Initial program 36.2%
associate-*r/36.2%
fma-neg36.2%
sub-neg36.2%
metadata-eval36.2%
+-commutative36.2%
fma-def36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Applied egg-rr50.3%
Taylor expanded in t around -inf 68.3%
mul-1-neg68.3%
sub-neg68.3%
metadata-eval68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in x around inf 68.3%
if -1.70000000000000011e-160 < t < 1.22e-226 or 9.20000000000000021e-155 < t < 8.00000000000000053e-68Initial program 7.2%
associate-*r/7.2%
fma-neg7.2%
sub-neg7.2%
metadata-eval7.2%
+-commutative7.2%
fma-def7.2%
distribute-rgt-neg-in7.2%
Simplified7.2%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.7%
sub-neg5.7%
metadata-eval5.7%
+-commutative5.7%
sub-neg5.7%
metadata-eval5.7%
+-commutative5.7%
Simplified5.7%
Taylor expanded in x around inf 44.2%
associate-*r/44.2%
metadata-eval44.2%
unpow244.2%
associate-*r/44.2%
metadata-eval44.2%
Simplified44.2%
associate-*r/44.3%
Applied egg-rr44.3%
if 1.22e-226 < t < 9.20000000000000021e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 8.00000000000000053e-68 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification77.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(t_2 (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))
(t_3 (/ (* t (sqrt 2.0)) (* l t_2))))
(if (<= t -6.2e-59)
(- t_1)
(if (<= t -2.3e-89)
(/ (/ (sqrt 2.0) (/ l t)) t_2)
(if (<= t -1.05e-159)
(- -1.0 (/ -1.0 x))
(if (<= t 2.25e-225)
t_3
(if (<= t 2.85e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 2.5e-68) t_3 t_1))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double t_2 = sqrt(((2.0 / x) + (2.0 / (x * x))));
double t_3 = (t * sqrt(2.0)) / (l * t_2);
double tmp;
if (t <= -6.2e-59) {
tmp = -t_1;
} else if (t <= -2.3e-89) {
tmp = (sqrt(2.0) / (l / t)) / t_2;
} else if (t <= -1.05e-159) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 2.25e-225) {
tmp = t_3;
} else if (t <= 2.85e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 2.5e-68) {
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)) / (1.0d0 + x)))
t_2 = sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))
t_3 = (t * sqrt(2.0d0)) / (l * t_2)
if (t <= (-6.2d-59)) then
tmp = -t_1
else if (t <= (-2.3d-89)) then
tmp = (sqrt(2.0d0) / (l / t)) / t_2
else if (t <= (-1.05d-159)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else if (t <= 2.25d-225) then
tmp = t_3
else if (t <= 2.85d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 2.5d-68) 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) / (1.0 + x)));
double t_2 = Math.sqrt(((2.0 / x) + (2.0 / (x * x))));
double t_3 = (t * Math.sqrt(2.0)) / (l * t_2);
double tmp;
if (t <= -6.2e-59) {
tmp = -t_1;
} else if (t <= -2.3e-89) {
tmp = (Math.sqrt(2.0) / (l / t)) / t_2;
} else if (t <= -1.05e-159) {
tmp = -1.0 - (-1.0 / x);
} else if (t <= 2.25e-225) {
tmp = t_3;
} else if (t <= 2.85e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 2.5e-68) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) t_2 = math.sqrt(((2.0 / x) + (2.0 / (x * x)))) t_3 = (t * math.sqrt(2.0)) / (l * t_2) tmp = 0 if t <= -6.2e-59: tmp = -t_1 elif t <= -2.3e-89: tmp = (math.sqrt(2.0) / (l / t)) / t_2 elif t <= -1.05e-159: tmp = -1.0 - (-1.0 / x) elif t <= 2.25e-225: tmp = t_3 elif t <= 2.85e-155: tmp = 1.0 + (-1.0 / x) elif t <= 2.5e-68: 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(1.0 + x))) t_2 = sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))) t_3 = Float64(Float64(t * sqrt(2.0)) / Float64(l * t_2)) tmp = 0.0 if (t <= -6.2e-59) tmp = Float64(-t_1); elseif (t <= -2.3e-89) tmp = Float64(Float64(sqrt(2.0) / Float64(l / t)) / t_2); elseif (t <= -1.05e-159) tmp = Float64(-1.0 - Float64(-1.0 / x)); elseif (t <= 2.25e-225) tmp = t_3; elseif (t <= 2.85e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 2.5e-68) 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) / (1.0 + x))); t_2 = sqrt(((2.0 / x) + (2.0 / (x * x)))); t_3 = (t * sqrt(2.0)) / (l * t_2); tmp = 0.0; if (t <= -6.2e-59) tmp = -t_1; elseif (t <= -2.3e-89) tmp = (sqrt(2.0) / (l / t)) / t_2; elseif (t <= -1.05e-159) tmp = -1.0 - (-1.0 / x); elseif (t <= 2.25e-225) tmp = t_3; elseif (t <= 2.85e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 2.5e-68) 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[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-59], (-t$95$1), If[LessEqual[t, -2.3e-89], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t, -1.05e-159], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-225], t$95$3, If[LessEqual[t, 2.85e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-68], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
t_2 := \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}\\
t_3 := \frac{t \cdot \sqrt{2}}{\ell \cdot t_2}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-59}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-89}:\\
\;\;\;\;\frac{\frac{\sqrt{2}}{\frac{\ell}{t}}}{t_2}\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-159}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-225}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-68}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.19999999999999998e-59Initial program 25.1%
associate-*r/25.0%
fma-neg25.0%
sub-neg25.0%
metadata-eval25.0%
+-commutative25.0%
fma-def25.0%
distribute-rgt-neg-in25.0%
Simplified25.0%
Applied egg-rr78.3%
Taylor expanded in t around -inf 90.1%
mul-1-neg90.1%
sub-neg90.1%
metadata-eval90.1%
+-commutative90.1%
Simplified90.1%
if -6.19999999999999998e-59 < t < -2.3e-89Initial program 19.6%
associate-*r/19.6%
fma-neg19.4%
sub-neg19.4%
metadata-eval19.4%
+-commutative19.4%
fma-def19.4%
distribute-rgt-neg-in19.4%
Simplified19.4%
Taylor expanded in l around inf 1.7%
*-commutative1.7%
associate--l+1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
associate-*r/1.7%
*-commutative1.7%
+-commutative1.7%
metadata-eval1.7%
sub-neg1.7%
sub-neg1.7%
+-commutative1.7%
metadata-eval1.7%
sub-neg1.7%
metadata-eval1.7%
Applied egg-rr1.7%
associate-/r*1.7%
*-commutative1.7%
associate-/l*1.7%
associate-+r+1.7%
metadata-eval1.7%
sub-neg1.7%
associate--l+1.7%
sub-neg1.7%
metadata-eval1.7%
sub-neg1.7%
metadata-eval1.7%
sub-neg1.7%
metadata-eval1.7%
Simplified1.7%
Taylor expanded in x around inf 40.7%
+-commutative40.7%
associate-*r/40.7%
metadata-eval40.7%
associate-*r/40.7%
metadata-eval40.7%
unpow240.7%
Simplified40.7%
if -2.3e-89 < t < -1.05e-159Initial program 36.2%
associate-*r/36.2%
fma-neg36.2%
sub-neg36.2%
metadata-eval36.2%
+-commutative36.2%
fma-def36.2%
distribute-rgt-neg-in36.2%
Simplified36.2%
Applied egg-rr50.3%
Taylor expanded in t around -inf 68.3%
mul-1-neg68.3%
sub-neg68.3%
metadata-eval68.3%
+-commutative68.3%
Simplified68.3%
Taylor expanded in x around inf 68.3%
if -1.05e-159 < t < 2.25e-225 or 2.84999999999999982e-155 < t < 2.49999999999999986e-68Initial program 7.2%
associate-*r/7.2%
fma-neg7.2%
sub-neg7.2%
metadata-eval7.2%
+-commutative7.2%
fma-def7.2%
distribute-rgt-neg-in7.2%
Simplified7.2%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.7%
sub-neg5.7%
metadata-eval5.7%
+-commutative5.7%
sub-neg5.7%
metadata-eval5.7%
+-commutative5.7%
Simplified5.7%
Taylor expanded in x around inf 44.2%
associate-*r/44.2%
metadata-eval44.2%
unpow244.2%
associate-*r/44.2%
metadata-eval44.2%
Simplified44.2%
associate-*r/44.3%
Applied egg-rr44.3%
if 2.25e-225 < t < 2.84999999999999982e-155Initial program 8.4%
associate-*r/8.4%
fma-neg8.4%
sub-neg8.4%
metadata-eval8.4%
+-commutative8.4%
fma-def8.4%
distribute-rgt-neg-in8.4%
Simplified8.4%
Taylor expanded in t around inf 11.7%
Taylor expanded in x around inf 66.3%
if 2.49999999999999986e-68 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification77.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l))))
(if (<= t -2e-159)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (<= t 2.8e-233)
t_1
(if (<= t 2.08e-153)
(+ 1.0 (/ -1.0 x))
(if (<= t 2.25e-66) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double tmp;
if (t <= -2e-159) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.8e-233) {
tmp = t_1;
} else if (t <= 2.08e-153) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 2.25e-66) {
tmp = t_1;
} else {
tmp = sqrt(((x + -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) :: t_1
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
if (t <= (-2d-159)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 2.8d-233) then
tmp = t_1
else if (t <= 2.08d-153) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 2.25d-66) then
tmp = t_1
else
tmp = sqrt(((x + (-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 t_1 = t * (Math.sqrt(x) / l);
double tmp;
if (t <= -2e-159) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.8e-233) {
tmp = t_1;
} else if (t <= 2.08e-153) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 2.25e-66) {
tmp = t_1;
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) tmp = 0 if t <= -2e-159: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 2.8e-233: tmp = t_1 elif t <= 2.08e-153: tmp = 1.0 + (-1.0 / x) elif t <= 2.25e-66: tmp = t_1 else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) tmp = 0.0 if (t <= -2e-159) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 2.8e-233) tmp = t_1; elseif (t <= 2.08e-153) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 2.25e-66) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); tmp = 0.0; if (t <= -2e-159) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 2.8e-233) tmp = t_1; elseif (t <= 2.08e-153) tmp = 1.0 + (-1.0 / x); elseif (t <= 2.25e-66) tmp = t_1; else tmp = sqrt(((x + -1.0) / (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[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-159], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-233], t$95$1, If[LessEqual[t, 2.08e-153], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-66], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-159}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-233}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.08 \cdot 10^{-153}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.99999999999999998e-159Initial program 26.1%
associate-*r/26.1%
fma-neg26.1%
sub-neg26.1%
metadata-eval26.1%
+-commutative26.1%
fma-def26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
Applied egg-rr71.1%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 82.8%
sub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
distribute-neg-frac82.8%
metadata-eval82.8%
Simplified82.8%
if -1.99999999999999998e-159 < t < 2.8000000000000001e-233 or 2.08e-153 < t < 2.2499999999999999e-66Initial program 7.5%
associate-*l/7.5%
Simplified7.5%
Taylor expanded in x around inf 65.6%
associate--l+65.6%
unpow265.6%
distribute-lft-out65.6%
unpow265.6%
unpow265.6%
associate-*r/65.6%
mul-1-neg65.6%
+-commutative65.6%
unpow265.6%
associate-*l*65.6%
unpow265.6%
fma-udef65.6%
Simplified65.6%
Taylor expanded in l around inf 43.9%
Taylor expanded in l around 0 43.8%
associate-*l/43.8%
*-lft-identity43.8%
Simplified43.8%
if 2.8000000000000001e-233 < t < 2.08e-153Initial program 7.7%
associate-*r/7.7%
fma-neg7.7%
sub-neg7.7%
metadata-eval7.7%
+-commutative7.7%
fma-def7.7%
distribute-rgt-neg-in7.7%
Simplified7.7%
Taylor expanded in t around inf 10.7%
Taylor expanded in x around inf 64.8%
if 2.2499999999999999e-66 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification76.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.15e-161)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (<= t 2.8e-233)
(* t (* (/ 1.0 l) (sqrt x)))
(if (<= t 5e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 6e-66)
(* t (/ (sqrt x) l))
(sqrt (/ (+ x -1.0) (+ 1.0 x))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.15e-161) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.8e-233) {
tmp = t * ((1.0 / l) * sqrt(x));
} else if (t <= 5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 6e-66) {
tmp = t * (sqrt(x) / l);
} else {
tmp = sqrt(((x + -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 <= (-1.15d-161)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 2.8d-233) then
tmp = t * ((1.0d0 / l) * sqrt(x))
else if (t <= 5d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 6d-66) then
tmp = t * (sqrt(x) / l)
else
tmp = sqrt(((x + (-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 <= -1.15e-161) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.8e-233) {
tmp = t * ((1.0 / l) * Math.sqrt(x));
} else if (t <= 5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 6e-66) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.15e-161: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 2.8e-233: tmp = t * ((1.0 / l) * math.sqrt(x)) elif t <= 5e-155: tmp = 1.0 + (-1.0 / x) elif t <= 6e-66: tmp = t * (math.sqrt(x) / l) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.15e-161) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 2.8e-233) tmp = Float64(t * Float64(Float64(1.0 / l) * sqrt(x))); elseif (t <= 5e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 6e-66) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = sqrt(Float64(Float64(x + -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 <= -1.15e-161) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 2.8e-233) tmp = t * ((1.0 / l) * sqrt(x)); elseif (t <= 5e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 6e-66) tmp = t * (sqrt(x) / l); else tmp = sqrt(((x + -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, -1.15e-161], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-233], N[(t * N[(N[(1.0 / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-66], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-233}:\\
\;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-66}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.15e-161Initial program 26.1%
associate-*r/26.1%
fma-neg26.1%
sub-neg26.1%
metadata-eval26.1%
+-commutative26.1%
fma-def26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
Applied egg-rr71.1%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 82.8%
sub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
distribute-neg-frac82.8%
metadata-eval82.8%
Simplified82.8%
if -1.15e-161 < t < 2.8000000000000001e-233Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in x around inf 61.2%
associate--l+61.2%
unpow261.2%
distribute-lft-out61.2%
unpow261.2%
unpow261.2%
associate-*r/61.2%
mul-1-neg61.2%
+-commutative61.2%
unpow261.2%
associate-*l*61.2%
unpow261.2%
fma-udef61.2%
Simplified61.2%
Taylor expanded in l around inf 44.8%
Taylor expanded in l around 0 44.7%
if 2.8000000000000001e-233 < t < 4.9999999999999999e-155Initial program 7.7%
associate-*r/7.7%
fma-neg7.7%
sub-neg7.7%
metadata-eval7.7%
+-commutative7.7%
fma-def7.7%
distribute-rgt-neg-in7.7%
Simplified7.7%
Taylor expanded in t around inf 10.7%
Taylor expanded in x around inf 64.8%
if 4.9999999999999999e-155 < t < 6.0000000000000004e-66Initial program 14.9%
associate-*l/15.0%
Simplified15.0%
Taylor expanded in x around inf 76.1%
associate--l+76.1%
unpow276.1%
distribute-lft-out76.1%
unpow276.1%
unpow276.1%
associate-*r/76.1%
mul-1-neg76.1%
+-commutative76.1%
unpow276.1%
associate-*l*76.1%
unpow276.1%
fma-udef76.1%
Simplified76.1%
Taylor expanded in l around inf 41.8%
Taylor expanded in l around 0 41.8%
associate-*l/41.8%
*-lft-identity41.8%
Simplified41.8%
if 6.0000000000000004e-66 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification76.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.22e-163)
(- t_1)
(if (<= t 1.95e-233)
(* t (* (/ 1.0 l) (sqrt x)))
(if (<= t 3.6e-153)
(+ 1.0 (/ -1.0 x))
(if (<= t 1.6e-66) (* t (/ (sqrt x) l)) t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.22e-163) {
tmp = -t_1;
} else if (t <= 1.95e-233) {
tmp = t * ((1.0 / l) * sqrt(x));
} else if (t <= 3.6e-153) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 1.6e-66) {
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)) / (1.0d0 + x)))
if (t <= (-1.22d-163)) then
tmp = -t_1
else if (t <= 1.95d-233) then
tmp = t * ((1.0d0 / l) * sqrt(x))
else if (t <= 3.6d-153) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 1.6d-66) 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) / (1.0 + x)));
double tmp;
if (t <= -1.22e-163) {
tmp = -t_1;
} else if (t <= 1.95e-233) {
tmp = t * ((1.0 / l) * Math.sqrt(x));
} else if (t <= 3.6e-153) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 1.6e-66) {
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) / (1.0 + x))) tmp = 0 if t <= -1.22e-163: tmp = -t_1 elif t <= 1.95e-233: tmp = t * ((1.0 / l) * math.sqrt(x)) elif t <= 3.6e-153: tmp = 1.0 + (-1.0 / x) elif t <= 1.6e-66: 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(1.0 + x))) tmp = 0.0 if (t <= -1.22e-163) tmp = Float64(-t_1); elseif (t <= 1.95e-233) tmp = Float64(t * Float64(Float64(1.0 / l) * sqrt(x))); elseif (t <= 3.6e-153) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 1.6e-66) 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) / (1.0 + x))); tmp = 0.0; if (t <= -1.22e-163) tmp = -t_1; elseif (t <= 1.95e-233) tmp = t * ((1.0 / l) * sqrt(x)); elseif (t <= 3.6e-153) tmp = 1.0 + (-1.0 / x); elseif (t <= 1.6e-66) 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[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.22e-163], (-t$95$1), If[LessEqual[t, 1.95e-233], N[(t * N[(N[(1.0 / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-153], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-66], 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}{1 + x}}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{-163}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-233}:\\
\;\;\;\;t \cdot \left(\frac{1}{\ell} \cdot \sqrt{x}\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-153}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-66}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.22000000000000003e-163Initial program 26.1%
associate-*r/26.1%
fma-neg26.1%
sub-neg26.1%
metadata-eval26.1%
+-commutative26.1%
fma-def26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
Applied egg-rr71.1%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
if -1.22000000000000003e-163 < t < 1.9500000000000001e-233Initial program 4.3%
associate-*l/4.3%
Simplified4.3%
Taylor expanded in x around inf 61.2%
associate--l+61.2%
unpow261.2%
distribute-lft-out61.2%
unpow261.2%
unpow261.2%
associate-*r/61.2%
mul-1-neg61.2%
+-commutative61.2%
unpow261.2%
associate-*l*61.2%
unpow261.2%
fma-udef61.2%
Simplified61.2%
Taylor expanded in l around inf 44.8%
Taylor expanded in l around 0 44.7%
if 1.9500000000000001e-233 < t < 3.5999999999999998e-153Initial program 7.7%
associate-*r/7.7%
fma-neg7.7%
sub-neg7.7%
metadata-eval7.7%
+-commutative7.7%
fma-def7.7%
distribute-rgt-neg-in7.7%
Simplified7.7%
Taylor expanded in t around inf 10.7%
Taylor expanded in x around inf 64.8%
if 3.5999999999999998e-153 < t < 1.59999999999999991e-66Initial program 14.9%
associate-*l/15.0%
Simplified15.0%
Taylor expanded in x around inf 76.1%
associate--l+76.1%
unpow276.1%
distribute-lft-out76.1%
unpow276.1%
unpow276.1%
associate-*r/76.1%
mul-1-neg76.1%
+-commutative76.1%
unpow276.1%
associate-*l*76.1%
unpow276.1%
fma-udef76.1%
Simplified76.1%
Taylor expanded in l around inf 41.8%
Taylor expanded in l around 0 41.8%
associate-*l/41.8%
*-lft-identity41.8%
Simplified41.8%
if 1.59999999999999991e-66 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Applied egg-rr83.8%
Taylor expanded in l around 0 90.5%
Final simplification76.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l))) (t_2 (/ 0.5 (* x x))))
(if (<= t -2.8e-159)
(+ (/ 1.0 x) (- -1.0 t_2))
(if (<= t 2.8e-233)
t_1
(if (<= t 2.5e-155)
(+ 1.0 (/ -1.0 x))
(if (<= t 6.8e-68) t_1 (+ (+ 1.0 t_2) (/ -1.0 x))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double t_2 = 0.5 / (x * x);
double tmp;
if (t <= -2.8e-159) {
tmp = (1.0 / x) + (-1.0 - t_2);
} else if (t <= 2.8e-233) {
tmp = t_1;
} else if (t <= 2.5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 6.8e-68) {
tmp = t_1;
} else {
tmp = (1.0 + t_2) + (-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) :: t_2
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
t_2 = 0.5d0 / (x * x)
if (t <= (-2.8d-159)) then
tmp = (1.0d0 / x) + ((-1.0d0) - t_2)
else if (t <= 2.8d-233) then
tmp = t_1
else if (t <= 2.5d-155) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t <= 6.8d-68) then
tmp = t_1
else
tmp = (1.0d0 + t_2) + ((-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 = t * (Math.sqrt(x) / l);
double t_2 = 0.5 / (x * x);
double tmp;
if (t <= -2.8e-159) {
tmp = (1.0 / x) + (-1.0 - t_2);
} else if (t <= 2.8e-233) {
tmp = t_1;
} else if (t <= 2.5e-155) {
tmp = 1.0 + (-1.0 / x);
} else if (t <= 6.8e-68) {
tmp = t_1;
} else {
tmp = (1.0 + t_2) + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) t_2 = 0.5 / (x * x) tmp = 0 if t <= -2.8e-159: tmp = (1.0 / x) + (-1.0 - t_2) elif t <= 2.8e-233: tmp = t_1 elif t <= 2.5e-155: tmp = 1.0 + (-1.0 / x) elif t <= 6.8e-68: tmp = t_1 else: tmp = (1.0 + t_2) + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) t_2 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -2.8e-159) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - t_2)); elseif (t <= 2.8e-233) tmp = t_1; elseif (t <= 2.5e-155) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t <= 6.8e-68) tmp = t_1; else tmp = Float64(Float64(1.0 + t_2) + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); t_2 = 0.5 / (x * x); tmp = 0.0; if (t <= -2.8e-159) tmp = (1.0 / x) + (-1.0 - t_2); elseif (t <= 2.8e-233) tmp = t_1; elseif (t <= 2.5e-155) tmp = 1.0 + (-1.0 / x); elseif (t <= 6.8e-68) tmp = t_1; else tmp = (1.0 + t_2) + (-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[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-159], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-233], t$95$1, If[LessEqual[t, 2.5e-155], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-68], t$95$1, N[(N[(1.0 + t$95$2), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
t_2 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-159}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - t_2\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-233}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-155}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(1 + t_2\right) + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -2.8000000000000002e-159Initial program 26.1%
associate-*r/26.1%
fma-neg26.1%
sub-neg26.1%
metadata-eval26.1%
+-commutative26.1%
fma-def26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
Applied egg-rr71.1%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 82.8%
sub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
distribute-neg-frac82.8%
metadata-eval82.8%
Simplified82.8%
if -2.8000000000000002e-159 < t < 2.8000000000000001e-233 or 2.4999999999999999e-155 < t < 6.80000000000000037e-68Initial program 7.5%
associate-*l/7.5%
Simplified7.5%
Taylor expanded in x around inf 65.6%
associate--l+65.6%
unpow265.6%
distribute-lft-out65.6%
unpow265.6%
unpow265.6%
associate-*r/65.6%
mul-1-neg65.6%
+-commutative65.6%
unpow265.6%
associate-*l*65.6%
unpow265.6%
fma-udef65.6%
Simplified65.6%
Taylor expanded in l around inf 43.9%
Taylor expanded in l around 0 43.8%
associate-*l/43.8%
*-lft-identity43.8%
Simplified43.8%
if 2.8000000000000001e-233 < t < 2.4999999999999999e-155Initial program 7.7%
associate-*r/7.7%
fma-neg7.7%
sub-neg7.7%
metadata-eval7.7%
+-commutative7.7%
fma-def7.7%
distribute-rgt-neg-in7.7%
Simplified7.7%
Taylor expanded in t around inf 10.7%
Taylor expanded in x around inf 64.8%
if 6.80000000000000037e-68 < t Initial program 36.9%
associate-*r/36.8%
fma-neg36.8%
sub-neg36.8%
metadata-eval36.8%
+-commutative36.8%
fma-def36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Taylor expanded in t around inf 21.4%
Taylor expanded in x around inf 89.7%
sub-neg89.7%
associate-*r/89.7%
metadata-eval89.7%
unpow289.7%
distribute-neg-frac89.7%
metadata-eval89.7%
Simplified89.7%
Final simplification76.4%
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.25e-163)
(+ (/ 1.0 x) (- -1.0 t_1))
(if (<= t 2.25e-225) (* (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 <= -1.25e-163) {
tmp = (1.0 / x) + (-1.0 - t_1);
} else if (t <= 2.25e-225) {
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 <= (-1.25d-163)) then
tmp = (1.0d0 / x) + ((-1.0d0) - t_1)
else if (t <= 2.25d-225) 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 <= -1.25e-163) {
tmp = (1.0 / x) + (-1.0 - t_1);
} else if (t <= 2.25e-225) {
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 <= -1.25e-163: tmp = (1.0 / x) + (-1.0 - t_1) elif t <= 2.25e-225: 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 <= -1.25e-163) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - t_1)); elseif (t <= 2.25e-225) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(Float64(1.0 + 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.25e-163) tmp = (1.0 / x) + (-1.0 - t_1); elseif (t <= 2.25e-225) 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, -1.25e-163], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-225], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + t$95$1), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-163}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - t_1\right)\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-225}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + t_1\right) + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.24999999999999994e-163Initial program 26.1%
associate-*r/26.1%
fma-neg26.1%
sub-neg26.1%
metadata-eval26.1%
+-commutative26.1%
fma-def26.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
Applied egg-rr71.1%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 82.8%
sub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
distribute-neg-frac82.8%
metadata-eval82.8%
Simplified82.8%
if -1.24999999999999994e-163 < t < 2.25e-225Initial program 4.1%
associate-*l/4.1%
Simplified4.1%
Taylor expanded in x around inf 60.6%
associate--l+60.6%
unpow260.6%
distribute-lft-out60.6%
unpow260.6%
unpow260.6%
associate-*r/60.6%
mul-1-neg60.6%
+-commutative60.6%
unpow260.6%
associate-*l*60.6%
unpow260.6%
fma-udef60.6%
Simplified60.6%
Taylor expanded in l around inf 45.1%
Taylor expanded in l around 0 41.9%
if 2.25e-225 < t Initial program 30.5%
associate-*r/30.4%
fma-neg30.4%
sub-neg30.4%
metadata-eval30.4%
+-commutative30.4%
fma-def30.4%
distribute-rgt-neg-in30.4%
Simplified30.4%
Taylor expanded in t around inf 21.9%
Taylor expanded in x around inf 80.3%
sub-neg80.3%
associate-*r/80.3%
metadata-eval80.3%
unpow280.3%
distribute-neg-frac80.3%
metadata-eval80.3%
Simplified80.3%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) (- -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 <= -1e-310) {
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 <= (-1d-310)) 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 <= -1e-310) {
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 <= -1e-310: 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 <= -1e-310) tmp = Float64(-1.0 - Float64(-1.0 / x)); else tmp = Float64(Float64(1.0 + 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 <= -1e-310) 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, -1e-310], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{0.5}{x \cdot x}\right) + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 22.2%
associate-*r/22.2%
fma-neg22.2%
sub-neg22.2%
metadata-eval22.2%
+-commutative22.2%
fma-def22.2%
distribute-rgt-neg-in22.2%
Simplified22.2%
Applied egg-rr65.3%
Taylor expanded in t around -inf 72.0%
mul-1-neg72.0%
sub-neg72.0%
metadata-eval72.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in x around inf 71.7%
if -9.999999999999969e-311 < t Initial program 27.4%
associate-*r/27.4%
fma-neg27.4%
sub-neg27.4%
metadata-eval27.4%
+-commutative27.4%
fma-def27.4%
distribute-rgt-neg-in27.4%
Simplified27.4%
Taylor expanded in t around inf 19.8%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
associate-*r/73.7%
metadata-eval73.7%
unpow273.7%
distribute-neg-frac73.7%
metadata-eval73.7%
Simplified73.7%
Final simplification72.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (/ 0.5 (* x x)))) (if (<= t -1e-310) (+ (/ 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 <= -1e-310) {
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 <= (-1d-310)) 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 <= -1e-310) {
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 <= -1e-310: 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 <= -1e-310) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - t_1)); else tmp = Float64(Float64(1.0 + 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 <= -1e-310) 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, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + t$95$1), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + t_1\right) + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 22.2%
associate-*r/22.2%
fma-neg22.2%
sub-neg22.2%
metadata-eval22.2%
+-commutative22.2%
fma-def22.2%
distribute-rgt-neg-in22.2%
Simplified22.2%
Applied egg-rr65.3%
Taylor expanded in t around -inf 72.0%
mul-1-neg72.0%
sub-neg72.0%
metadata-eval72.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in x around inf 71.8%
sub-neg71.8%
associate-*r/71.8%
metadata-eval71.8%
unpow271.8%
distribute-neg-frac71.8%
metadata-eval71.8%
Simplified71.8%
if -9.999999999999969e-311 < t Initial program 27.4%
associate-*r/27.4%
fma-neg27.4%
sub-neg27.4%
metadata-eval27.4%
+-commutative27.4%
fma-def27.4%
distribute-rgt-neg-in27.4%
Simplified27.4%
Taylor expanded in t around inf 19.8%
Taylor expanded in x around inf 73.7%
sub-neg73.7%
associate-*r/73.7%
metadata-eval73.7%
unpow273.7%
distribute-neg-frac73.7%
metadata-eval73.7%
Simplified73.7%
Final simplification72.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) (- -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 <= -1e-310) {
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 <= (-1d-310)) 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 <= -1e-310) {
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 <= -1e-310: 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 <= -1e-310) 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 <= -1e-310) 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, -1e-310], 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 -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 22.2%
associate-*r/22.2%
fma-neg22.2%
sub-neg22.2%
metadata-eval22.2%
+-commutative22.2%
fma-def22.2%
distribute-rgt-neg-in22.2%
Simplified22.2%
Applied egg-rr65.3%
Taylor expanded in t around -inf 72.0%
mul-1-neg72.0%
sub-neg72.0%
metadata-eval72.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in x around inf 71.7%
if -9.999999999999969e-311 < t Initial program 27.4%
associate-*r/27.4%
fma-neg27.4%
sub-neg27.4%
metadata-eval27.4%
+-commutative27.4%
fma-def27.4%
distribute-rgt-neg-in27.4%
Simplified27.4%
Taylor expanded in t around inf 19.8%
Taylor expanded in x around inf 73.7%
Final simplification72.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (+ 1.0 (/ -1.0 x)))
l = abs(l);
double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0 + ((-1.0d0) / x)
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
l = abs(l) def code(x, l, t): return 1.0 + (-1.0 / x)
l = abs(l) function code(x, l, t) return Float64(1.0 + Float64(-1.0 / x)) end
l = abs(l) function tmp = code(x, l, t) tmp = 1.0 + (-1.0 / x); end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
1 + \frac{-1}{x}
\end{array}
Initial program 25.1%
associate-*r/25.1%
fma-neg25.1%
sub-neg25.1%
metadata-eval25.1%
+-commutative25.1%
fma-def25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around inf 19.5%
Taylor expanded in x around inf 41.7%
Final simplification41.7%
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 25.1%
associate-*r/25.1%
fma-neg25.1%
sub-neg25.1%
metadata-eval25.1%
+-commutative25.1%
fma-def25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around inf 19.5%
Taylor expanded in x around inf 41.3%
Final simplification41.3%
herbie shell --seed 2023192
(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)))))