
(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)))
(t_2 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(t_3 (+ (/ 4.0 x) (+ 2.0 (/ 4.0 (* x x)))))
(t_4
(/
(sqrt 2.0)
(/
(-
(*
(* -0.5 (/ (* (+ (/ 2.0 (* x x)) (/ 2.0 x)) (* l l)) t))
(sqrt (/ 1.0 t_3)))
(* t (sqrt t_3)))
t)))
(t_5 (fma 2.0 (* t t) (* l l))))
(if (<= t -4.3e-32)
(/ -1.0 t_2)
(if (<= t -3.2e-186)
t_4
(if (<= t -1.75e-232)
(* (/ (sqrt 2.0) l) (* t (pow (/ 2.0 x) -0.5)))
(if (<= t -1.45e-300)
t_4
(if (<= t 5.8e-199)
(/ (/ t l) (pow x -0.5))
(if (<= t 6e-159)
(/
(sqrt 2.0)
(/ (fma 0.5 (/ (* 2.0 t_5) (* t (* x (sqrt 2.0)))) t_1) t))
(if (<= t 4.1e+58)
(/
(sqrt 2.0)
(/
(sqrt
(+
(fma
-1.0
(/ (- (- t_5) t_5) (* x x))
(fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x))))
(/ t_5 x)))
t))
(* t (/ (sqrt 2.0) (* t_1 t_2))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = sqrt(((x + 1.0) / (-1.0 + x)));
double t_3 = (4.0 / x) + (2.0 + (4.0 / (x * x)));
double t_4 = sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * sqrt((1.0 / t_3))) - (t * sqrt(t_3))) / t);
double t_5 = fma(2.0, (t * t), (l * l));
double tmp;
if (t <= -4.3e-32) {
tmp = -1.0 / t_2;
} else if (t <= -3.2e-186) {
tmp = t_4;
} else if (t <= -1.75e-232) {
tmp = (sqrt(2.0) / l) * (t * pow((2.0 / x), -0.5));
} else if (t <= -1.45e-300) {
tmp = t_4;
} else if (t <= 5.8e-199) {
tmp = (t / l) / pow(x, -0.5);
} else if (t <= 6e-159) {
tmp = sqrt(2.0) / (fma(0.5, ((2.0 * t_5) / (t * (x * sqrt(2.0)))), t_1) / t);
} else if (t <= 4.1e+58) {
tmp = sqrt(2.0) / (sqrt((fma(-1.0, ((-t_5 - t_5) / (x * x)), fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x)))) + (t_5 / x))) / t);
} else {
tmp = t * (sqrt(2.0) / (t_1 * t_2));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) t_3 = Float64(Float64(4.0 / x) + Float64(2.0 + Float64(4.0 / Float64(x * x)))) t_4 = Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(-0.5 * Float64(Float64(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)) * Float64(l * l)) / t)) * sqrt(Float64(1.0 / t_3))) - Float64(t * sqrt(t_3))) / t)) t_5 = fma(2.0, Float64(t * t), Float64(l * l)) tmp = 0.0 if (t <= -4.3e-32) tmp = Float64(-1.0 / t_2); elseif (t <= -3.2e-186) tmp = t_4; elseif (t <= -1.75e-232) tmp = Float64(Float64(sqrt(2.0) / l) * Float64(t * (Float64(2.0 / x) ^ -0.5))); elseif (t <= -1.45e-300) tmp = t_4; elseif (t <= 5.8e-199) tmp = Float64(Float64(t / l) / (x ^ -0.5)); elseif (t <= 6e-159) tmp = Float64(sqrt(2.0) / Float64(fma(0.5, Float64(Float64(2.0 * t_5) / Float64(t * Float64(x * sqrt(2.0)))), t_1) / t)); elseif (t <= 4.1e+58) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(fma(-1.0, Float64(Float64(Float64(-t_5) - t_5) / Float64(x * x)), fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x)))) + Float64(t_5 / x))) / t)); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(t_1 * t_2))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(4.0 / x), $MachinePrecision] + N[(2.0 + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(-0.5 * N[(N[(N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e-32], N[(-1.0 / t$95$2), $MachinePrecision], If[LessEqual[t, -3.2e-186], t$95$4, If[LessEqual[t, -1.75e-232], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-300], t$95$4, If[LessEqual[t, 5.8e-199], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-159], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(0.5 * N[(N[(2.0 * t$95$5), $MachinePrecision] / N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+58], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(-1.0 * N[(N[((-t$95$5) - t$95$5), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \sqrt{\frac{x + 1}{-1 + x}}\\
t_3 := \frac{4}{x} + \left(2 + \frac{4}{x \cdot x}\right)\\
t_4 := \frac{\sqrt{2}}{\frac{\left(-0.5 \cdot \frac{\left(\frac{2}{x \cdot x} + \frac{2}{x}\right) \cdot \left(\ell \cdot \ell\right)}{t}\right) \cdot \sqrt{\frac{1}{t_3}} - t \cdot \sqrt{t_3}}{t}}\\
t_5 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{t_2}\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-186}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-232}:\\
\;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-300}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-199}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-159}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{fma}\left(0.5, \frac{2 \cdot t_5}{t \cdot \left(x \cdot \sqrt{2}\right)}, t_1\right)}{t}}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+58}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\mathsf{fma}\left(-1, \frac{\left(-t_5\right) - t_5}{x \cdot x}, \mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right)\right) + \frac{t_5}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t_1 \cdot t_2}\\
\end{array}
\end{array}
if t < -4.2999999999999999e-32Initial program 35.2%
Simplified35.2%
Taylor expanded in t around -inf 85.8%
associate-*r*85.8%
neg-mul-185.8%
+-commutative85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
Simplified85.8%
frac-2neg85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-lft-neg-in85.8%
times-frac85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
metadata-eval85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-*r/85.8%
*-rgt-identity85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
if -4.2999999999999999e-32 < t < -3.2e-186 or -1.7499999999999999e-232 < t < -1.44999999999999996e-300Initial program 24.2%
Simplified24.2%
Taylor expanded in x around -inf 57.4%
Simplified57.4%
Taylor expanded in t around -inf 78.9%
Simplified81.8%
if -3.2e-186 < t < -1.7499999999999999e-232Initial program 6.7%
Simplified6.7%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 24.1%
associate-/r*24.1%
div-inv24.1%
associate-/r/24.1%
pow1/224.1%
pow-flip24.1%
metadata-eval24.1%
Applied egg-rr24.1%
associate-*l*39.8%
Simplified39.8%
if -1.44999999999999996e-300 < t < 5.8e-199Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 0.7%
Taylor expanded in x around inf 46.8%
associate-/r*46.8%
div-inv46.8%
times-frac46.8%
*-commutative46.8%
times-frac46.8%
clear-num46.8%
times-frac46.7%
*-commutative46.7%
sqrt-div46.7%
associate-*r/46.8%
un-div-inv46.8%
metadata-eval46.8%
sqrt-div46.8%
*-commutative46.8%
times-frac46.8%
inv-pow46.8%
sqrt-pow146.8%
metadata-eval46.8%
Applied egg-rr46.8%
associate-/r*46.9%
associate-*r/46.9%
associate-*l/46.9%
associate-*r/46.9%
associate-/r*46.9%
associate-*l/46.9%
*-inverses46.9%
associate-/r*46.9%
*-lft-identity46.9%
Simplified46.9%
if 5.8e-199 < t < 6.00000000000000018e-159Initial program 12.4%
Simplified12.4%
Taylor expanded in x around -inf 23.1%
Simplified23.1%
Taylor expanded in x around inf 89.3%
fma-def89.3%
Simplified89.3%
if 6.00000000000000018e-159 < t < 4.1e58Initial program 52.9%
Simplified52.9%
Taylor expanded in x around -inf 78.2%
Simplified78.2%
if 4.1e58 < t Initial program 38.1%
Simplified38.0%
Taylor expanded in t around inf 93.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Final simplification82.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 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(t_3 (+ (/ 4.0 x) (+ 2.0 (/ 4.0 (* x x)))))
(t_4
(/
(sqrt 2.0)
(/
(-
(*
(* -0.5 (/ (* (+ (/ 2.0 (* x x)) (/ 2.0 x)) (* l l)) t))
(sqrt (/ 1.0 t_3)))
(* t (sqrt t_3)))
t)))
(t_5 (fma 2.0 (* t t) (* l l))))
(if (<= t -4.8e-34)
(/ -1.0 t_2)
(if (<= t -4.8e-186)
t_4
(if (<= t -7.5e-233)
(* (/ (sqrt 2.0) l) (* t (pow (/ 2.0 x) -0.5)))
(if (<= t -4.6e-299)
t_4
(if (<= t 5.6e-199)
(/ (/ t l) (pow x -0.5))
(if (<= t 8.5e-160)
(/
(sqrt 2.0)
(/ (fma 0.5 (/ (* 2.0 t_5) (* t (* x (sqrt 2.0)))) t_1) t))
(if (<= t 5.2e+59)
(/
(sqrt 2.0)
(/
(sqrt
(+
(fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x)))
(/ t_5 x)))
t))
(* t (/ (sqrt 2.0) (* t_1 t_2))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = sqrt(((x + 1.0) / (-1.0 + x)));
double t_3 = (4.0 / x) + (2.0 + (4.0 / (x * x)));
double t_4 = sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * sqrt((1.0 / t_3))) - (t * sqrt(t_3))) / t);
double t_5 = fma(2.0, (t * t), (l * l));
double tmp;
if (t <= -4.8e-34) {
tmp = -1.0 / t_2;
} else if (t <= -4.8e-186) {
tmp = t_4;
} else if (t <= -7.5e-233) {
tmp = (sqrt(2.0) / l) * (t * pow((2.0 / x), -0.5));
} else if (t <= -4.6e-299) {
tmp = t_4;
} else if (t <= 5.6e-199) {
tmp = (t / l) / pow(x, -0.5);
} else if (t <= 8.5e-160) {
tmp = sqrt(2.0) / (fma(0.5, ((2.0 * t_5) / (t * (x * sqrt(2.0)))), t_1) / t);
} else if (t <= 5.2e+59) {
tmp = sqrt(2.0) / (sqrt((fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x))) + (t_5 / x))) / t);
} else {
tmp = t * (sqrt(2.0) / (t_1 * t_2));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) t_3 = Float64(Float64(4.0 / x) + Float64(2.0 + Float64(4.0 / Float64(x * x)))) t_4 = Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(-0.5 * Float64(Float64(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)) * Float64(l * l)) / t)) * sqrt(Float64(1.0 / t_3))) - Float64(t * sqrt(t_3))) / t)) t_5 = fma(2.0, Float64(t * t), Float64(l * l)) tmp = 0.0 if (t <= -4.8e-34) tmp = Float64(-1.0 / t_2); elseif (t <= -4.8e-186) tmp = t_4; elseif (t <= -7.5e-233) tmp = Float64(Float64(sqrt(2.0) / l) * Float64(t * (Float64(2.0 / x) ^ -0.5))); elseif (t <= -4.6e-299) tmp = t_4; elseif (t <= 5.6e-199) tmp = Float64(Float64(t / l) / (x ^ -0.5)); elseif (t <= 8.5e-160) tmp = Float64(sqrt(2.0) / Float64(fma(0.5, Float64(Float64(2.0 * t_5) / Float64(t * Float64(x * sqrt(2.0)))), t_1) / t)); elseif (t <= 5.2e+59) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x))) + Float64(t_5 / x))) / t)); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(t_1 * t_2))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(4.0 / x), $MachinePrecision] + N[(2.0 + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(-0.5 * N[(N[(N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-34], N[(-1.0 / t$95$2), $MachinePrecision], If[LessEqual[t, -4.8e-186], t$95$4, If[LessEqual[t, -7.5e-233], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.6e-299], t$95$4, If[LessEqual[t, 5.6e-199], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-160], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(0.5 * N[(N[(2.0 * t$95$5), $MachinePrecision] / N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+59], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \sqrt{\frac{x + 1}{-1 + x}}\\
t_3 := \frac{4}{x} + \left(2 + \frac{4}{x \cdot x}\right)\\
t_4 := \frac{\sqrt{2}}{\frac{\left(-0.5 \cdot \frac{\left(\frac{2}{x \cdot x} + \frac{2}{x}\right) \cdot \left(\ell \cdot \ell\right)}{t}\right) \cdot \sqrt{\frac{1}{t_3}} - t \cdot \sqrt{t_3}}{t}}\\
t_5 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1}{t_2}\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-186}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-299}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-199}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-160}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{fma}\left(0.5, \frac{2 \cdot t_5}{t \cdot \left(x \cdot \sqrt{2}\right)}, t_1\right)}{t}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{t_5}{x}}}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t_1 \cdot t_2}\\
\end{array}
\end{array}
if t < -4.79999999999999982e-34Initial program 35.2%
Simplified35.2%
Taylor expanded in t around -inf 85.8%
associate-*r*85.8%
neg-mul-185.8%
+-commutative85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
Simplified85.8%
frac-2neg85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-lft-neg-in85.8%
times-frac85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
metadata-eval85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-*r/85.8%
*-rgt-identity85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
if -4.79999999999999982e-34 < t < -4.80000000000000006e-186 or -7.49999999999999974e-233 < t < -4.6000000000000001e-299Initial program 24.2%
Simplified24.2%
Taylor expanded in x around -inf 57.4%
Simplified57.4%
Taylor expanded in t around -inf 78.9%
Simplified81.8%
if -4.80000000000000006e-186 < t < -7.49999999999999974e-233Initial program 6.7%
Simplified6.7%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 24.1%
associate-/r*24.1%
div-inv24.1%
associate-/r/24.1%
pow1/224.1%
pow-flip24.1%
metadata-eval24.1%
Applied egg-rr24.1%
associate-*l*39.8%
Simplified39.8%
if -4.6000000000000001e-299 < t < 5.60000000000000036e-199Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 0.7%
Taylor expanded in x around inf 46.8%
associate-/r*46.8%
div-inv46.8%
times-frac46.8%
*-commutative46.8%
times-frac46.8%
clear-num46.8%
times-frac46.7%
*-commutative46.7%
sqrt-div46.7%
associate-*r/46.8%
un-div-inv46.8%
metadata-eval46.8%
sqrt-div46.8%
*-commutative46.8%
times-frac46.8%
inv-pow46.8%
sqrt-pow146.8%
metadata-eval46.8%
Applied egg-rr46.8%
associate-/r*46.9%
associate-*r/46.9%
associate-*l/46.9%
associate-*r/46.9%
associate-/r*46.9%
associate-*l/46.9%
*-inverses46.9%
associate-/r*46.9%
*-lft-identity46.9%
Simplified46.9%
if 5.60000000000000036e-199 < t < 8.49999999999999959e-160Initial program 12.4%
Simplified12.4%
Taylor expanded in x around -inf 23.1%
Simplified23.1%
Taylor expanded in x around inf 89.3%
fma-def89.3%
Simplified89.3%
if 8.49999999999999959e-160 < t < 5.19999999999999999e59Initial program 52.9%
Simplified52.9%
Taylor expanded in x around inf 77.9%
fma-def77.9%
unpow277.9%
fma-def77.9%
unpow277.9%
unpow277.9%
associate-*r/77.9%
mul-1-neg77.9%
unpow277.9%
fma-def77.9%
unpow277.9%
Simplified77.9%
if 5.19999999999999999e59 < t Initial program 38.1%
Simplified38.0%
Taylor expanded in t around inf 93.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Final simplification82.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ (/ 4.0 x) (+ 2.0 (/ 4.0 (* x x)))))
(t_2
(/
(sqrt 2.0)
(/
(-
(*
(* -0.5 (/ (* (+ (/ 2.0 (* x x)) (/ 2.0 x)) (* l l)) t))
(sqrt (/ 1.0 t_1)))
(* t (sqrt t_1)))
t)))
(t_3 (* t (sqrt 2.0)))
(t_4 (sqrt (/ (+ x 1.0) (+ -1.0 x)))))
(if (<= t -1.12e-31)
(/ -1.0 t_4)
(if (<= t -7.5e-186)
t_2
(if (<= t -8e-233)
(* (/ (sqrt 2.0) l) (* t (pow (/ 2.0 x) -0.5)))
(if (<= t -4.8e-299)
t_2
(if (<= t 5.6e-199)
(/ (/ t l) (pow x -0.5))
(if (<= t 1.02e-122)
(/
(sqrt 2.0)
(/
(fma
0.5
(/ (* 2.0 (fma 2.0 (* t t) (* l l))) (* t (* x (sqrt 2.0))))
t_3)
t))
(if (<= t 2.05e-70)
(*
(/ (pow 2.0 0.25) (/ 1.0 t))
(/ (pow 2.0 0.25) (* l (sqrt (/ 2.0 x)))))
(* t (/ (sqrt 2.0) (* t_3 t_4))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (4.0 / x) + (2.0 + (4.0 / (x * x)));
double t_2 = sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * sqrt((1.0 / t_1))) - (t * sqrt(t_1))) / t);
double t_3 = t * sqrt(2.0);
double t_4 = sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -1.12e-31) {
tmp = -1.0 / t_4;
} else if (t <= -7.5e-186) {
tmp = t_2;
} else if (t <= -8e-233) {
tmp = (sqrt(2.0) / l) * (t * pow((2.0 / x), -0.5));
} else if (t <= -4.8e-299) {
tmp = t_2;
} else if (t <= 5.6e-199) {
tmp = (t / l) / pow(x, -0.5);
} else if (t <= 1.02e-122) {
tmp = sqrt(2.0) / (fma(0.5, ((2.0 * fma(2.0, (t * t), (l * l))) / (t * (x * sqrt(2.0)))), t_3) / t);
} else if (t <= 2.05e-70) {
tmp = (pow(2.0, 0.25) / (1.0 / t)) * (pow(2.0, 0.25) / (l * sqrt((2.0 / x))));
} else {
tmp = t * (sqrt(2.0) / (t_3 * t_4));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(4.0 / x) + Float64(2.0 + Float64(4.0 / Float64(x * x)))) t_2 = Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(-0.5 * Float64(Float64(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)) * Float64(l * l)) / t)) * sqrt(Float64(1.0 / t_1))) - Float64(t * sqrt(t_1))) / t)) t_3 = Float64(t * sqrt(2.0)) t_4 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) tmp = 0.0 if (t <= -1.12e-31) tmp = Float64(-1.0 / t_4); elseif (t <= -7.5e-186) tmp = t_2; elseif (t <= -8e-233) tmp = Float64(Float64(sqrt(2.0) / l) * Float64(t * (Float64(2.0 / x) ^ -0.5))); elseif (t <= -4.8e-299) tmp = t_2; elseif (t <= 5.6e-199) tmp = Float64(Float64(t / l) / (x ^ -0.5)); elseif (t <= 1.02e-122) tmp = Float64(sqrt(2.0) / Float64(fma(0.5, Float64(Float64(2.0 * fma(2.0, Float64(t * t), Float64(l * l))) / Float64(t * Float64(x * sqrt(2.0)))), t_3) / t)); elseif (t <= 2.05e-70) tmp = Float64(Float64((2.0 ^ 0.25) / Float64(1.0 / t)) * Float64((2.0 ^ 0.25) / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(t_3 * t_4))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(4.0 / x), $MachinePrecision] + N[(2.0 + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(-0.5 * N[(N[(N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.12e-31], N[(-1.0 / t$95$4), $MachinePrecision], If[LessEqual[t, -7.5e-186], t$95$2, If[LessEqual[t, -8e-233], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e-299], t$95$2, If[LessEqual[t, 5.6e-199], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-122], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(0.5 * N[(N[(2.0 * N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e-70], N[(N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{4}{x} + \left(2 + \frac{4}{x \cdot x}\right)\\
t_2 := \frac{\sqrt{2}}{\frac{\left(-0.5 \cdot \frac{\left(\frac{2}{x \cdot x} + \frac{2}{x}\right) \cdot \left(\ell \cdot \ell\right)}{t}\right) \cdot \sqrt{\frac{1}{t_1}} - t \cdot \sqrt{t_1}}{t}}\\
t_3 := t \cdot \sqrt{2}\\
t_4 := \sqrt{\frac{x + 1}{-1 + x}}\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{t_4}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-186}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-233}:\\
\;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-299}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-199}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{t \cdot \left(x \cdot \sqrt{2}\right)}, t_3\right)}{t}}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-70}:\\
\;\;\;\;\frac{{2}^{0.25}}{\frac{1}{t}} \cdot \frac{{2}^{0.25}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t_3 \cdot t_4}\\
\end{array}
\end{array}
if t < -1.12e-31Initial program 35.2%
Simplified35.2%
Taylor expanded in t around -inf 85.8%
associate-*r*85.8%
neg-mul-185.8%
+-commutative85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
Simplified85.8%
frac-2neg85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-lft-neg-in85.8%
times-frac85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
metadata-eval85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-*r/85.8%
*-rgt-identity85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
if -1.12e-31 < t < -7.50000000000000076e-186 or -7.99999999999999966e-233 < t < -4.80000000000000039e-299Initial program 24.2%
Simplified24.2%
Taylor expanded in x around -inf 57.4%
Simplified57.4%
Taylor expanded in t around -inf 78.9%
Simplified81.8%
if -7.50000000000000076e-186 < t < -7.99999999999999966e-233Initial program 6.7%
Simplified6.7%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 24.1%
associate-/r*24.1%
div-inv24.1%
associate-/r/24.1%
pow1/224.1%
pow-flip24.1%
metadata-eval24.1%
Applied egg-rr24.1%
associate-*l*39.8%
Simplified39.8%
if -4.80000000000000039e-299 < t < 5.60000000000000036e-199Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 0.7%
Taylor expanded in x around inf 46.8%
associate-/r*46.8%
div-inv46.8%
times-frac46.8%
*-commutative46.8%
times-frac46.8%
clear-num46.8%
times-frac46.7%
*-commutative46.7%
sqrt-div46.7%
associate-*r/46.8%
un-div-inv46.8%
metadata-eval46.8%
sqrt-div46.8%
*-commutative46.8%
times-frac46.8%
inv-pow46.8%
sqrt-pow146.8%
metadata-eval46.8%
Applied egg-rr46.8%
associate-/r*46.9%
associate-*r/46.9%
associate-*l/46.9%
associate-*r/46.9%
associate-/r*46.9%
associate-*l/46.9%
*-inverses46.9%
associate-/r*46.9%
*-lft-identity46.9%
Simplified46.9%
if 5.60000000000000036e-199 < t < 1.02000000000000002e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around -inf 53.8%
Simplified53.8%
Taylor expanded in x around inf 87.2%
fma-def87.2%
Simplified87.2%
if 1.02000000000000002e-122 < t < 2.04999999999999989e-70Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
pow1/238.8%
sqr-pow38.6%
*-commutative38.6%
div-inv38.6%
associate-*r*38.6%
*-commutative38.6%
sqrt-div38.4%
associate-*r/38.2%
un-div-inv38.2%
metadata-eval38.2%
sqrt-div38.5%
*-commutative38.5%
times-frac45.6%
metadata-eval45.6%
metadata-eval45.6%
sqrt-div45.5%
Applied egg-rr45.8%
if 2.04999999999999989e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in t around inf 88.2%
+-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
+-commutative88.2%
Simplified88.2%
Final simplification80.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ (/ 4.0 x) (+ 2.0 (/ 4.0 (* x x)))))
(t_2
(/
(sqrt 2.0)
(/
(-
(*
(* -0.5 (/ (* (+ (/ 2.0 (* x x)) (/ 2.0 x)) (* l l)) t))
(sqrt (/ 1.0 t_1)))
(* t (sqrt t_1)))
t)))
(t_3 (sqrt (/ (+ x 1.0) (+ -1.0 x)))))
(if (<= t -9e-32)
(/ -1.0 t_3)
(if (<= t -3.7e-186)
t_2
(if (<= t -1.75e-232)
(* (/ (sqrt 2.0) l) (* t (pow (/ 2.0 x) -0.5)))
(if (<= t -2.8e-301)
t_2
(if (<= t 1e-198)
(/ (/ t l) (pow x -0.5))
(if (<= t 1.02e-122)
1.0
(if (<= t 1.9e-69)
(*
(/ (pow 2.0 0.25) (/ 1.0 t))
(/ (pow 2.0 0.25) (* l (sqrt (/ 2.0 x)))))
(* t (/ (sqrt 2.0) (* (* t (sqrt 2.0)) t_3))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (4.0 / x) + (2.0 + (4.0 / (x * x)));
double t_2 = sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * sqrt((1.0 / t_1))) - (t * sqrt(t_1))) / t);
double t_3 = sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -9e-32) {
tmp = -1.0 / t_3;
} else if (t <= -3.7e-186) {
tmp = t_2;
} else if (t <= -1.75e-232) {
tmp = (sqrt(2.0) / l) * (t * pow((2.0 / x), -0.5));
} else if (t <= -2.8e-301) {
tmp = t_2;
} else if (t <= 1e-198) {
tmp = (t / l) / pow(x, -0.5);
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 1.9e-69) {
tmp = (pow(2.0, 0.25) / (1.0 / t)) * (pow(2.0, 0.25) / (l * sqrt((2.0 / x))));
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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 = (4.0d0 / x) + (2.0d0 + (4.0d0 / (x * x)))
t_2 = sqrt(2.0d0) / (((((-0.5d0) * ((((2.0d0 / (x * x)) + (2.0d0 / x)) * (l * l)) / t)) * sqrt((1.0d0 / t_1))) - (t * sqrt(t_1))) / t)
t_3 = sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
if (t <= (-9d-32)) then
tmp = (-1.0d0) / t_3
else if (t <= (-3.7d-186)) then
tmp = t_2
else if (t <= (-1.75d-232)) then
tmp = (sqrt(2.0d0) / l) * (t * ((2.0d0 / x) ** (-0.5d0)))
else if (t <= (-2.8d-301)) then
tmp = t_2
else if (t <= 1d-198) then
tmp = (t / l) / (x ** (-0.5d0))
else if (t <= 1.02d-122) then
tmp = 1.0d0
else if (t <= 1.9d-69) then
tmp = ((2.0d0 ** 0.25d0) / (1.0d0 / t)) * ((2.0d0 ** 0.25d0) / (l * sqrt((2.0d0 / x))))
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * 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 = (4.0 / x) + (2.0 + (4.0 / (x * x)));
double t_2 = Math.sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * Math.sqrt((1.0 / t_1))) - (t * Math.sqrt(t_1))) / t);
double t_3 = Math.sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -9e-32) {
tmp = -1.0 / t_3;
} else if (t <= -3.7e-186) {
tmp = t_2;
} else if (t <= -1.75e-232) {
tmp = (Math.sqrt(2.0) / l) * (t * Math.pow((2.0 / x), -0.5));
} else if (t <= -2.8e-301) {
tmp = t_2;
} else if (t <= 1e-198) {
tmp = (t / l) / Math.pow(x, -0.5);
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 1.9e-69) {
tmp = (Math.pow(2.0, 0.25) / (1.0 / t)) * (Math.pow(2.0, 0.25) / (l * Math.sqrt((2.0 / x))));
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * t_3));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (4.0 / x) + (2.0 + (4.0 / (x * x))) t_2 = math.sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * math.sqrt((1.0 / t_1))) - (t * math.sqrt(t_1))) / t) t_3 = math.sqrt(((x + 1.0) / (-1.0 + x))) tmp = 0 if t <= -9e-32: tmp = -1.0 / t_3 elif t <= -3.7e-186: tmp = t_2 elif t <= -1.75e-232: tmp = (math.sqrt(2.0) / l) * (t * math.pow((2.0 / x), -0.5)) elif t <= -2.8e-301: tmp = t_2 elif t <= 1e-198: tmp = (t / l) / math.pow(x, -0.5) elif t <= 1.02e-122: tmp = 1.0 elif t <= 1.9e-69: tmp = (math.pow(2.0, 0.25) / (1.0 / t)) * (math.pow(2.0, 0.25) / (l * math.sqrt((2.0 / x)))) else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * t_3)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(4.0 / x) + Float64(2.0 + Float64(4.0 / Float64(x * x)))) t_2 = Float64(sqrt(2.0) / Float64(Float64(Float64(Float64(-0.5 * Float64(Float64(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)) * Float64(l * l)) / t)) * sqrt(Float64(1.0 / t_1))) - Float64(t * sqrt(t_1))) / t)) t_3 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) tmp = 0.0 if (t <= -9e-32) tmp = Float64(-1.0 / t_3); elseif (t <= -3.7e-186) tmp = t_2; elseif (t <= -1.75e-232) tmp = Float64(Float64(sqrt(2.0) / l) * Float64(t * (Float64(2.0 / x) ^ -0.5))); elseif (t <= -2.8e-301) tmp = t_2; elseif (t <= 1e-198) tmp = Float64(Float64(t / l) / (x ^ -0.5)); elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 1.9e-69) tmp = Float64(Float64((2.0 ^ 0.25) / Float64(1.0 / t)) * Float64((2.0 ^ 0.25) / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * t_3))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (4.0 / x) + (2.0 + (4.0 / (x * x))); t_2 = sqrt(2.0) / ((((-0.5 * ((((2.0 / (x * x)) + (2.0 / x)) * (l * l)) / t)) * sqrt((1.0 / t_1))) - (t * sqrt(t_1))) / t); t_3 = sqrt(((x + 1.0) / (-1.0 + x))); tmp = 0.0; if (t <= -9e-32) tmp = -1.0 / t_3; elseif (t <= -3.7e-186) tmp = t_2; elseif (t <= -1.75e-232) tmp = (sqrt(2.0) / l) * (t * ((2.0 / x) ^ -0.5)); elseif (t <= -2.8e-301) tmp = t_2; elseif (t <= 1e-198) tmp = (t / l) / (x ^ -0.5); elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 1.9e-69) tmp = ((2.0 ^ 0.25) / (1.0 / t)) * ((2.0 ^ 0.25) / (l * sqrt((2.0 / x)))); else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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[(N[(4.0 / x), $MachinePrecision] + N[(2.0 + N[(4.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(N[(-0.5 * N[(N[(N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -9e-32], N[(-1.0 / t$95$3), $MachinePrecision], If[LessEqual[t, -3.7e-186], t$95$2, If[LessEqual[t, -1.75e-232], N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.8e-301], t$95$2, If[LessEqual[t, 1e-198], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-122], 1.0, If[LessEqual[t, 1.9e-69], N[(N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{4}{x} + \left(2 + \frac{4}{x \cdot x}\right)\\
t_2 := \frac{\sqrt{2}}{\frac{\left(-0.5 \cdot \frac{\left(\frac{2}{x \cdot x} + \frac{2}{x}\right) \cdot \left(\ell \cdot \ell\right)}{t}\right) \cdot \sqrt{\frac{1}{t_1}} - t \cdot \sqrt{t_1}}{t}}\\
t_3 := \sqrt{\frac{x + 1}{-1 + x}}\\
\mathbf{if}\;t \leq -9 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{t_3}\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-186}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-232}:\\
\;\;\;\;\frac{\sqrt{2}}{\ell} \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-301}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 10^{-198}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-69}:\\
\;\;\;\;\frac{{2}^{0.25}}{\frac{1}{t}} \cdot \frac{{2}^{0.25}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot t_3}\\
\end{array}
\end{array}
if t < -9.00000000000000009e-32Initial program 35.2%
Simplified35.2%
Taylor expanded in t around -inf 85.8%
associate-*r*85.8%
neg-mul-185.8%
+-commutative85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
Simplified85.8%
frac-2neg85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-lft-neg-in85.8%
times-frac85.8%
neg-mul-185.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
metadata-eval85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-*r/85.8%
*-rgt-identity85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
if -9.00000000000000009e-32 < t < -3.7000000000000002e-186 or -1.7499999999999999e-232 < t < -2.8000000000000001e-301Initial program 24.2%
Simplified24.2%
Taylor expanded in x around -inf 57.4%
Simplified57.4%
Taylor expanded in t around -inf 78.9%
Simplified81.8%
if -3.7000000000000002e-186 < t < -1.7499999999999999e-232Initial program 6.7%
Simplified6.7%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 24.1%
associate-/r*24.1%
div-inv24.1%
associate-/r/24.1%
pow1/224.1%
pow-flip24.1%
metadata-eval24.1%
Applied egg-rr24.1%
associate-*l*39.8%
Simplified39.8%
if -2.8000000000000001e-301 < t < 9.9999999999999991e-199Initial program 2.0%
Simplified2.0%
Taylor expanded in l around inf 0.7%
Taylor expanded in x around inf 46.8%
associate-/r*46.8%
div-inv46.8%
times-frac46.8%
*-commutative46.8%
times-frac46.8%
clear-num46.8%
times-frac46.7%
*-commutative46.7%
sqrt-div46.7%
associate-*r/46.8%
un-div-inv46.8%
metadata-eval46.8%
sqrt-div46.8%
*-commutative46.8%
times-frac46.8%
inv-pow46.8%
sqrt-pow146.8%
metadata-eval46.8%
Applied egg-rr46.8%
associate-/r*46.9%
associate-*r/46.9%
associate-*l/46.9%
associate-*r/46.9%
associate-/r*46.9%
associate-*l/46.9%
*-inverses46.9%
associate-/r*46.9%
*-lft-identity46.9%
Simplified46.9%
if 9.9999999999999991e-199 < t < 1.02000000000000002e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 1.02000000000000002e-122 < t < 1.8999999999999999e-69Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
pow1/238.8%
sqr-pow38.6%
*-commutative38.6%
div-inv38.6%
associate-*r*38.6%
*-commutative38.6%
sqrt-div38.4%
associate-*r/38.2%
un-div-inv38.2%
metadata-eval38.2%
sqrt-div38.5%
*-commutative38.5%
times-frac45.6%
metadata-eval45.6%
metadata-eval45.6%
sqrt-div45.5%
Applied egg-rr45.8%
if 1.8999999999999999e-69 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in t around inf 88.2%
+-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
+-commutative88.2%
Simplified88.2%
Final simplification80.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (sqrt 2.0) l))
(t_2 (* t_1 (* t (pow (/ 2.0 x) -0.5))))
(t_3 (sqrt (/ (+ x 1.0) (+ -1.0 x)))))
(if (<= t -4.4e-72)
(/ -1.0 t_3)
(if (<= t -1.6e-109)
t_2
(if (<= t -1.28e-185)
-1.0
(if (<= t 3.4e-198)
t_2
(if (<= t 1.02e-122)
1.0
(if (<= t 2.7e-70)
(* t (/ t_1 (sqrt (/ 2.0 x))))
(* t (/ (sqrt 2.0) (* (* t (sqrt 2.0)) t_3)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) / l;
double t_2 = t_1 * (t * pow((2.0 / x), -0.5));
double t_3 = sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -4.4e-72) {
tmp = -1.0 / t_3;
} else if (t <= -1.6e-109) {
tmp = t_2;
} else if (t <= -1.28e-185) {
tmp = -1.0;
} else if (t <= 3.4e-198) {
tmp = t_2;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 2.7e-70) {
tmp = t * (t_1 / sqrt((2.0 / x)));
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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 = sqrt(2.0d0) / l
t_2 = t_1 * (t * ((2.0d0 / x) ** (-0.5d0)))
t_3 = sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
if (t <= (-4.4d-72)) then
tmp = (-1.0d0) / t_3
else if (t <= (-1.6d-109)) then
tmp = t_2
else if (t <= (-1.28d-185)) then
tmp = -1.0d0
else if (t <= 3.4d-198) then
tmp = t_2
else if (t <= 1.02d-122) then
tmp = 1.0d0
else if (t <= 2.7d-70) then
tmp = t * (t_1 / sqrt((2.0d0 / x)))
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * 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 = Math.sqrt(2.0) / l;
double t_2 = t_1 * (t * Math.pow((2.0 / x), -0.5));
double t_3 = Math.sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -4.4e-72) {
tmp = -1.0 / t_3;
} else if (t <= -1.6e-109) {
tmp = t_2;
} else if (t <= -1.28e-185) {
tmp = -1.0;
} else if (t <= 3.4e-198) {
tmp = t_2;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 2.7e-70) {
tmp = t * (t_1 / Math.sqrt((2.0 / x)));
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * t_3));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) / l t_2 = t_1 * (t * math.pow((2.0 / x), -0.5)) t_3 = math.sqrt(((x + 1.0) / (-1.0 + x))) tmp = 0 if t <= -4.4e-72: tmp = -1.0 / t_3 elif t <= -1.6e-109: tmp = t_2 elif t <= -1.28e-185: tmp = -1.0 elif t <= 3.4e-198: tmp = t_2 elif t <= 1.02e-122: tmp = 1.0 elif t <= 2.7e-70: tmp = t * (t_1 / math.sqrt((2.0 / x))) else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * t_3)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) / l) t_2 = Float64(t_1 * Float64(t * (Float64(2.0 / x) ^ -0.5))) t_3 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(-1.0 / t_3); elseif (t <= -1.6e-109) tmp = t_2; elseif (t <= -1.28e-185) tmp = -1.0; elseif (t <= 3.4e-198) tmp = t_2; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 2.7e-70) tmp = Float64(t * Float64(t_1 / sqrt(Float64(2.0 / x)))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * t_3))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) / l; t_2 = t_1 * (t * ((2.0 / x) ^ -0.5)); t_3 = sqrt(((x + 1.0) / (-1.0 + x))); tmp = 0.0; if (t <= -4.4e-72) tmp = -1.0 / t_3; elseif (t <= -1.6e-109) tmp = t_2; elseif (t <= -1.28e-185) tmp = -1.0; elseif (t <= 3.4e-198) tmp = t_2; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 2.7e-70) tmp = t * (t_1 / sqrt((2.0 / x))); else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(-1.0 / t$95$3), $MachinePrecision], If[LessEqual[t, -1.6e-109], t$95$2, If[LessEqual[t, -1.28e-185], -1.0, If[LessEqual[t, 3.4e-198], t$95$2, If[LessEqual[t, 1.02e-122], 1.0, If[LessEqual[t, 2.7e-70], N[(t * N[(t$95$1 / N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{\ell}\\
t_2 := t_1 \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
t_3 := \sqrt{\frac{x + 1}{-1 + x}}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{t_3}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.28 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-198}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-70}:\\
\;\;\;\;t \cdot \frac{t_1}{\sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot t_3}\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -4.40000000000000005e-72 < t < -1.6000000000000001e-109 or -1.28e-185 < t < 3.3999999999999998e-198Initial program 7.1%
Simplified7.1%
Taylor expanded in l around inf 0.9%
Taylor expanded in x around inf 41.9%
associate-/r*41.9%
div-inv41.9%
associate-/r/42.3%
pow1/242.3%
pow-flip42.3%
metadata-eval42.3%
Applied egg-rr42.3%
associate-*l*48.2%
Simplified48.2%
if -1.6000000000000001e-109 < t < -1.28e-185Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 3.3999999999999998e-198 < t < 1.02000000000000002e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 1.02000000000000002e-122 < t < 2.7000000000000001e-70Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
*-commutative38.8%
associate-*r/38.6%
*-commutative38.6%
sqrt-div38.6%
associate-*r/38.5%
un-div-inv38.5%
metadata-eval38.5%
sqrt-div38.5%
*-commutative38.5%
*-commutative38.5%
associate-/r/45.8%
Applied egg-rr45.8%
if 2.7000000000000001e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in t around inf 88.2%
+-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
+-commutative88.2%
Simplified88.2%
Final simplification78.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ (sqrt 2.0) l) (* t (pow (/ 2.0 x) -0.5))))
(t_2 (sqrt (/ (+ x 1.0) (+ -1.0 x)))))
(if (<= t -4.45e-72)
(/ -1.0 t_2)
(if (<= t -5.5e-113)
t_1
(if (<= t -4.4e-185)
-1.0
(if (<= t 6e-197)
t_1
(if (<= t 1.02e-122)
1.0
(if (<= t 2.35e-70)
(*
(/ (pow 2.0 0.25) (/ 1.0 t))
(/ (pow 2.0 0.25) (* l (sqrt (/ 2.0 x)))))
(* t (/ (sqrt 2.0) (* (* t (sqrt 2.0)) t_2)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (sqrt(2.0) / l) * (t * pow((2.0 / x), -0.5));
double t_2 = sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -4.45e-72) {
tmp = -1.0 / t_2;
} else if (t <= -5.5e-113) {
tmp = t_1;
} else if (t <= -4.4e-185) {
tmp = -1.0;
} else if (t <= 6e-197) {
tmp = t_1;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 2.35e-70) {
tmp = (pow(2.0, 0.25) / (1.0 / t)) * (pow(2.0, 0.25) / (l * sqrt((2.0 / x))));
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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) / l) * (t * ((2.0d0 / x) ** (-0.5d0)))
t_2 = sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
if (t <= (-4.45d-72)) then
tmp = (-1.0d0) / t_2
else if (t <= (-5.5d-113)) then
tmp = t_1
else if (t <= (-4.4d-185)) then
tmp = -1.0d0
else if (t <= 6d-197) then
tmp = t_1
else if (t <= 1.02d-122) then
tmp = 1.0d0
else if (t <= 2.35d-70) then
tmp = ((2.0d0 ** 0.25d0) / (1.0d0 / t)) * ((2.0d0 ** 0.25d0) / (l * sqrt((2.0d0 / x))))
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * 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) / l) * (t * Math.pow((2.0 / x), -0.5));
double t_2 = Math.sqrt(((x + 1.0) / (-1.0 + x)));
double tmp;
if (t <= -4.45e-72) {
tmp = -1.0 / t_2;
} else if (t <= -5.5e-113) {
tmp = t_1;
} else if (t <= -4.4e-185) {
tmp = -1.0;
} else if (t <= 6e-197) {
tmp = t_1;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 2.35e-70) {
tmp = (Math.pow(2.0, 0.25) / (1.0 / t)) * (Math.pow(2.0, 0.25) / (l * Math.sqrt((2.0 / x))));
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * t_2));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (math.sqrt(2.0) / l) * (t * math.pow((2.0 / x), -0.5)) t_2 = math.sqrt(((x + 1.0) / (-1.0 + x))) tmp = 0 if t <= -4.45e-72: tmp = -1.0 / t_2 elif t <= -5.5e-113: tmp = t_1 elif t <= -4.4e-185: tmp = -1.0 elif t <= 6e-197: tmp = t_1 elif t <= 1.02e-122: tmp = 1.0 elif t <= 2.35e-70: tmp = (math.pow(2.0, 0.25) / (1.0 / t)) * (math.pow(2.0, 0.25) / (l * math.sqrt((2.0 / x)))) else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * t_2)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(sqrt(2.0) / l) * Float64(t * (Float64(2.0 / x) ^ -0.5))) t_2 = sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x))) tmp = 0.0 if (t <= -4.45e-72) tmp = Float64(-1.0 / t_2); elseif (t <= -5.5e-113) tmp = t_1; elseif (t <= -4.4e-185) tmp = -1.0; elseif (t <= 6e-197) tmp = t_1; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 2.35e-70) tmp = Float64(Float64((2.0 ^ 0.25) / Float64(1.0 / t)) * Float64((2.0 ^ 0.25) / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * t_2))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (sqrt(2.0) / l) * (t * ((2.0 / x) ^ -0.5)); t_2 = sqrt(((x + 1.0) / (-1.0 + x))); tmp = 0.0; if (t <= -4.45e-72) tmp = -1.0 / t_2; elseif (t <= -5.5e-113) tmp = t_1; elseif (t <= -4.4e-185) tmp = -1.0; elseif (t <= 6e-197) tmp = t_1; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 2.35e-70) tmp = ((2.0 ^ 0.25) / (1.0 / t)) * ((2.0 ^ 0.25) / (l * sqrt((2.0 / x)))); else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * 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[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $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, -4.45e-72], N[(-1.0 / t$95$2), $MachinePrecision], If[LessEqual[t, -5.5e-113], t$95$1, If[LessEqual[t, -4.4e-185], -1.0, If[LessEqual[t, 6e-197], t$95$1, If[LessEqual[t, 1.02e-122], 1.0, If[LessEqual[t, 2.35e-70], N[(N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 0.25], $MachinePrecision] / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{\ell} \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
t_2 := \sqrt{\frac{x + 1}{-1 + x}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{t_2}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-70}:\\
\;\;\;\;\frac{{2}^{0.25}}{\frac{1}{t}} \cdot \frac{{2}^{0.25}}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot t_2}\\
\end{array}
\end{array}
if t < -4.4499999999999999e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -4.4499999999999999e-72 < t < -5.50000000000000053e-113 or -4.4000000000000001e-185 < t < 6.00000000000000051e-197Initial program 7.1%
Simplified7.1%
Taylor expanded in l around inf 0.9%
Taylor expanded in x around inf 41.9%
associate-/r*41.9%
div-inv41.9%
associate-/r/42.3%
pow1/242.3%
pow-flip42.3%
metadata-eval42.3%
Applied egg-rr42.3%
associate-*l*48.2%
Simplified48.2%
if -5.50000000000000053e-113 < t < -4.4000000000000001e-185Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 6.00000000000000051e-197 < t < 1.02000000000000002e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 1.02000000000000002e-122 < t < 2.3499999999999999e-70Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
pow1/238.8%
sqr-pow38.6%
*-commutative38.6%
div-inv38.6%
associate-*r*38.6%
*-commutative38.6%
sqrt-div38.4%
associate-*r/38.2%
un-div-inv38.2%
metadata-eval38.2%
sqrt-div38.5%
*-commutative38.5%
times-frac45.6%
metadata-eval45.6%
metadata-eval45.6%
sqrt-div45.5%
Applied egg-rr45.8%
if 2.3499999999999999e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in t around inf 88.2%
+-commutative88.2%
sub-neg88.2%
metadata-eval88.2%
+-commutative88.2%
Simplified88.2%
Final simplification78.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ (sqrt 2.0) l) (/ t (sqrt (/ 2.0 x))))))
(if (<= t -1.16e-69)
(/ -1.0 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(if (<= t -2.3e-114)
t_1
(if (<= t -6.2e-184)
-1.0
(if (<= t 2.2e-197)
t_1
(if (<= t 1e-122)
1.0
(if (<= t 1.9e-70)
t_1
(/ (sqrt 2.0) (sqrt (+ 2.0 (/ 4.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (sqrt(2.0) / l) * (t / sqrt((2.0 / x)));
double tmp;
if (t <= -1.16e-69) {
tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -2.3e-114) {
tmp = t_1;
} else if (t <= -6.2e-184) {
tmp = -1.0;
} else if (t <= 2.2e-197) {
tmp = t_1;
} else if (t <= 1e-122) {
tmp = 1.0;
} else if (t <= 1.9e-70) {
tmp = t_1;
} else {
tmp = sqrt(2.0) / sqrt((2.0 + (4.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 = (sqrt(2.0d0) / l) * (t / sqrt((2.0d0 / x)))
if (t <= (-1.16d-69)) then
tmp = (-1.0d0) / sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
else if (t <= (-2.3d-114)) then
tmp = t_1
else if (t <= (-6.2d-184)) then
tmp = -1.0d0
else if (t <= 2.2d-197) then
tmp = t_1
else if (t <= 1d-122) then
tmp = 1.0d0
else if (t <= 1.9d-70) then
tmp = t_1
else
tmp = sqrt(2.0d0) / sqrt((2.0d0 + (4.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 = (Math.sqrt(2.0) / l) * (t / Math.sqrt((2.0 / x)));
double tmp;
if (t <= -1.16e-69) {
tmp = -1.0 / Math.sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -2.3e-114) {
tmp = t_1;
} else if (t <= -6.2e-184) {
tmp = -1.0;
} else if (t <= 2.2e-197) {
tmp = t_1;
} else if (t <= 1e-122) {
tmp = 1.0;
} else if (t <= 1.9e-70) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) / Math.sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (math.sqrt(2.0) / l) * (t / math.sqrt((2.0 / x))) tmp = 0 if t <= -1.16e-69: tmp = -1.0 / math.sqrt(((x + 1.0) / (-1.0 + x))) elif t <= -2.3e-114: tmp = t_1 elif t <= -6.2e-184: tmp = -1.0 elif t <= 2.2e-197: tmp = t_1 elif t <= 1e-122: tmp = 1.0 elif t <= 1.9e-70: tmp = t_1 else: tmp = math.sqrt(2.0) / math.sqrt((2.0 + (4.0 / x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(sqrt(2.0) / l) * Float64(t / sqrt(Float64(2.0 / x)))) tmp = 0.0 if (t <= -1.16e-69) tmp = Float64(-1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x)))); elseif (t <= -2.3e-114) tmp = t_1; elseif (t <= -6.2e-184) tmp = -1.0; elseif (t <= 2.2e-197) tmp = t_1; elseif (t <= 1e-122) tmp = 1.0; elseif (t <= 1.9e-70) tmp = t_1; else tmp = Float64(sqrt(2.0) / sqrt(Float64(2.0 + Float64(4.0 / x)))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (sqrt(2.0) / l) * (t / sqrt((2.0 / x))); tmp = 0.0; if (t <= -1.16e-69) tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x))); elseif (t <= -2.3e-114) tmp = t_1; elseif (t <= -6.2e-184) tmp = -1.0; elseif (t <= 2.2e-197) tmp = t_1; elseif (t <= 1e-122) tmp = 1.0; elseif (t <= 1.9e-70) tmp = t_1; else tmp = sqrt(2.0) / sqrt((2.0 + (4.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[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.16e-69], N[(-1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.3e-114], t$95$1, If[LessEqual[t, -6.2e-184], -1.0, If[LessEqual[t, 2.2e-197], t$95$1, If[LessEqual[t, 1e-122], 1.0, If[LessEqual[t, 1.9e-70], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{\ell} \cdot \frac{t}{\sqrt{\frac{2}{x}}}\\
\mathbf{if}\;t \leq -1.16 \cdot 10^{-69}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{x + 1}{-1 + x}}}\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-184}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}\\
\end{array}
\end{array}
if t < -1.15999999999999989e-69Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -1.15999999999999989e-69 < t < -2.2999999999999999e-114 or -6.2000000000000004e-184 < t < 2.2e-197 or 1.00000000000000006e-122 < t < 1.8999999999999999e-70Initial program 9.8%
Simplified9.8%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 41.4%
associate-/r*41.3%
div-inv41.4%
times-frac41.4%
*-commutative41.4%
times-frac41.4%
clear-num41.9%
times-frac47.7%
*-commutative47.7%
times-frac47.8%
Applied egg-rr47.8%
if -2.2999999999999999e-114 < t < -6.2000000000000004e-184Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 2.2e-197 < t < 1.00000000000000006e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 1.8999999999999999e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in x around inf 48.0%
fma-def48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
unpow248.0%
associate-*r/48.0%
mul-1-neg48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in t around inf 87.7%
associate-*r/87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in t around 0 87.8%
associate-*r/87.8%
metadata-eval87.8%
Simplified87.8%
Final simplification78.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (sqrt 2.0) l)) (t_2 (sqrt (/ 2.0 x))) (t_3 (* t_1 (/ t t_2))))
(if (<= t -3e-67)
(/ -1.0 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(if (<= t -7.5e-110)
t_3
(if (<= t -7.2e-181)
-1.0
(if (<= t 2.9e-197)
t_3
(if (<= t 1.02e-122)
1.0
(if (<= t 1.75e-70)
(* t (/ t_1 t_2))
(/ (sqrt 2.0) (sqrt (+ 2.0 (/ 4.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) / l;
double t_2 = sqrt((2.0 / x));
double t_3 = t_1 * (t / t_2);
double tmp;
if (t <= -3e-67) {
tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.5e-110) {
tmp = t_3;
} else if (t <= -7.2e-181) {
tmp = -1.0;
} else if (t <= 2.9e-197) {
tmp = t_3;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 1.75e-70) {
tmp = t * (t_1 / t_2);
} else {
tmp = sqrt(2.0) / sqrt((2.0 + (4.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) :: t_3
real(8) :: tmp
t_1 = sqrt(2.0d0) / l
t_2 = sqrt((2.0d0 / x))
t_3 = t_1 * (t / t_2)
if (t <= (-3d-67)) then
tmp = (-1.0d0) / sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
else if (t <= (-7.5d-110)) then
tmp = t_3
else if (t <= (-7.2d-181)) then
tmp = -1.0d0
else if (t <= 2.9d-197) then
tmp = t_3
else if (t <= 1.02d-122) then
tmp = 1.0d0
else if (t <= 1.75d-70) then
tmp = t * (t_1 / t_2)
else
tmp = sqrt(2.0d0) / sqrt((2.0d0 + (4.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 = Math.sqrt(2.0) / l;
double t_2 = Math.sqrt((2.0 / x));
double t_3 = t_1 * (t / t_2);
double tmp;
if (t <= -3e-67) {
tmp = -1.0 / Math.sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.5e-110) {
tmp = t_3;
} else if (t <= -7.2e-181) {
tmp = -1.0;
} else if (t <= 2.9e-197) {
tmp = t_3;
} else if (t <= 1.02e-122) {
tmp = 1.0;
} else if (t <= 1.75e-70) {
tmp = t * (t_1 / t_2);
} else {
tmp = Math.sqrt(2.0) / Math.sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) / l t_2 = math.sqrt((2.0 / x)) t_3 = t_1 * (t / t_2) tmp = 0 if t <= -3e-67: tmp = -1.0 / math.sqrt(((x + 1.0) / (-1.0 + x))) elif t <= -7.5e-110: tmp = t_3 elif t <= -7.2e-181: tmp = -1.0 elif t <= 2.9e-197: tmp = t_3 elif t <= 1.02e-122: tmp = 1.0 elif t <= 1.75e-70: tmp = t * (t_1 / t_2) else: tmp = math.sqrt(2.0) / math.sqrt((2.0 + (4.0 / x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) / l) t_2 = sqrt(Float64(2.0 / x)) t_3 = Float64(t_1 * Float64(t / t_2)) tmp = 0.0 if (t <= -3e-67) tmp = Float64(-1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x)))); elseif (t <= -7.5e-110) tmp = t_3; elseif (t <= -7.2e-181) tmp = -1.0; elseif (t <= 2.9e-197) tmp = t_3; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 1.75e-70) tmp = Float64(t * Float64(t_1 / t_2)); else tmp = Float64(sqrt(2.0) / sqrt(Float64(2.0 + Float64(4.0 / x)))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) / l; t_2 = sqrt((2.0 / x)); t_3 = t_1 * (t / t_2); tmp = 0.0; if (t <= -3e-67) tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x))); elseif (t <= -7.5e-110) tmp = t_3; elseif (t <= -7.2e-181) tmp = -1.0; elseif (t <= 2.9e-197) tmp = t_3; elseif (t <= 1.02e-122) tmp = 1.0; elseif (t <= 1.75e-70) tmp = t * (t_1 / t_2); else tmp = sqrt(2.0) / sqrt((2.0 + (4.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[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e-67], N[(-1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e-110], t$95$3, If[LessEqual[t, -7.2e-181], -1.0, If[LessEqual[t, 2.9e-197], t$95$3, If[LessEqual[t, 1.02e-122], 1.0, If[LessEqual[t, 1.75e-70], N[(t * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{\ell}\\
t_2 := \sqrt{\frac{2}{x}}\\
t_3 := t_1 \cdot \frac{t}{t_2}\\
\mathbf{if}\;t \leq -3 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{x + 1}{-1 + x}}}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-110}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-181}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-197}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-70}:\\
\;\;\;\;t \cdot \frac{t_1}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}\\
\end{array}
\end{array}
if t < -3.00000000000000032e-67Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -3.00000000000000032e-67 < t < -7.50000000000000053e-110 or -7.1999999999999998e-181 < t < 2.90000000000000023e-197Initial program 7.1%
Simplified7.1%
Taylor expanded in l around inf 0.9%
Taylor expanded in x around inf 41.9%
associate-/r*41.9%
div-inv41.9%
times-frac41.9%
*-commutative41.9%
times-frac41.9%
clear-num42.5%
times-frac48.1%
*-commutative48.1%
times-frac48.3%
Applied egg-rr48.3%
if -7.50000000000000053e-110 < t < -7.1999999999999998e-181Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 2.90000000000000023e-197 < t < 1.02000000000000002e-122Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 1.02000000000000002e-122 < t < 1.74999999999999987e-70Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
*-commutative38.8%
associate-*r/38.6%
*-commutative38.6%
sqrt-div38.6%
associate-*r/38.5%
un-div-inv38.5%
metadata-eval38.5%
sqrt-div38.5%
*-commutative38.5%
*-commutative38.5%
associate-/r/45.8%
Applied egg-rr45.8%
if 1.74999999999999987e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in x around inf 48.0%
fma-def48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
unpow248.0%
associate-*r/48.0%
mul-1-neg48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in t around inf 87.7%
associate-*r/87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in t around 0 87.8%
associate-*r/87.8%
metadata-eval87.8%
Simplified87.8%
Final simplification78.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (sqrt 2.0) l)) (t_2 (* t_1 (* t (pow (/ 2.0 x) -0.5)))))
(if (<= t -4.4e-72)
(/ -1.0 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(if (<= t -7.7e-109)
t_2
(if (<= t -6.8e-182)
-1.0
(if (<= t 7.5e-197)
t_2
(if (<= t 9.5e-123)
1.0
(if (<= t 1.9e-70)
(* t (/ t_1 (sqrt (/ 2.0 x))))
(/ (sqrt 2.0) (sqrt (+ 2.0 (/ 4.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) / l;
double t_2 = t_1 * (t * pow((2.0 / x), -0.5));
double tmp;
if (t <= -4.4e-72) {
tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.7e-109) {
tmp = t_2;
} else if (t <= -6.8e-182) {
tmp = -1.0;
} else if (t <= 7.5e-197) {
tmp = t_2;
} else if (t <= 9.5e-123) {
tmp = 1.0;
} else if (t <= 1.9e-70) {
tmp = t * (t_1 / sqrt((2.0 / x)));
} else {
tmp = sqrt(2.0) / sqrt((2.0 + (4.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 = sqrt(2.0d0) / l
t_2 = t_1 * (t * ((2.0d0 / x) ** (-0.5d0)))
if (t <= (-4.4d-72)) then
tmp = (-1.0d0) / sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
else if (t <= (-7.7d-109)) then
tmp = t_2
else if (t <= (-6.8d-182)) then
tmp = -1.0d0
else if (t <= 7.5d-197) then
tmp = t_2
else if (t <= 9.5d-123) then
tmp = 1.0d0
else if (t <= 1.9d-70) then
tmp = t * (t_1 / sqrt((2.0d0 / x)))
else
tmp = sqrt(2.0d0) / sqrt((2.0d0 + (4.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 = Math.sqrt(2.0) / l;
double t_2 = t_1 * (t * Math.pow((2.0 / x), -0.5));
double tmp;
if (t <= -4.4e-72) {
tmp = -1.0 / Math.sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.7e-109) {
tmp = t_2;
} else if (t <= -6.8e-182) {
tmp = -1.0;
} else if (t <= 7.5e-197) {
tmp = t_2;
} else if (t <= 9.5e-123) {
tmp = 1.0;
} else if (t <= 1.9e-70) {
tmp = t * (t_1 / Math.sqrt((2.0 / x)));
} else {
tmp = Math.sqrt(2.0) / Math.sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) / l t_2 = t_1 * (t * math.pow((2.0 / x), -0.5)) tmp = 0 if t <= -4.4e-72: tmp = -1.0 / math.sqrt(((x + 1.0) / (-1.0 + x))) elif t <= -7.7e-109: tmp = t_2 elif t <= -6.8e-182: tmp = -1.0 elif t <= 7.5e-197: tmp = t_2 elif t <= 9.5e-123: tmp = 1.0 elif t <= 1.9e-70: tmp = t * (t_1 / math.sqrt((2.0 / x))) else: tmp = math.sqrt(2.0) / math.sqrt((2.0 + (4.0 / x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) / l) t_2 = Float64(t_1 * Float64(t * (Float64(2.0 / x) ^ -0.5))) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(-1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x)))); elseif (t <= -7.7e-109) tmp = t_2; elseif (t <= -6.8e-182) tmp = -1.0; elseif (t <= 7.5e-197) tmp = t_2; elseif (t <= 9.5e-123) tmp = 1.0; elseif (t <= 1.9e-70) tmp = Float64(t * Float64(t_1 / sqrt(Float64(2.0 / x)))); else tmp = Float64(sqrt(2.0) / sqrt(Float64(2.0 + Float64(4.0 / x)))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) / l; t_2 = t_1 * (t * ((2.0 / x) ^ -0.5)); tmp = 0.0; if (t <= -4.4e-72) tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x))); elseif (t <= -7.7e-109) tmp = t_2; elseif (t <= -6.8e-182) tmp = -1.0; elseif (t <= 7.5e-197) tmp = t_2; elseif (t <= 9.5e-123) tmp = 1.0; elseif (t <= 1.9e-70) tmp = t * (t_1 / sqrt((2.0 / x))); else tmp = sqrt(2.0) / sqrt((2.0 + (4.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[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t * N[Power[N[(2.0 / x), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(-1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.7e-109], t$95$2, If[LessEqual[t, -6.8e-182], -1.0, If[LessEqual[t, 7.5e-197], t$95$2, If[LessEqual[t, 9.5e-123], 1.0, If[LessEqual[t, 1.9e-70], N[(t * N[(t$95$1 / N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{\ell}\\
t_2 := t_1 \cdot \left(t \cdot {\left(\frac{2}{x}\right)}^{-0.5}\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{x + 1}{-1 + x}}}\\
\mathbf{elif}\;t \leq -7.7 \cdot 10^{-109}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-182}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-123}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-70}:\\
\;\;\;\;t \cdot \frac{t_1}{\sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -4.40000000000000005e-72 < t < -7.70000000000000025e-109 or -6.79999999999999979e-182 < t < 7.5e-197Initial program 7.1%
Simplified7.1%
Taylor expanded in l around inf 0.9%
Taylor expanded in x around inf 41.9%
associate-/r*41.9%
div-inv41.9%
associate-/r/42.3%
pow1/242.3%
pow-flip42.3%
metadata-eval42.3%
Applied egg-rr42.3%
associate-*l*48.2%
Simplified48.2%
if -7.70000000000000025e-109 < t < -6.79999999999999979e-182Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 7.5e-197 < t < 9.5000000000000002e-123Initial program 43.8%
Simplified43.8%
Taylor expanded in x around inf 85.4%
*-commutative85.4%
Simplified85.4%
rewrite-binary64/binary3248.0%
Applied rewrite-once48.0%
sqrt-unprod86.7%
metadata-eval86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 9.5000000000000002e-123 < t < 1.8999999999999999e-70Initial program 23.0%
Simplified23.0%
Taylor expanded in l around inf 1.7%
Taylor expanded in x around inf 38.8%
*-commutative38.8%
associate-*r/38.6%
*-commutative38.6%
sqrt-div38.6%
associate-*r/38.5%
un-div-inv38.5%
metadata-eval38.5%
sqrt-div38.5%
*-commutative38.5%
*-commutative38.5%
associate-/r/45.8%
Applied egg-rr45.8%
if 1.8999999999999999e-70 < t Initial program 42.1%
Simplified42.1%
Taylor expanded in x around inf 48.0%
fma-def48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
unpow248.0%
associate-*r/48.0%
mul-1-neg48.0%
unpow248.0%
fma-def48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in t around inf 87.7%
associate-*r/87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in t around 0 87.8%
associate-*r/87.8%
metadata-eval87.8%
Simplified87.8%
Final simplification78.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.4e-72)
(/ -1.0 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(if (<= t -1.65e-109)
(* (/ t l) (sqrt x))
(if (<= t -6.5e-184)
-1.0
(if (<= t 1.06e-197)
(/ (/ t l) (pow x -0.5))
(/ (sqrt 2.0) (sqrt (+ 2.0 (/ 4.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.4e-72) {
tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -1.65e-109) {
tmp = (t / l) * sqrt(x);
} else if (t <= -6.5e-184) {
tmp = -1.0;
} else if (t <= 1.06e-197) {
tmp = (t / l) / pow(x, -0.5);
} else {
tmp = sqrt(2.0) / sqrt((2.0 + (4.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.4d-72)) then
tmp = (-1.0d0) / sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
else if (t <= (-1.65d-109)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-6.5d-184)) then
tmp = -1.0d0
else if (t <= 1.06d-197) then
tmp = (t / l) / (x ** (-0.5d0))
else
tmp = sqrt(2.0d0) / sqrt((2.0d0 + (4.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.4e-72) {
tmp = -1.0 / Math.sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -1.65e-109) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -6.5e-184) {
tmp = -1.0;
} else if (t <= 1.06e-197) {
tmp = (t / l) / Math.pow(x, -0.5);
} else {
tmp = Math.sqrt(2.0) / Math.sqrt((2.0 + (4.0 / x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.4e-72: tmp = -1.0 / math.sqrt(((x + 1.0) / (-1.0 + x))) elif t <= -1.65e-109: tmp = (t / l) * math.sqrt(x) elif t <= -6.5e-184: tmp = -1.0 elif t <= 1.06e-197: tmp = (t / l) / math.pow(x, -0.5) else: tmp = math.sqrt(2.0) / math.sqrt((2.0 + (4.0 / x))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(-1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x)))); elseif (t <= -1.65e-109) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -6.5e-184) tmp = -1.0; elseif (t <= 1.06e-197) tmp = Float64(Float64(t / l) / (x ^ -0.5)); else tmp = Float64(sqrt(2.0) / sqrt(Float64(2.0 + Float64(4.0 / x)))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.4e-72) tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x))); elseif (t <= -1.65e-109) tmp = (t / l) * sqrt(x); elseif (t <= -6.5e-184) tmp = -1.0; elseif (t <= 1.06e-197) tmp = (t / l) / (x ^ -0.5); else tmp = sqrt(2.0) / sqrt((2.0 + (4.0 / x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -4.4e-72], N[(-1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.65e-109], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-184], -1.0, If[LessEqual[t, 1.06e-197], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{x + 1}{-1 + x}}}\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-109}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-184}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2 + \frac{4}{x}}}\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -4.40000000000000005e-72 < t < -1.64999999999999995e-109Initial program 17.2%
Simplified17.2%
Taylor expanded in l around inf 0.6%
Taylor expanded in x around inf 49.0%
Taylor expanded in l around 0 51.1%
if -1.64999999999999995e-109 < t < -6.4999999999999997e-184Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if -6.4999999999999997e-184 < t < 1.05999999999999997e-197Initial program 3.4%
Simplified3.4%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 39.3%
associate-/r*39.3%
div-inv39.3%
times-frac39.3%
*-commutative39.3%
times-frac39.3%
clear-num39.3%
times-frac44.0%
*-commutative44.0%
sqrt-div44.0%
associate-*r/44.1%
un-div-inv44.1%
metadata-eval44.1%
sqrt-div44.1%
*-commutative44.1%
times-frac39.3%
inv-pow39.3%
sqrt-pow139.3%
metadata-eval39.3%
Applied egg-rr39.3%
associate-/r*39.3%
associate-*r/39.3%
associate-*l/39.3%
associate-*r/39.3%
associate-/r*44.1%
associate-*l/44.1%
*-inverses44.1%
associate-/r*39.3%
*-lft-identity39.3%
Simplified39.3%
if 1.05999999999999997e-197 < t Initial program 40.8%
Simplified40.8%
Taylor expanded in x around inf 50.6%
fma-def50.6%
unpow250.6%
fma-def50.6%
unpow250.6%
unpow250.6%
associate-*r/50.6%
mul-1-neg50.6%
unpow250.6%
fma-def50.6%
unpow250.6%
Simplified50.6%
Taylor expanded in t around inf 82.4%
associate-*r/82.4%
metadata-eval82.4%
Simplified82.4%
Taylor expanded in t around 0 82.5%
associate-*r/82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification77.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.4e-72)
(- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x)))
(if (<= t -3.6e-109)
(* (/ t l) (sqrt x))
(if (<= t -1.7e-183)
-1.0
(if (<= t 6.2e-199) (/ (/ t l) (pow x -0.5)) 1.0)))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -3.6e-109) {
tmp = (t / l) * sqrt(x);
} else if (t <= -1.7e-183) {
tmp = -1.0;
} else if (t <= 6.2e-199) {
tmp = (t / l) / pow(x, -0.5);
} 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 <= (-4.4d-72)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
else if (t <= (-3.6d-109)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-1.7d-183)) then
tmp = -1.0d0
else if (t <= 6.2d-199) then
tmp = (t / l) / (x ** (-0.5d0))
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 <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -3.6e-109) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -1.7e-183) {
tmp = -1.0;
} else if (t <= 6.2e-199) {
tmp = (t / l) / Math.pow(x, -0.5);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.4e-72: tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)) elif t <= -3.6e-109: tmp = (t / l) * math.sqrt(x) elif t <= -1.7e-183: tmp = -1.0 elif t <= 6.2e-199: tmp = (t / l) / math.pow(x, -0.5) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))); elseif (t <= -3.6e-109) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -1.7e-183) tmp = -1.0; elseif (t <= 6.2e-199) tmp = Float64(Float64(t / l) / (x ^ -0.5)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.4e-72) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)); elseif (t <= -3.6e-109) tmp = (t / l) * sqrt(x); elseif (t <= -1.7e-183) tmp = -1.0; elseif (t <= 6.2e-199) tmp = (t / l) / (x ^ -0.5); 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, -4.4e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.6e-109], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-183], -1.0, If[LessEqual[t, 6.2e-199], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-109}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-183}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 83.4%
associate--r+83.4%
sub-neg83.4%
metadata-eval83.4%
associate-*r/83.4%
metadata-eval83.4%
unpow283.4%
Simplified83.4%
if -4.40000000000000005e-72 < t < -3.6000000000000001e-109Initial program 17.2%
Simplified17.2%
Taylor expanded in l around inf 0.6%
Taylor expanded in x around inf 49.0%
Taylor expanded in l around 0 51.1%
if -3.6000000000000001e-109 < t < -1.70000000000000007e-183Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if -1.70000000000000007e-183 < t < 6.20000000000000024e-199Initial program 3.4%
Simplified3.4%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 39.3%
associate-/r*39.3%
div-inv39.3%
times-frac39.3%
*-commutative39.3%
times-frac39.3%
clear-num39.3%
times-frac44.0%
*-commutative44.0%
sqrt-div44.0%
associate-*r/44.1%
un-div-inv44.1%
metadata-eval44.1%
sqrt-div44.1%
*-commutative44.1%
times-frac39.3%
inv-pow39.3%
sqrt-pow139.3%
metadata-eval39.3%
Applied egg-rr39.3%
associate-/r*39.3%
associate-*r/39.3%
associate-*l/39.3%
associate-*r/39.3%
associate-/r*44.1%
associate-*l/44.1%
*-inverses44.1%
associate-/r*39.3%
*-lft-identity39.3%
Simplified39.3%
if 6.20000000000000024e-199 < t Initial program 40.8%
Simplified40.8%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
Simplified80.7%
rewrite-binary64/binary3245.7%
Applied rewrite-once45.7%
sqrt-unprod81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification76.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -6.5e-72)
(/ -1.0 (sqrt (/ (+ x 1.0) (+ -1.0 x))))
(if (<= t -7.8e-109)
(* (/ t l) (sqrt x))
(if (<= t -1.9e-185)
-1.0
(if (<= t 6e-197) (/ (/ t l) (pow x -0.5)) 1.0)))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.5e-72) {
tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.8e-109) {
tmp = (t / l) * sqrt(x);
} else if (t <= -1.9e-185) {
tmp = -1.0;
} else if (t <= 6e-197) {
tmp = (t / l) / pow(x, -0.5);
} 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 <= (-6.5d-72)) then
tmp = (-1.0d0) / sqrt(((x + 1.0d0) / ((-1.0d0) + x)))
else if (t <= (-7.8d-109)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-1.9d-185)) then
tmp = -1.0d0
else if (t <= 6d-197) then
tmp = (t / l) / (x ** (-0.5d0))
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 <= -6.5e-72) {
tmp = -1.0 / Math.sqrt(((x + 1.0) / (-1.0 + x)));
} else if (t <= -7.8e-109) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -1.9e-185) {
tmp = -1.0;
} else if (t <= 6e-197) {
tmp = (t / l) / Math.pow(x, -0.5);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.5e-72: tmp = -1.0 / math.sqrt(((x + 1.0) / (-1.0 + x))) elif t <= -7.8e-109: tmp = (t / l) * math.sqrt(x) elif t <= -1.9e-185: tmp = -1.0 elif t <= 6e-197: tmp = (t / l) / math.pow(x, -0.5) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.5e-72) tmp = Float64(-1.0 / sqrt(Float64(Float64(x + 1.0) / Float64(-1.0 + x)))); elseif (t <= -7.8e-109) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -1.9e-185) tmp = -1.0; elseif (t <= 6e-197) tmp = Float64(Float64(t / l) / (x ^ -0.5)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.5e-72) tmp = -1.0 / sqrt(((x + 1.0) / (-1.0 + x))); elseif (t <= -7.8e-109) tmp = (t / l) * sqrt(x); elseif (t <= -1.9e-185) tmp = -1.0; elseif (t <= 6e-197) tmp = (t / l) / (x ^ -0.5); 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, -6.5e-72], N[(-1.0 / N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-109], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-185], -1.0, If[LessEqual[t, 6e-197], N[(N[(t / l), $MachinePrecision] / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], 1.0]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{x + 1}{-1 + x}}}\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{t}{\ell}}{{x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -6.4999999999999997e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
frac-2neg84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-lft-neg-in84.4%
times-frac84.4%
neg-mul-184.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
+-commutative84.4%
Applied egg-rr84.4%
associate-*r/84.4%
*-rgt-identity84.4%
*-inverses84.4%
metadata-eval84.4%
Simplified84.4%
if -6.4999999999999997e-72 < t < -7.80000000000000046e-109Initial program 17.2%
Simplified17.2%
Taylor expanded in l around inf 0.6%
Taylor expanded in x around inf 49.0%
Taylor expanded in l around 0 51.1%
if -7.80000000000000046e-109 < t < -1.9e-185Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if -1.9e-185 < t < 6.00000000000000051e-197Initial program 3.4%
Simplified3.4%
Taylor expanded in l around inf 1.0%
Taylor expanded in x around inf 39.3%
associate-/r*39.3%
div-inv39.3%
times-frac39.3%
*-commutative39.3%
times-frac39.3%
clear-num39.3%
times-frac44.0%
*-commutative44.0%
sqrt-div44.0%
associate-*r/44.1%
un-div-inv44.1%
metadata-eval44.1%
sqrt-div44.1%
*-commutative44.1%
times-frac39.3%
inv-pow39.3%
sqrt-pow139.3%
metadata-eval39.3%
Applied egg-rr39.3%
associate-/r*39.3%
associate-*r/39.3%
associate-*l/39.3%
associate-*r/39.3%
associate-/r*44.1%
associate-*l/44.1%
*-inverses44.1%
associate-/r*39.3%
*-lft-identity39.3%
Simplified39.3%
if 6.00000000000000051e-197 < t Initial program 40.8%
Simplified40.8%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
Simplified80.7%
rewrite-binary64/binary3245.7%
Applied rewrite-once45.7%
sqrt-unprod81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification76.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))))
(if (<= t -8.8e-72)
(- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x)))
(if (<= t -1.3e-114)
t_1
(if (<= t -2.75e-185) -1.0 (if (<= t 5.2e-198) t_1 1.0))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double tmp;
if (t <= -8.8e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -1.3e-114) {
tmp = t_1;
} else if (t <= -2.75e-185) {
tmp = -1.0;
} else if (t <= 5.2e-198) {
tmp = t_1;
} 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) :: tmp
t_1 = (t / l) * sqrt(x)
if (t <= (-8.8d-72)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
else if (t <= (-1.3d-114)) then
tmp = t_1
else if (t <= (-2.75d-185)) then
tmp = -1.0d0
else if (t <= 5.2d-198) then
tmp = t_1
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 / l) * Math.sqrt(x);
double tmp;
if (t <= -8.8e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -1.3e-114) {
tmp = t_1;
} else if (t <= -2.75e-185) {
tmp = -1.0;
} else if (t <= 5.2e-198) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (t / l) * math.sqrt(x) tmp = 0 if t <= -8.8e-72: tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)) elif t <= -1.3e-114: tmp = t_1 elif t <= -2.75e-185: tmp = -1.0 elif t <= 5.2e-198: tmp = t_1 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) tmp = 0.0 if (t <= -8.8e-72) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))); elseif (t <= -1.3e-114) tmp = t_1; elseif (t <= -2.75e-185) tmp = -1.0; elseif (t <= 5.2e-198) tmp = t_1; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); tmp = 0.0; if (t <= -8.8e-72) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)); elseif (t <= -1.3e-114) tmp = t_1; elseif (t <= -2.75e-185) tmp = -1.0; elseif (t <= 5.2e-198) tmp = t_1; 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[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.3e-114], t$95$1, If[LessEqual[t, -2.75e-185], -1.0, If[LessEqual[t, 5.2e-198], t$95$1, 1.0]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.75 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -8.8000000000000001e-72Initial program 36.5%
Simplified36.5%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 83.4%
associate--r+83.4%
sub-neg83.4%
metadata-eval83.4%
associate-*r/83.4%
metadata-eval83.4%
unpow283.4%
Simplified83.4%
if -8.8000000000000001e-72 < t < -1.30000000000000007e-114 or -2.7499999999999999e-185 < t < 5.20000000000000014e-198Initial program 7.1%
Simplified7.1%
Taylor expanded in l around inf 0.9%
Taylor expanded in x around inf 41.9%
Taylor expanded in l around 0 42.5%
if -1.30000000000000007e-114 < t < -2.7499999999999999e-185Initial program 31.6%
Simplified31.5%
Taylor expanded in t around -inf 93.6%
associate-*r*93.6%
neg-mul-193.6%
+-commutative93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in x around inf 93.6%
if 5.20000000000000014e-198 < t Initial program 40.8%
Simplified40.8%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
Simplified80.7%
rewrite-binary64/binary3245.7%
Applied rewrite-once45.7%
sqrt-unprod81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification76.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.42e-244) (- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x))) (if (<= t 2.8e-252) (/ 0.0 (pow 2.0 -0.5)) 1.0)))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.42e-244) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= 2.8e-252) {
tmp = 0.0 / pow(2.0, -0.5);
} 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 <= (-1.42d-244)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
else if (t <= 2.8d-252) then
tmp = 0.0d0 / (2.0d0 ** (-0.5d0))
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 <= -1.42e-244) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= 2.8e-252) {
tmp = 0.0 / Math.pow(2.0, -0.5);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.42e-244: tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)) elif t <= 2.8e-252: tmp = 0.0 / math.pow(2.0, -0.5) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.42e-244) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))); elseif (t <= 2.8e-252) tmp = Float64(0.0 / (2.0 ^ -0.5)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.42e-244) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)); elseif (t <= 2.8e-252) tmp = 0.0 / (2.0 ^ -0.5); 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, -1.42e-244], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-252], N[(0.0 / N[Power[2.0, -0.5], $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-244}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-252}:\\
\;\;\;\;\frac{0}{{2}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.42000000000000003e-244Initial program 31.3%
Simplified31.3%
Taylor expanded in t around -inf 74.9%
associate-*r*74.9%
neg-mul-174.9%
+-commutative74.9%
sub-neg74.9%
metadata-eval74.9%
+-commutative74.9%
Simplified74.9%
Taylor expanded in x around inf 74.2%
associate--r+74.2%
sub-neg74.2%
metadata-eval74.2%
associate-*r/74.2%
metadata-eval74.2%
unpow274.2%
Simplified74.2%
if -1.42000000000000003e-244 < t < 2.80000000000000018e-252Initial program 1.4%
Simplified1.4%
Taylor expanded in x around inf 63.4%
fma-def63.4%
unpow263.4%
fma-def63.4%
unpow263.4%
unpow263.4%
associate-*r/63.4%
mul-1-neg63.4%
unpow263.4%
fma-def63.4%
unpow263.4%
Simplified63.4%
Taylor expanded in t around 0 63.1%
cancel-sign-sub-inv63.1%
unpow263.1%
associate-*r/63.1%
metadata-eval63.1%
associate-*r/63.1%
*-commutative63.1%
*-rgt-identity63.1%
unpow263.1%
associate-*r/63.1%
Simplified63.1%
clear-num63.1%
inv-pow63.1%
div-inv63.1%
unpow-prod-down63.1%
Applied egg-rr58.6%
mul0-rgt58.6%
unpow-158.6%
associate-*r/58.6%
metadata-eval58.6%
Simplified58.6%
if 2.80000000000000018e-252 < t Initial program 38.7%
Simplified38.7%
Taylor expanded in x around inf 78.3%
*-commutative78.3%
Simplified78.3%
rewrite-binary64/binary3244.4%
Applied rewrite-once44.4%
sqrt-unprod79.5%
metadata-eval79.5%
metadata-eval79.5%
Applied egg-rr79.5%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-309) (- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x))) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-309)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-309) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * 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, -1e-309], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
Simplified29.6%
Taylor expanded in t around -inf 72.5%
associate-*r*72.5%
neg-mul-172.5%
+-commutative72.5%
sub-neg72.5%
metadata-eval72.5%
+-commutative72.5%
Simplified72.5%
Taylor expanded in x around inf 71.8%
associate--r+71.8%
sub-neg71.8%
metadata-eval71.8%
associate-*r/71.8%
metadata-eval71.8%
unpow271.8%
Simplified71.8%
if -1.000000000000002e-309 < t Initial program 36.8%
Simplified36.8%
Taylor expanded in x around inf 75.3%
*-commutative75.3%
Simplified75.3%
rewrite-binary64/binary3242.8%
Applied rewrite-once42.8%
sqrt-unprod76.5%
metadata-eval76.5%
metadata-eval76.5%
Applied egg-rr76.5%
Final simplification74.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x))))
l = abs(l);
double code(double x, double l, double t) {
return (-1.0 + (1.0 / x)) - (0.5 / (x * 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)) - (0.5d0 / (x * x))
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return (-1.0 + (1.0 / x)) - (0.5 / (x * x));
}
l = abs(l) def code(x, l, t): return (-1.0 + (1.0 / x)) - (0.5 / (x * x))
l = abs(l) function code(x, l, t) return Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))) end
l = abs(l) function tmp = code(x, l, t) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)); end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}
\end{array}
Initial program 33.0%
Simplified33.0%
Taylor expanded in t around -inf 39.6%
associate-*r*39.6%
neg-mul-139.6%
+-commutative39.6%
sub-neg39.6%
metadata-eval39.6%
+-commutative39.6%
Simplified39.6%
Taylor expanded in x around inf 39.2%
associate--r+39.2%
sub-neg39.2%
metadata-eval39.2%
associate-*r/39.2%
metadata-eval39.2%
unpow239.2%
Simplified39.2%
Final simplification39.2%
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 33.0%
Simplified33.0%
Taylor expanded in t around -inf 39.6%
associate-*r*39.6%
neg-mul-139.6%
+-commutative39.6%
sub-neg39.6%
metadata-eval39.6%
+-commutative39.6%
Simplified39.6%
Taylor expanded in x around inf 39.0%
Final simplification39.0%
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.0%
Simplified33.0%
Taylor expanded in t around -inf 39.6%
associate-*r*39.6%
neg-mul-139.6%
+-commutative39.6%
sub-neg39.6%
metadata-eval39.6%
+-commutative39.6%
Simplified39.6%
Taylor expanded in x around inf 38.3%
Final simplification38.3%
herbie shell --seed 2023297
(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)))))