
(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 20 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) (sqrt (* 2.0 (fma t t (* l (/ l x))))))))
(t_2 (* t (sqrt 2.0))))
(if (<= t -1.25e+24)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-131)
t_1
(if (<= t -3e-183)
-1.0
(if (<= t 1.8e-224)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
(/ 2.0 (pow x 4.0)))))))
(if (or (<= t 1.65e-161) (not (<= t 2.6e+118)))
(/
t_2
(+
(/ l (/ (sqrt 2.0) (/ l (* t x))))
(fma 2.0 (/ t (* x (sqrt 2.0))) t_2)))
t_1)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
double t_2 = t * sqrt(2.0);
double tmp;
if (t <= -1.25e+24) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_1;
} else if (t <= -3e-183) {
tmp = -1.0;
} else if (t <= 1.8e-224) {
tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
} else if ((t <= 1.65e-161) || !(t <= 2.6e+118)) {
tmp = t_2 / ((l / (sqrt(2.0) / (l / (t * x)))) + fma(2.0, (t / (x * sqrt(2.0))), t_2));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x))))))) t_2 = Float64(t * sqrt(2.0)) tmp = 0.0 if (t <= -1.25e+24) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-131) tmp = t_1; elseif (t <= -3e-183) tmp = -1.0; elseif (t <= 1.8e-224) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0))))))); elseif ((t <= 1.65e-161) || !(t <= 2.6e+118)) tmp = Float64(t_2 / Float64(Float64(l / Float64(sqrt(2.0) / Float64(l / Float64(t * x)))) + fma(2.0, Float64(t / Float64(x * sqrt(2.0))), t_2))); else tmp = t_1; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -3e-183], -1.0, If[LessEqual[t, 1.8e-224], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(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] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.65e-161], N[Not[LessEqual[t, 2.6e+118]], $MachinePrecision]], N[(t$95$2 / N[(N[(l / N[(N[Sqrt[2.0], $MachinePrecision] / N[(l / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t / N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := t \cdot \sqrt{2}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-183}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-161} \lor \neg \left(t \leq 2.6 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{t_2}{\frac{\ell}{\frac{\sqrt{2}}{\frac{\ell}{t \cdot x}}} + \mathsf{fma}\left(2, \frac{t}{x \cdot \sqrt{2}}, t_2\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.25000000000000011e24Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Applied egg-rr84.2%
Taylor expanded in t around -inf 97.3%
mul-1-neg97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
if -1.25000000000000011e24 < t < -1.7500000000000001e-131 or 1.6499999999999999e-161 < t < 2.60000000000000016e118Initial program 60.1%
fma-neg60.1%
sqr-neg60.1%
fma-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
Simplified60.1%
Taylor expanded in x around inf 84.0%
distribute-lft-out84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
unpow284.0%
Simplified84.0%
Taylor expanded in t around 0 83.3%
unpow283.3%
associate-/l*92.0%
Simplified92.0%
distribute-rgt-in92.0%
associate-/l*83.3%
distribute-rgt-in83.3%
expm1-log1p-u78.1%
expm1-udef68.4%
Applied egg-rr69.6%
expm1-def85.5%
expm1-log1p92.0%
associate-/r/92.2%
*-commutative92.2%
Simplified92.2%
if -1.7500000000000001e-131 < t < -2.9999999999999998e-183Initial program 31.6%
fma-neg31.6%
sqr-neg31.6%
fma-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
Simplified31.6%
Taylor expanded in x around inf 31.6%
distribute-lft-out31.6%
unpow231.6%
+-commutative31.6%
unpow231.6%
fma-udef31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around 0 31.6%
unpow231.6%
associate-/l*31.6%
Simplified31.6%
Taylor expanded in t around -inf 100.0%
if -2.9999999999999998e-183 < t < 1.8e-224Initial program 9.8%
associate-*l/9.8%
Simplified9.8%
Taylor expanded in l around inf 6.5%
Taylor expanded in x around inf 55.1%
+-commutative55.1%
associate-+r+55.1%
associate-*r/55.1%
metadata-eval55.1%
associate-*r/55.1%
metadata-eval55.1%
associate-*r/55.1%
metadata-eval55.1%
unpow255.1%
associate-*r/55.1%
metadata-eval55.1%
Simplified55.1%
if 1.8e-224 < t < 1.6499999999999999e-161 or 2.60000000000000016e118 < t Initial program 19.5%
fma-neg19.5%
sqr-neg19.5%
fma-neg19.5%
sqr-neg19.5%
sqr-neg19.5%
sqr-neg19.5%
Simplified19.5%
Taylor expanded in x around inf 82.7%
unpow282.7%
fma-def82.7%
*-commutative82.7%
*-commutative82.7%
Simplified82.7%
*-un-lft-identity82.7%
associate-/l*94.5%
Applied egg-rr94.5%
*-lft-identity94.5%
associate-/l*94.5%
Simplified94.5%
Final simplification88.7%
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 (fma t t (* l (/ l x))))))))
(t_2 (+ 1.0 (/ 2.0 x))))
(if (<= t -1.7e+24)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-131)
t_1
(if (<= t -4e-187)
-1.0
(if (<= t 2.6e-209)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
(/ 2.0 (pow x 4.0)))))))
(if (<= t 2.4e-162)
1.0
(if (<= t 3.1e+121)
t_1
(fma
-0.5
(* (sqrt (/ 1.0 (pow t_2 3.0))) (* (/ l t) (/ l (* t x))))
(sqrt (/ 1.0 t_2)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
double t_2 = 1.0 + (2.0 / x);
double tmp;
if (t <= -1.7e+24) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_1;
} else if (t <= -4e-187) {
tmp = -1.0;
} else if (t <= 2.6e-209) {
tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
} else if (t <= 2.4e-162) {
tmp = 1.0;
} else if (t <= 3.1e+121) {
tmp = t_1;
} else {
tmp = fma(-0.5, (sqrt((1.0 / pow(t_2, 3.0))) * ((l / t) * (l / (t * x)))), sqrt((1.0 / t_2)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x))))))) t_2 = Float64(1.0 + Float64(2.0 / x)) tmp = 0.0 if (t <= -1.7e+24) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-131) tmp = t_1; elseif (t <= -4e-187) tmp = -1.0; elseif (t <= 2.6e-209) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0))))))); elseif (t <= 2.4e-162) tmp = 1.0; elseif (t <= 3.1e+121) tmp = t_1; else tmp = fma(-0.5, Float64(sqrt(Float64(1.0 / (t_2 ^ 3.0))) * Float64(Float64(l / t) * Float64(l / Float64(t * x)))), sqrt(Float64(1.0 / t_2))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -4e-187], -1.0, If[LessEqual[t, 2.6e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(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] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-162], 1.0, If[LessEqual[t, 3.1e+121], t$95$1, N[(-0.5 * N[(N[Sqrt[N[(1.0 / N[Power[t$95$2, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
t_2 := 1 + \frac{2}{x}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-187}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-209}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-162}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \sqrt{\frac{1}{{t_2}^{3}}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{t \cdot x}\right), \sqrt{\frac{1}{t_2}}\right)\\
\end{array}
\end{array}
if t < -1.7e24Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Applied egg-rr84.2%
Taylor expanded in t around -inf 97.3%
mul-1-neg97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
if -1.7e24 < t < -1.7500000000000001e-131 or 2.4000000000000002e-162 < t < 3.10000000000000008e121Initial program 60.1%
fma-neg60.1%
sqr-neg60.1%
fma-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
Simplified60.1%
Taylor expanded in x around inf 84.0%
distribute-lft-out84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
unpow284.0%
Simplified84.0%
Taylor expanded in t around 0 83.3%
unpow283.3%
associate-/l*92.0%
Simplified92.0%
distribute-rgt-in92.0%
associate-/l*83.3%
distribute-rgt-in83.3%
expm1-log1p-u78.1%
expm1-udef68.4%
Applied egg-rr69.6%
expm1-def85.5%
expm1-log1p92.0%
associate-/r/92.2%
*-commutative92.2%
Simplified92.2%
if -1.7500000000000001e-131 < t < -4.0000000000000001e-187Initial program 31.6%
fma-neg31.6%
sqr-neg31.6%
fma-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
Simplified31.6%
Taylor expanded in x around inf 31.6%
distribute-lft-out31.6%
unpow231.6%
+-commutative31.6%
unpow231.6%
fma-udef31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around 0 31.6%
unpow231.6%
associate-/l*31.6%
Simplified31.6%
Taylor expanded in t around -inf 100.0%
if -4.0000000000000001e-187 < t < 2.59999999999999984e-209Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
Taylor expanded in x around inf 57.0%
+-commutative57.0%
associate-+r+57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r/57.0%
metadata-eval57.0%
unpow257.0%
associate-*r/57.0%
metadata-eval57.0%
Simplified57.0%
if 2.59999999999999984e-209 < t < 2.4000000000000002e-162Initial program 3.0%
fma-neg3.0%
sqr-neg3.0%
fma-neg3.0%
sqr-neg3.0%
sqr-neg3.0%
sqr-neg3.0%
Simplified3.0%
Taylor expanded in x around inf 13.9%
distribute-lft-out13.9%
unpow213.9%
+-commutative13.9%
unpow213.9%
fma-udef13.9%
unpow213.9%
Simplified13.9%
Taylor expanded in x around inf 89.3%
if 3.10000000000000008e121 < t Initial program 23.5%
fma-neg23.5%
sqr-neg23.5%
fma-neg23.5%
sqr-neg23.5%
sqr-neg23.5%
sqr-neg23.5%
Simplified23.5%
Taylor expanded in x around inf 22.9%
distribute-lft-out22.9%
unpow222.9%
+-commutative22.9%
unpow222.9%
fma-udef22.9%
unpow222.9%
Simplified22.9%
Taylor expanded in t around inf 81.8%
+-commutative81.8%
fma-def81.8%
*-commutative81.8%
associate-*r/81.8%
metadata-eval81.8%
unpow281.8%
unpow281.8%
associate-*l*81.8%
times-frac96.4%
*-commutative96.4%
Simplified96.4%
Final simplification88.6%
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 (fma t t (* l (/ l x)))))))))
(if (<= t -1.25e+24)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-131)
t_1
(if (<= t -3.1e-176)
-1.0
(if (<= t 1.7e-208)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(+ (+ (/ 2.0 x) (/ 2.0 (pow x 3.0))) (/ 2.0 (* x x)))
(/ 2.0 (pow x 4.0)))))))
(if (<= t 5.4e-175) 1.0 (if (<= t 2.2e+117) t_1 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
double tmp;
if (t <= -1.25e+24) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_1;
} else if (t <= -3.1e-176) {
tmp = -1.0;
} else if (t <= 1.7e-208) {
tmp = t * (sqrt(2.0) / (l * sqrt(((((2.0 / x) + (2.0 / pow(x, 3.0))) + (2.0 / (x * x))) + (2.0 / pow(x, 4.0))))));
} else if (t <= 5.4e-175) {
tmp = 1.0;
} else if (t <= 2.2e+117) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -1.25e+24) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-131) tmp = t_1; elseif (t <= -3.1e-176) tmp = -1.0; elseif (t <= 1.7e-208) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 3.0))) + Float64(2.0 / Float64(x * x))) + Float64(2.0 / (x ^ 4.0))))))); elseif (t <= 5.4e-175) tmp = 1.0; elseif (t <= 2.2e+117) tmp = t_1; else tmp = 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[Sqrt[N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -3.1e-176], -1.0, If[LessEqual[t, 1.7e-208], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(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] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-175], 1.0, If[LessEqual[t, 2.2e+117], t$95$1, 1.0]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-176}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-208}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\left(\frac{2}{x} + \frac{2}{{x}^{3}}\right) + \frac{2}{x \cdot x}\right) + \frac{2}{{x}^{4}}}}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-175}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.25000000000000011e24Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Applied egg-rr84.2%
Taylor expanded in t around -inf 97.3%
mul-1-neg97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
if -1.25000000000000011e24 < t < -1.7500000000000001e-131 or 5.39999999999999998e-175 < t < 2.20000000000000014e117Initial program 60.1%
fma-neg60.1%
sqr-neg60.1%
fma-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
Simplified60.1%
Taylor expanded in x around inf 84.0%
distribute-lft-out84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
unpow284.0%
Simplified84.0%
Taylor expanded in t around 0 83.3%
unpow283.3%
associate-/l*92.0%
Simplified92.0%
distribute-rgt-in92.0%
associate-/l*83.3%
distribute-rgt-in83.3%
expm1-log1p-u78.1%
expm1-udef68.4%
Applied egg-rr69.6%
expm1-def85.5%
expm1-log1p92.0%
associate-/r/92.2%
*-commutative92.2%
Simplified92.2%
if -1.7500000000000001e-131 < t < -3.09999999999999992e-176Initial program 31.6%
fma-neg31.6%
sqr-neg31.6%
fma-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
Simplified31.6%
Taylor expanded in x around inf 31.6%
distribute-lft-out31.6%
unpow231.6%
+-commutative31.6%
unpow231.6%
fma-udef31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around 0 31.6%
unpow231.6%
associate-/l*31.6%
Simplified31.6%
Taylor expanded in t around -inf 100.0%
if -3.09999999999999992e-176 < t < 1.7e-208Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
Taylor expanded in x around inf 57.0%
+-commutative57.0%
associate-+r+57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r/57.0%
metadata-eval57.0%
associate-*r/57.0%
metadata-eval57.0%
unpow257.0%
associate-*r/57.0%
metadata-eval57.0%
Simplified57.0%
if 1.7e-208 < t < 5.39999999999999998e-175 or 2.20000000000000014e117 < t Initial program 20.6%
fma-neg20.6%
sqr-neg20.6%
fma-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
Simplified20.6%
Taylor expanded in x around inf 21.6%
distribute-lft-out21.6%
unpow221.6%
+-commutative21.6%
unpow221.6%
fma-udef21.6%
unpow221.6%
Simplified21.6%
Taylor expanded in x around inf 95.0%
Final simplification88.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 (fma t t (* l (/ l x)))))))))
(if (<= t -6e+23)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-131)
t_1
(if (<= t -6.6e-185)
-1.0
(if (<= t 1.65e-208)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(if (<= t 7.3e-165) 1.0 (if (<= t 2e+116) t_1 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((2.0 * fma(t, t, (l * (l / x))))));
double tmp;
if (t <= -6e+23) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_1;
} else if (t <= -6.6e-185) {
tmp = -1.0;
} else if (t <= 1.65e-208) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 7.3e-165) {
tmp = 1.0;
} else if (t <= 2e+116) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * fma(t, t, Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -6e+23) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-131) tmp = t_1; elseif (t <= -6.6e-185) tmp = -1.0; elseif (t <= 1.65e-208) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); elseif (t <= 7.3e-165) tmp = 1.0; elseif (t <= 2e+116) tmp = t_1; else tmp = 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[Sqrt[N[(2.0 * N[(t * t + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+23], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$1, If[LessEqual[t, -6.6e-185], -1.0, If[LessEqual[t, 1.65e-208], 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, 7.3e-165], 1.0, If[LessEqual[t, 2e+116], t$95$1, 1.0]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \mathsf{fma}\left(t, t, \ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -6 \cdot 10^{+23}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-208}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 7.3 \cdot 10^{-165}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+116}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -6.0000000000000002e23Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Applied egg-rr84.2%
Taylor expanded in t around -inf 97.3%
mul-1-neg97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
if -6.0000000000000002e23 < t < -1.7500000000000001e-131 or 7.2999999999999999e-165 < t < 2.00000000000000003e116Initial program 60.1%
fma-neg60.1%
sqr-neg60.1%
fma-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
Simplified60.1%
Taylor expanded in x around inf 84.0%
distribute-lft-out84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
unpow284.0%
Simplified84.0%
Taylor expanded in t around 0 83.3%
unpow283.3%
associate-/l*92.0%
Simplified92.0%
distribute-rgt-in92.0%
associate-/l*83.3%
distribute-rgt-in83.3%
expm1-log1p-u78.1%
expm1-udef68.4%
Applied egg-rr69.6%
expm1-def85.5%
expm1-log1p92.0%
associate-/r/92.2%
*-commutative92.2%
Simplified92.2%
if -1.7500000000000001e-131 < t < -6.5999999999999995e-185Initial program 31.6%
fma-neg31.6%
sqr-neg31.6%
fma-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
Simplified31.6%
Taylor expanded in x around inf 31.6%
distribute-lft-out31.6%
unpow231.6%
+-commutative31.6%
unpow231.6%
fma-udef31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around 0 31.6%
unpow231.6%
associate-/l*31.6%
Simplified31.6%
Taylor expanded in t around -inf 100.0%
if -6.5999999999999995e-185 < t < 1.65000000000000003e-208Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
associate-*l/6.0%
*-commutative6.0%
*-commutative6.0%
associate--l+6.0%
Applied egg-rr6.0%
Taylor expanded in x around inf 56.2%
+-commutative56.2%
associate-*r/56.2%
metadata-eval56.2%
associate-*r/56.2%
metadata-eval56.2%
unpow256.2%
Simplified56.2%
if 1.65000000000000003e-208 < t < 7.2999999999999999e-165 or 2.00000000000000003e116 < t Initial program 20.6%
fma-neg20.6%
sqr-neg20.6%
fma-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
Simplified20.6%
Taylor expanded in x around inf 21.6%
distribute-lft-out21.6%
unpow221.6%
+-commutative21.6%
unpow221.6%
fma-udef21.6%
unpow221.6%
Simplified21.6%
Taylor expanded in x around inf 95.0%
Final simplification88.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (sqrt 2.0)))
(t_2 (/ t_1 (sqrt (* 2.0 (+ (/ l (/ x l)) (* t t)))))))
(if (<= t -1e+24)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-131)
t_2
(if (<= t -1.9e-187)
-1.0
(if (<= t 3.2e-210)
(/ t_1 (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
(if (<= t 8.2e-161) 1.0 (if (<= t 1.8e+120) t_2 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = t_1 / sqrt((2.0 * ((l / (x / l)) + (t * t))));
double tmp;
if (t <= -1e+24) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_2;
} else if (t <= -1.9e-187) {
tmp = -1.0;
} else if (t <= 3.2e-210) {
tmp = t_1 / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 8.2e-161) {
tmp = 1.0;
} else if (t <= 1.8e+120) {
tmp = t_2;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * sqrt(2.0d0)
t_2 = t_1 / sqrt((2.0d0 * ((l / (x / l)) + (t * t))))
if (t <= (-1d+24)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= (-1.75d-131)) then
tmp = t_2
else if (t <= (-1.9d-187)) then
tmp = -1.0d0
else if (t <= 3.2d-210) then
tmp = t_1 / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x)))))
else if (t <= 8.2d-161) then
tmp = 1.0d0
else if (t <= 1.8d+120) then
tmp = t_2
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * Math.sqrt(2.0);
double t_2 = t_1 / Math.sqrt((2.0 * ((l / (x / l)) + (t * t))));
double tmp;
if (t <= -1e+24) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-131) {
tmp = t_2;
} else if (t <= -1.9e-187) {
tmp = -1.0;
} else if (t <= 3.2e-210) {
tmp = t_1 / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else if (t <= 8.2e-161) {
tmp = 1.0;
} else if (t <= 1.8e+120) {
tmp = t_2;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * math.sqrt(2.0) t_2 = t_1 / math.sqrt((2.0 * ((l / (x / l)) + (t * t)))) tmp = 0 if t <= -1e+24: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= -1.75e-131: tmp = t_2 elif t <= -1.9e-187: tmp = -1.0 elif t <= 3.2e-210: tmp = t_1 / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x))))) elif t <= 8.2e-161: tmp = 1.0 elif t <= 1.8e+120: tmp = t_2 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = Float64(t_1 / sqrt(Float64(2.0 * Float64(Float64(l / Float64(x / l)) + Float64(t * t))))) tmp = 0.0 if (t <= -1e+24) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-131) tmp = t_2; elseif (t <= -1.9e-187) tmp = -1.0; elseif (t <= 3.2e-210) tmp = Float64(t_1 / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); elseif (t <= 8.2e-161) tmp = 1.0; elseif (t <= 1.8e+120) tmp = t_2; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * sqrt(2.0); t_2 = t_1 / sqrt((2.0 * ((l / (x / l)) + (t * t)))); tmp = 0.0; if (t <= -1e+24) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= -1.75e-131) tmp = t_2; elseif (t <= -1.9e-187) tmp = -1.0; elseif (t <= 3.2e-210) tmp = t_1 / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))); elseif (t <= 8.2e-161) tmp = 1.0; elseif (t <= 1.8e+120) tmp = t_2; else tmp = 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[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(2.0 * N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+24], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-131], t$95$2, If[LessEqual[t, -1.9e-187], -1.0, If[LessEqual[t, 3.2e-210], N[(t$95$1 / 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, 8.2e-161], 1.0, If[LessEqual[t, 1.8e+120], t$95$2, 1.0]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \frac{t_1}{\sqrt{2 \cdot \left(\frac{\ell}{\frac{x}{\ell}} + t \cdot t\right)}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+24}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-187}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-210}:\\
\;\;\;\;\frac{t_1}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-161}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+120}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.9999999999999998e23Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Applied egg-rr84.2%
Taylor expanded in t around -inf 97.3%
mul-1-neg97.3%
sub-neg97.3%
metadata-eval97.3%
+-commutative97.3%
Simplified97.3%
if -9.9999999999999998e23 < t < -1.7500000000000001e-131 or 8.1999999999999994e-161 < t < 1.80000000000000008e120Initial program 60.1%
fma-neg60.1%
sqr-neg60.1%
fma-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
sqr-neg60.1%
Simplified60.1%
Taylor expanded in x around inf 84.0%
distribute-lft-out84.0%
unpow284.0%
+-commutative84.0%
unpow284.0%
fma-udef84.0%
unpow284.0%
Simplified84.0%
Taylor expanded in t around 0 83.3%
unpow283.3%
associate-/l*92.0%
Simplified92.0%
if -1.7500000000000001e-131 < t < -1.90000000000000013e-187Initial program 31.6%
fma-neg31.6%
sqr-neg31.6%
fma-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
sqr-neg31.6%
Simplified31.6%
Taylor expanded in x around inf 31.6%
distribute-lft-out31.6%
unpow231.6%
+-commutative31.6%
unpow231.6%
fma-udef31.6%
unpow231.6%
Simplified31.6%
Taylor expanded in t around 0 31.6%
unpow231.6%
associate-/l*31.6%
Simplified31.6%
Taylor expanded in t around -inf 100.0%
if -1.90000000000000013e-187 < t < 3.20000000000000028e-210Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
associate-*l/6.0%
*-commutative6.0%
*-commutative6.0%
associate--l+6.0%
Applied egg-rr6.0%
Taylor expanded in x around inf 56.2%
+-commutative56.2%
associate-*r/56.2%
metadata-eval56.2%
associate-*r/56.2%
metadata-eval56.2%
unpow256.2%
Simplified56.2%
if 3.20000000000000028e-210 < t < 8.1999999999999994e-161 or 1.80000000000000008e120 < t Initial program 20.6%
fma-neg20.6%
sqr-neg20.6%
fma-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
sqr-neg20.6%
Simplified20.6%
Taylor expanded in x around inf 21.6%
distribute-lft-out21.6%
unpow221.6%
+-commutative21.6%
unpow221.6%
fma-udef21.6%
unpow221.6%
Simplified21.6%
Taylor expanded in x around inf 95.0%
Final simplification88.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.85e-174)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 6.8e-209)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x 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 <= -1.85e-174) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.8e-209) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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 <= (-1.85d-174)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 6.8d-209) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * 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 <= -1.85e-174) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.8e-209) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -1.85e-174: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 6.8e-209: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -1.85e-174) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 6.8e-209) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -1.85e-174) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 6.8e-209) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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, -1.85e-174], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 6.8e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-174}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-209}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.85000000000000005e-174Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in t around -inf 89.4%
mul-1-neg89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
if -1.85000000000000005e-174 < t < 6.79999999999999976e-209Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
Taylor expanded in x around inf 56.1%
associate-*r/56.1%
metadata-eval56.1%
unpow256.1%
associate-*r/56.1%
metadata-eval56.1%
Simplified56.1%
if 6.79999999999999976e-209 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.2e-176)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 6.5e-209)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x 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 <= -2.2e-176) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.5e-209) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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 <= (-2.2d-176)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 6.5d-209) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * 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 <= -2.2e-176) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.5e-209) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -2.2e-176: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 6.5e-209: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * 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 <= -2.2e-176) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 6.5e-209) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -2.2e-176) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 6.5e-209) tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / x) + (2.0 / (x * 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, -2.2e-176], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 6.5e-209], 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], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-176}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-209}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -2.1999999999999999e-176Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in t around -inf 89.4%
mul-1-neg89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
if -2.1999999999999999e-176 < t < 6.50000000000000042e-209Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
associate-*l/6.0%
*-commutative6.0%
*-commutative6.0%
associate--l+6.0%
Applied egg-rr6.0%
Taylor expanded in x around inf 56.2%
+-commutative56.2%
associate-*r/56.2%
metadata-eval56.2%
associate-*r/56.2%
metadata-eval56.2%
unpow256.2%
Simplified56.2%
if 6.50000000000000042e-209 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.45e-186)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 2.5e-209)
(* t (/ (sqrt 2.0) (* l (sqrt (/ 2.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 <= -1.45e-186) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.5e-209) {
tmp = t * (sqrt(2.0) / (l * sqrt((2.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 <= (-1.45d-186)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 2.5d-209) then
tmp = t * (sqrt(2.0d0) / (l * sqrt((2.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 <= -1.45e-186) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.5e-209) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt((2.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 <= -1.45e-186: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 2.5e-209: tmp = t * (math.sqrt(2.0) / (l * math.sqrt((2.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 <= -1.45e-186) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 2.5e-209) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -1.45e-186) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 2.5e-209) tmp = t * (sqrt(2.0) / (l * sqrt((2.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, -1.45e-186], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.5e-209], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-186}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-209}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.4500000000000001e-186Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in t around -inf 89.4%
mul-1-neg89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
if -1.4500000000000001e-186 < t < 2.5000000000000002e-209Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
Taylor expanded in x around inf 55.6%
if 2.5000000000000002e-209 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification83.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -7.8e-177)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.65e-210)
(/ (* t (sqrt 2.0)) (* l (sqrt (/ 2.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 <= -7.8e-177) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.65e-210) {
tmp = (t * sqrt(2.0)) / (l * sqrt((2.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 <= (-7.8d-177)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.65d-210) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt((2.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 <= -7.8e-177) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.65e-210) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt((2.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 <= -7.8e-177: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.65e-210: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt((2.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 <= -7.8e-177) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.65e-210) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(2.0 / x)))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -7.8e-177) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.65e-210) tmp = (t * sqrt(2.0)) / (l * sqrt((2.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, -7.8e-177], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.65e-210], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{-177}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-210}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -7.80000000000000028e-177Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in t around -inf 89.4%
mul-1-neg89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
if -7.80000000000000028e-177 < t < 1.65e-210Initial program 9.0%
associate-*l/9.0%
Simplified9.0%
Taylor expanded in l around inf 6.0%
associate-*l/6.0%
*-commutative6.0%
*-commutative6.0%
associate--l+6.0%
Applied egg-rr6.0%
Taylor expanded in x around inf 55.7%
if 1.65e-210 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -8e-185)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.55e-210)
(/ t (/ l (sqrt 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 <= -8e-185) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.55e-210) {
tmp = t / (l / sqrt(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 <= (-8d-185)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.55d-210) then
tmp = t / (l / sqrt(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 <= -8e-185) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.55e-210) {
tmp = t / (l / Math.sqrt(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 <= -8e-185: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.55e-210: tmp = t / (l / math.sqrt(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 <= -8e-185) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.55e-210) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -8e-185) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.55e-210) tmp = t / (l / sqrt(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, -8e-185], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.55e-210], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-185}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-210}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -7.9999999999999999e-185Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in t around -inf 89.4%
mul-1-neg89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
if -7.9999999999999999e-185 < t < 1.54999999999999993e-210Initial program 9.0%
fma-neg8.8%
sqr-neg8.8%
fma-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
Simplified8.8%
Taylor expanded in x around inf 65.2%
distribute-lft-out65.2%
unpow265.2%
+-commutative65.2%
unpow265.2%
fma-udef65.2%
unpow265.2%
Simplified65.2%
Taylor expanded in t around 0 65.2%
unpow265.2%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in t around 0 51.8%
associate-*l/55.7%
associate-/l*55.7%
Simplified55.7%
if 1.54999999999999993e-210 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification83.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -3e-179)
(+ -1.0 (/ 1.0 x))
(if (<= t 1.4e-208)
(* (sqrt x) (/ t l))
(+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -3e-179) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.4e-208) {
tmp = sqrt(x) * (t / l);
} 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 <= (-3d-179)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 1.4d-208) then
tmp = sqrt(x) * (t / l)
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 <= -3e-179) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.4e-208) {
tmp = Math.sqrt(x) * (t / l);
} 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 <= -3e-179: tmp = -1.0 + (1.0 / x) elif t <= 1.4e-208: tmp = math.sqrt(x) * (t / l) 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 <= -3e-179) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 1.4e-208) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -3e-179) tmp = -1.0 + (1.0 / x); elseif (t <= 1.4e-208) tmp = sqrt(x) * (t / l); 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, -3e-179], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-208], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-179}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-208}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -3.00000000000000006e-179Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in l around 0 1.6%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt88.1%
Simplified88.1%
if -3.00000000000000006e-179 < t < 1.40000000000000001e-208Initial program 9.0%
fma-neg8.8%
sqr-neg8.8%
fma-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
Simplified8.8%
Taylor expanded in x around inf 65.2%
distribute-lft-out65.2%
unpow265.2%
+-commutative65.2%
unpow265.2%
fma-udef65.2%
unpow265.2%
Simplified65.2%
Taylor expanded in t around 0 51.8%
if 1.40000000000000001e-208 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification82.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.3e-186)
(+ -1.0 (/ 1.0 x))
(if (<= t 6e-210)
(/ t (/ l (sqrt 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 <= -1.3e-186) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 6e-210) {
tmp = t / (l / sqrt(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 <= (-1.3d-186)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 6d-210) then
tmp = t / (l / sqrt(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 <= -1.3e-186) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 6e-210) {
tmp = t / (l / Math.sqrt(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 <= -1.3e-186: tmp = -1.0 + (1.0 / x) elif t <= 6e-210: tmp = t / (l / math.sqrt(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 <= -1.3e-186) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 6e-210) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -1.3e-186) tmp = -1.0 + (1.0 / x); elseif (t <= 6e-210) tmp = t / (l / sqrt(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, -1.3e-186], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-210], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-186}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-210}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.29999999999999997e-186Initial program 38.4%
associate-*l/38.5%
Simplified38.5%
Applied egg-rr76.0%
Taylor expanded in l around 0 1.6%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt88.1%
Simplified88.1%
if -1.29999999999999997e-186 < t < 6.0000000000000003e-210Initial program 9.0%
fma-neg8.8%
sqr-neg8.8%
fma-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
sqr-neg9.0%
Simplified8.8%
Taylor expanded in x around inf 65.2%
distribute-lft-out65.2%
unpow265.2%
+-commutative65.2%
unpow265.2%
fma-udef65.2%
unpow265.2%
Simplified65.2%
Taylor expanded in t around 0 65.2%
unpow265.2%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in t around 0 51.8%
associate-*l/55.7%
associate-/l*55.7%
Simplified55.7%
if 6.0000000000000003e-210 < t Initial program 39.4%
associate-*l/39.5%
Simplified39.5%
Applied egg-rr74.7%
Taylor expanded in l around 0 88.5%
Taylor expanded in x around inf 88.5%
associate--l+88.5%
associate-*r/88.5%
metadata-eval88.5%
unpow288.5%
associate-/r*88.5%
Simplified88.5%
Final simplification82.8%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -4.5e-248) (+ -1.0 (/ 1.0 x)) (if (<= t 8.2e-222) (* 2.0 (* (/ t l) (* t (/ x l)))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.5e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8.2e-222) {
tmp = 2.0 * ((t / l) * (t * (x / l)));
} 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 <= (-4.5d-248)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 8.2d-222) then
tmp = 2.0d0 * ((t / l) * (t * (x / l)))
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 <= -4.5e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8.2e-222) {
tmp = 2.0 * ((t / l) * (t * (x / l)));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.5e-248: tmp = -1.0 + (1.0 / x) elif t <= 8.2e-222: tmp = 2.0 * ((t / l) * (t * (x / l))) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.5e-248) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 8.2e-222) tmp = Float64(2.0 * Float64(Float64(t / l) * Float64(t * Float64(x / l)))); 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 <= -4.5e-248) tmp = -1.0 + (1.0 / x); elseif (t <= 8.2e-222) tmp = 2.0 * ((t / l) * (t * (x / l))); 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, -4.5e-248], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-222], N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(t * N[(x / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-248}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-222}:\\
\;\;\;\;2 \cdot \left(\frac{t}{\ell} \cdot \left(t \cdot \frac{x}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.4999999999999996e-248Initial program 35.0%
associate-*l/35.1%
Simplified35.1%
Applied egg-rr71.6%
Taylor expanded in l around 0 1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.3%
Simplified81.3%
if -4.4999999999999996e-248 < t < 8.2000000000000006e-222Initial program 8.8%
fma-neg8.5%
sqr-neg8.5%
fma-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
Simplified8.5%
Taylor expanded in x around inf 49.2%
unpow249.2%
fma-def49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in t around 0 38.4%
unpow238.4%
rem-square-sqrt38.4%
*-commutative38.4%
unpow238.4%
unpow238.4%
Simplified38.4%
Taylor expanded in x around 0 38.4%
unpow238.4%
associate-*l*38.9%
unpow238.9%
times-frac39.1%
*-commutative39.1%
Simplified39.1%
Taylor expanded in x around 0 39.1%
*-commutative39.1%
associate-*l/38.8%
*-commutative38.8%
Simplified38.8%
if 8.2000000000000006e-222 < t Initial program 38.5%
associate-*l/38.6%
Simplified38.6%
Applied egg-rr74.5%
Taylor expanded in l around 0 87.2%
Taylor expanded in x around inf 87.0%
Final simplification79.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.5e-247) (+ -1.0 (/ 1.0 x)) (if (<= t 4.1e-224) (* 2.0 (* (/ t l) (/ (* t x) l))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.5e-247) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 4.1e-224) {
tmp = 2.0 * ((t / l) * ((t * x) / l));
} 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 <= (-1.5d-247)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 4.1d-224) then
tmp = 2.0d0 * ((t / l) * ((t * x) / l))
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 <= -1.5e-247) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 4.1e-224) {
tmp = 2.0 * ((t / l) * ((t * x) / l));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.5e-247: tmp = -1.0 + (1.0 / x) elif t <= 4.1e-224: tmp = 2.0 * ((t / l) * ((t * x) / l)) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.5e-247) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 4.1e-224) tmp = Float64(2.0 * Float64(Float64(t / l) * Float64(Float64(t * x) / l))); 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 <= -1.5e-247) tmp = -1.0 + (1.0 / x); elseif (t <= 4.1e-224) tmp = 2.0 * ((t / l) * ((t * x) / l)); 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, -1.5e-247], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-224], N[(2.0 * N[(N[(t / l), $MachinePrecision] * N[(N[(t * x), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-247}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-224}:\\
\;\;\;\;2 \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot x}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.4999999999999999e-247Initial program 35.0%
associate-*l/35.1%
Simplified35.1%
Applied egg-rr71.6%
Taylor expanded in l around 0 1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.3%
Simplified81.3%
if -1.4999999999999999e-247 < t < 4.09999999999999986e-224Initial program 8.8%
fma-neg8.5%
sqr-neg8.5%
fma-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
Simplified8.5%
Taylor expanded in x around inf 49.2%
unpow249.2%
fma-def49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in t around 0 38.4%
unpow238.4%
rem-square-sqrt38.4%
*-commutative38.4%
unpow238.4%
unpow238.4%
Simplified38.4%
Taylor expanded in x around 0 38.4%
unpow238.4%
associate-*l*38.9%
unpow238.9%
times-frac39.1%
*-commutative39.1%
Simplified39.1%
if 4.09999999999999986e-224 < t Initial program 38.5%
associate-*l/38.6%
Simplified38.6%
Applied egg-rr74.5%
Taylor expanded in l around 0 87.2%
Taylor expanded in x around inf 87.0%
Final simplification79.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -4.8e-248) (+ -1.0 (/ 1.0 x)) (if (<= t 8.2e-222) (* 2.0 (/ (* t (/ x (/ l t))) l)) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8.2e-222) {
tmp = 2.0 * ((t * (x / (l / t))) / l);
} 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 <= (-4.8d-248)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 8.2d-222) then
tmp = 2.0d0 * ((t * (x / (l / t))) / l)
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 <= -4.8e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8.2e-222) {
tmp = 2.0 * ((t * (x / (l / t))) / l);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.8e-248: tmp = -1.0 + (1.0 / x) elif t <= 8.2e-222: tmp = 2.0 * ((t * (x / (l / t))) / l) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.8e-248) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 8.2e-222) tmp = Float64(2.0 * Float64(Float64(t * Float64(x / Float64(l / t))) / l)); 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 <= -4.8e-248) tmp = -1.0 + (1.0 / x); elseif (t <= 8.2e-222) tmp = 2.0 * ((t * (x / (l / t))) / l); 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, -4.8e-248], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-222], N[(2.0 * N[(N[(t * N[(x / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-248}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-222}:\\
\;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.80000000000000006e-248Initial program 35.0%
associate-*l/35.1%
Simplified35.1%
Applied egg-rr71.6%
Taylor expanded in l around 0 1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.3%
Simplified81.3%
if -4.80000000000000006e-248 < t < 8.2000000000000006e-222Initial program 8.8%
fma-neg8.5%
sqr-neg8.5%
fma-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
Simplified8.5%
Taylor expanded in x around inf 49.2%
unpow249.2%
fma-def49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in t around 0 38.4%
unpow238.4%
rem-square-sqrt38.4%
*-commutative38.4%
unpow238.4%
unpow238.4%
Simplified38.4%
Taylor expanded in x around 0 38.4%
unpow238.4%
associate-*l*38.9%
unpow238.9%
times-frac39.1%
*-commutative39.1%
Simplified39.1%
associate-*l/39.1%
associate-/l*39.1%
Applied egg-rr39.1%
if 8.2000000000000006e-222 < t Initial program 38.5%
associate-*l/38.6%
Simplified38.6%
Applied egg-rr74.5%
Taylor expanded in l around 0 87.2%
Taylor expanded in x around inf 87.0%
Final simplification79.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.5e-248)
(+ -1.0 (/ 1.0 x))
(if (<= t 4.2e-224)
(* 2.0 (/ (* t (/ x (/ l t))) l))
(+ 1.0 (+ (/ (/ 0.5 x) x) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.5e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 4.2e-224) {
tmp = 2.0 * ((t * (x / (l / t))) / l);
} 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 <= (-4.5d-248)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 4.2d-224) then
tmp = 2.0d0 * ((t * (x / (l / t))) / l)
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 <= -4.5e-248) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 4.2e-224) {
tmp = 2.0 * ((t * (x / (l / t))) / l);
} 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 <= -4.5e-248: tmp = -1.0 + (1.0 / x) elif t <= 4.2e-224: tmp = 2.0 * ((t * (x / (l / t))) / l) 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 <= -4.5e-248) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 4.2e-224) tmp = Float64(2.0 * Float64(Float64(t * Float64(x / Float64(l / t))) / l)); else tmp = Float64(1.0 + Float64(Float64(Float64(0.5 / 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 <= -4.5e-248) tmp = -1.0 + (1.0 / x); elseif (t <= 4.2e-224) tmp = 2.0 * ((t * (x / (l / t))) / l); 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, -4.5e-248], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-224], N[(2.0 * N[(N[(t * N[(x / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(N[(0.5 / x), $MachinePrecision] / x), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-248}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-224}:\\
\;\;\;\;2 \cdot \frac{t \cdot \frac{x}{\frac{\ell}{t}}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{\frac{0.5}{x}}{x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -4.4999999999999996e-248Initial program 35.0%
associate-*l/35.1%
Simplified35.1%
Applied egg-rr71.6%
Taylor expanded in l around 0 1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.3%
Simplified81.3%
if -4.4999999999999996e-248 < t < 4.20000000000000013e-224Initial program 8.8%
fma-neg8.5%
sqr-neg8.5%
fma-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
sqr-neg8.8%
Simplified8.5%
Taylor expanded in x around inf 49.2%
unpow249.2%
fma-def49.2%
*-commutative49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in t around 0 38.4%
unpow238.4%
rem-square-sqrt38.4%
*-commutative38.4%
unpow238.4%
unpow238.4%
Simplified38.4%
Taylor expanded in x around 0 38.4%
unpow238.4%
associate-*l*38.9%
unpow238.9%
times-frac39.1%
*-commutative39.1%
Simplified39.1%
associate-*l/39.1%
associate-/l*39.1%
Applied egg-rr39.1%
if 4.20000000000000013e-224 < t Initial program 38.5%
associate-*l/38.6%
Simplified38.6%
Applied egg-rr74.5%
Taylor expanded in l around 0 87.2%
Taylor expanded in x around inf 87.2%
associate--l+87.2%
associate-*r/87.2%
metadata-eval87.2%
unpow287.2%
associate-/r*87.2%
Simplified87.2%
Final simplification79.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-312) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-312) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-312)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-312) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-312: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-312) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-312) tmp = -1.0 + (1.0 / x); else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-312], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.0000000000022e-312Initial program 32.7%
associate-*l/32.8%
Simplified32.8%
Applied egg-rr69.7%
Taylor expanded in l around 0 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt77.0%
Simplified77.0%
if -5.0000000000022e-312 < t Initial program 35.0%
fma-neg34.9%
sqr-neg34.9%
fma-neg35.0%
sqr-neg35.0%
sqr-neg35.0%
sqr-neg35.0%
Simplified34.9%
Taylor expanded in x around inf 52.4%
distribute-lft-out52.4%
unpow252.4%
+-commutative52.4%
unpow252.4%
fma-udef52.4%
unpow252.4%
Simplified52.4%
Taylor expanded in x around inf 77.6%
Final simplification77.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-312) (+ -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 <= -5e-312) {
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 <= (-5d-312)) 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 <= -5e-312) {
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 <= -5e-312: 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 <= -5e-312) 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 <= -5e-312) 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, -5e-312], 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 -5 \cdot 10^{-312}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -5.0000000000022e-312Initial program 32.7%
associate-*l/32.8%
Simplified32.8%
Applied egg-rr69.7%
Taylor expanded in l around 0 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt77.0%
Simplified77.0%
if -5.0000000000022e-312 < t Initial program 35.0%
associate-*l/35.1%
Simplified35.1%
Applied egg-rr71.3%
Taylor expanded in l around 0 78.1%
Taylor expanded in x around inf 78.0%
Final simplification77.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-312) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-312) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-312)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-312) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-312: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-312) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-312) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-312], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-312}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.0000000000022e-312Initial program 32.7%
fma-neg32.7%
sqr-neg32.7%
fma-neg32.7%
sqr-neg32.7%
sqr-neg32.7%
sqr-neg32.7%
Simplified32.7%
Taylor expanded in x around inf 50.6%
distribute-lft-out50.6%
unpow250.6%
+-commutative50.6%
unpow250.6%
fma-udef50.6%
unpow250.6%
Simplified50.6%
Taylor expanded in t around 0 51.0%
unpow251.0%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in t around -inf 76.2%
if -5.0000000000022e-312 < t Initial program 35.0%
fma-neg34.9%
sqr-neg34.9%
fma-neg35.0%
sqr-neg35.0%
sqr-neg35.0%
sqr-neg35.0%
Simplified34.9%
Taylor expanded in x around inf 52.4%
distribute-lft-out52.4%
unpow252.4%
+-commutative52.4%
unpow252.4%
fma-udef52.4%
unpow252.4%
Simplified52.4%
Taylor expanded in x around inf 77.6%
Final simplification76.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return -1.0;
}
l = abs(l) def code(x, l, t): return -1.0
l = abs(l) function code(x, l, t) return -1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = -1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Initial program 33.9%
fma-neg33.9%
sqr-neg33.9%
fma-neg33.9%
sqr-neg33.9%
sqr-neg33.9%
sqr-neg33.9%
Simplified33.9%
Taylor expanded in x around inf 51.6%
distribute-lft-out51.6%
unpow251.6%
+-commutative51.6%
unpow251.6%
fma-udef51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 51.7%
unpow251.7%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in t around -inf 36.7%
Final simplification36.7%
herbie shell --seed 2023274
(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)))))