
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_2 (/ (* l l) x))
(t_3 (* 2.0 (* t t)))
(t_4 (fma l l t_3))
(t_5 (/ t_4 x)))
(if (<= t -5.6e+136)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t -4e-155)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
t_2
(+
(fma
2.0
(/ (* t t) (pow x 3.0))
(+ (+ t_1 (/ (* l l) (pow x 3.0))) (/ (+ t_4 t_4) (* x x))))
(+ (/ t_4 (pow x 3.0)) t_5))))))
(if (<= t 1.2e-278)
(*
(sqrt 2.0)
(* t (/ 1.0 (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x)))))))
(if (<= t 2.45e-183)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (+ (* l l) (+ (* l l) t_3)) (* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 1.85e+60)
(* t (/ (sqrt 2.0) (sqrt (+ t_2 (+ t_1 t_5)))))
1.0)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = (l * l) / x;
double t_3 = 2.0 * (t * t);
double t_4 = fma(l, l, t_3);
double t_5 = t_4 / x;
double tmp;
if (t <= -5.6e+136) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -4e-155) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + (fma(2.0, ((t * t) / pow(x, 3.0)), ((t_1 + ((l * l) / pow(x, 3.0))) + ((t_4 + t_4) / (x * x)))) + ((t_4 / pow(x, 3.0)) + t_5)))));
} else if (t <= 1.2e-278) {
tmp = sqrt(2.0) * (t * (1.0 / (l * sqrt(((2.0 / (x * x)) + (2.0 / x))))));
} else if (t <= 2.45e-183) {
tmp = t * (sqrt(2.0) / fma(0.5, (((l * l) + ((l * l) + t_3)) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 1.85e+60) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_1 + t_5))));
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(2.0 * Float64(t * t)) t_4 = fma(l, l, t_3) t_5 = Float64(t_4 / x) tmp = 0.0 if (t <= -5.6e+136) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= -4e-155) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + Float64(fma(2.0, Float64(Float64(t * t) / (x ^ 3.0)), Float64(Float64(t_1 + Float64(Float64(l * l) / (x ^ 3.0))) + Float64(Float64(t_4 + t_4) / Float64(x * x)))) + Float64(Float64(t_4 / (x ^ 3.0)) + t_5)))))); elseif (t <= 1.2e-278) tmp = Float64(sqrt(2.0) * Float64(t * Float64(1.0 / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))))); elseif (t <= 2.45e-183) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(Float64(l * l) + Float64(Float64(l * l) + t_3)) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 1.85e+60) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + Float64(t_1 + t_5))))); else tmp = 1.0; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(l * l + t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / x), $MachinePrecision]}, If[LessEqual[t, -5.6e+136], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -4e-155], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + N[(N[(l * l), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 + t$95$4), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-278], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[(1.0 / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e-183], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+60], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(t$95$1 + t$95$5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := 2 \cdot \left(t \cdot t\right)\\
t_4 := \mathsf{fma}\left(\ell, \ell, t_3\right)\\
t_5 := \frac{t_4}{x}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+136}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \left(t_1 + \frac{\ell \cdot \ell}{{x}^{3}}\right) + \frac{t_4 + t_4}{x \cdot x}\right) + \left(\frac{t_4}{{x}^{3}} + t_5\right)\right)}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-278}:\\
\;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{1}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-183}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(\ell \cdot \ell + t_3\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+60}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \left(t_1 + t_5\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.6000000000000004e136Initial program 3.9%
associate-*r/3.9%
fma-neg3.9%
sub-neg3.9%
metadata-eval3.9%
+-commutative3.9%
fma-def3.9%
distribute-rgt-neg-in3.9%
Simplified3.9%
Applied egg-rr83.5%
Taylor expanded in t around -inf 94.5%
mul-1-neg94.5%
sub-neg94.5%
metadata-eval94.5%
+-commutative94.5%
Simplified94.5%
if -5.6000000000000004e136 < t < -4.00000000000000006e-155Initial program 62.5%
associate-*l/62.7%
Simplified62.7%
Taylor expanded in x around -inf 86.4%
Simplified86.4%
if -4.00000000000000006e-155 < t < 1.2e-278Initial program 1.7%
associate-*r/1.7%
fma-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
fma-def1.7%
distribute-rgt-neg-in1.7%
Simplified1.7%
Taylor expanded in l around inf 8.5%
Taylor expanded in x around inf 49.7%
associate-*r/49.7%
metadata-eval49.7%
unpow249.7%
associate-*r/49.7%
metadata-eval49.7%
Simplified49.7%
div-inv49.7%
*-commutative49.7%
Applied egg-rr49.7%
if 1.2e-278 < t < 2.45e-183Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 34.8%
associate--l+34.8%
unpow234.8%
distribute-lft-out34.8%
unpow234.8%
unpow234.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
fma-udef34.8%
unpow234.8%
Simplified34.8%
Taylor expanded in l around inf 34.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
distribute-rgt-neg-in34.8%
Simplified34.8%
Taylor expanded in x around inf 75.9%
fma-def75.9%
unpow275.9%
unpow275.9%
mul-1-neg75.9%
unpow275.9%
distribute-rgt-neg-out75.9%
Simplified75.9%
if 2.45e-183 < t < 1.84999999999999994e60Initial program 56.8%
associate-*l/56.8%
Simplified56.8%
Taylor expanded in x around inf 91.5%
associate--l+91.5%
unpow291.5%
distribute-lft-out91.5%
unpow291.5%
unpow291.5%
associate-*r/91.5%
mul-1-neg91.5%
unpow291.5%
fma-udef91.5%
unpow291.5%
Simplified91.5%
if 1.84999999999999994e60 < t Initial program 39.7%
associate-*l/39.7%
Simplified39.7%
Taylor expanded in x around inf 98.4%
sqrt-unprod100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification87.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (* t t)))
(t_2 (fma l l t_1))
(t_3 (/ t_2 x))
(t_4 (/ (* l l) x))
(t_5 (* 2.0 (+ (* t t) (/ (* t t) x)))))
(if (<= t -5.6e+136)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t -4e-155)
(*
t
(/ (sqrt 2.0) (sqrt (+ t_4 (+ (+ t_5 (/ (+ t_2 t_2) (* x x))) t_3)))))
(if (<= t 2e-280)
(*
(sqrt 2.0)
(* t (/ 1.0 (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x)))))))
(if (<= t 2.6e-183)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (+ (* l l) (+ (* l l) t_1)) (* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 3.9e+59)
(* t (/ (sqrt 2.0) (sqrt (+ t_4 (+ t_5 t_3)))))
1.0)))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * (t * t);
double t_2 = fma(l, l, t_1);
double t_3 = t_2 / x;
double t_4 = (l * l) / x;
double t_5 = 2.0 * ((t * t) + ((t * t) / x));
double tmp;
if (t <= -5.6e+136) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -4e-155) {
tmp = t * (sqrt(2.0) / sqrt((t_4 + ((t_5 + ((t_2 + t_2) / (x * x))) + t_3))));
} else if (t <= 2e-280) {
tmp = sqrt(2.0) * (t * (1.0 / (l * sqrt(((2.0 / (x * x)) + (2.0 / x))))));
} else if (t <= 2.6e-183) {
tmp = t * (sqrt(2.0) / fma(0.5, (((l * l) + ((l * l) + t_1)) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 3.9e+59) {
tmp = t * (sqrt(2.0) / sqrt((t_4 + (t_5 + t_3))));
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * Float64(t * t)) t_2 = fma(l, l, t_1) t_3 = Float64(t_2 / x) t_4 = Float64(Float64(l * l) / x) t_5 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) tmp = 0.0 if (t <= -5.6e+136) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= -4e-155) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_4 + Float64(Float64(t_5 + Float64(Float64(t_2 + t_2) / Float64(x * x))) + t_3))))); elseif (t <= 2e-280) tmp = Float64(sqrt(2.0) * Float64(t * Float64(1.0 / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))))); elseif (t <= 2.6e-183) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(Float64(l * l) + Float64(Float64(l * l) + t_1)) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 3.9e+59) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_4 + Float64(t_5 + t_3))))); else tmp = 1.0; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(l * l + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / x), $MachinePrecision]}, Block[{t$95$4 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+136], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -4e-155], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$4 + N[(N[(t$95$5 + N[(N[(t$95$2 + t$95$2), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-280], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[(1.0 / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-183], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+59], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$4 + N[(t$95$5 + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t\right)\\
t_2 := \mathsf{fma}\left(\ell, \ell, t_1\right)\\
t_3 := \frac{t_2}{x}\\
t_4 := \frac{\ell \cdot \ell}{x}\\
t_5 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+136}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_4 + \left(\left(t_5 + \frac{t_2 + t_2}{x \cdot x}\right) + t_3\right)}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-280}:\\
\;\;\;\;\sqrt{2} \cdot \left(t \cdot \frac{1}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-183}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(\ell \cdot \ell + t_1\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+59}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_4 + \left(t_5 + t_3\right)}}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.6000000000000004e136Initial program 3.9%
associate-*r/3.9%
fma-neg3.9%
sub-neg3.9%
metadata-eval3.9%
+-commutative3.9%
fma-def3.9%
distribute-rgt-neg-in3.9%
Simplified3.9%
Applied egg-rr83.5%
Taylor expanded in t around -inf 94.5%
mul-1-neg94.5%
sub-neg94.5%
metadata-eval94.5%
+-commutative94.5%
Simplified94.5%
if -5.6000000000000004e136 < t < -4.00000000000000006e-155Initial program 62.5%
associate-*l/62.7%
Simplified62.7%
Taylor expanded in x around -inf 86.3%
associate--l+86.3%
unpow286.3%
sub-neg86.3%
Simplified86.3%
if -4.00000000000000006e-155 < t < 1.9999999999999999e-280Initial program 1.7%
associate-*r/1.7%
fma-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
fma-def1.7%
distribute-rgt-neg-in1.7%
Simplified1.7%
Taylor expanded in l around inf 8.5%
Taylor expanded in x around inf 49.7%
associate-*r/49.7%
metadata-eval49.7%
unpow249.7%
associate-*r/49.7%
metadata-eval49.7%
Simplified49.7%
div-inv49.7%
*-commutative49.7%
Applied egg-rr49.7%
if 1.9999999999999999e-280 < t < 2.5999999999999999e-183Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 34.8%
associate--l+34.8%
unpow234.8%
distribute-lft-out34.8%
unpow234.8%
unpow234.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
fma-udef34.8%
unpow234.8%
Simplified34.8%
Taylor expanded in l around inf 34.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
distribute-rgt-neg-in34.8%
Simplified34.8%
Taylor expanded in x around inf 75.9%
fma-def75.9%
unpow275.9%
unpow275.9%
mul-1-neg75.9%
unpow275.9%
distribute-rgt-neg-out75.9%
Simplified75.9%
if 2.5999999999999999e-183 < t < 3.90000000000000021e59Initial program 56.8%
associate-*l/56.8%
Simplified56.8%
Taylor expanded in x around inf 91.5%
associate--l+91.5%
unpow291.5%
distribute-lft-out91.5%
unpow291.5%
unpow291.5%
associate-*r/91.5%
mul-1-neg91.5%
unpow291.5%
fma-udef91.5%
unpow291.5%
Simplified91.5%
if 3.90000000000000021e59 < t Initial program 39.7%
associate-*l/39.7%
Simplified39.7%
Taylor expanded in x around inf 98.4%
sqrt-unprod100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification87.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (* t t)))
(t_2
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (fma l l t_1) x))))))))
(if (<= t -5.6e+136)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t 4e-281)
t_2
(if (<= t 1.65e-183)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (+ (* l l) (+ (* l l) t_1)) (* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 9.2e+60) t_2 1.0))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * (t * t);
double t_2 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(l, l, t_1) / x)))));
double tmp;
if (t <= -5.6e+136) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= 4e-281) {
tmp = t_2;
} else if (t <= 1.65e-183) {
tmp = t * (sqrt(2.0) / fma(0.5, (((l * l) + ((l * l) + t_1)) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 9.2e+60) {
tmp = t_2;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * Float64(t * t)) t_2 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(l, l, t_1) / x)))))) tmp = 0.0 if (t <= -5.6e+136) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= 4e-281) tmp = t_2; elseif (t <= 1.65e-183) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(Float64(l * l) + Float64(Float64(l * l) + t_1)) / Float64(sqrt(2.0) * Float64(t * x))), Float64(t * sqrt(2.0))))); elseif (t <= 9.2e+60) tmp = t_2; else tmp = 1.0; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + t$95$1), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+136], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4e-281], t$95$2, If[LessEqual[t, 1.65e-183], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(N[(l * l), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e+60], t$95$2, 1.0]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t\right)\\
t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(\ell, \ell, t_1\right)}{x}\right)}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+136}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-281}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-183}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{\ell \cdot \ell + \left(\ell \cdot \ell + t_1\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.6000000000000004e136Initial program 3.9%
associate-*r/3.9%
fma-neg3.9%
sub-neg3.9%
metadata-eval3.9%
+-commutative3.9%
fma-def3.9%
distribute-rgt-neg-in3.9%
Simplified3.9%
Applied egg-rr83.5%
Taylor expanded in t around -inf 94.5%
mul-1-neg94.5%
sub-neg94.5%
metadata-eval94.5%
+-commutative94.5%
Simplified94.5%
if -5.6000000000000004e136 < t < 4.0000000000000001e-281 or 1.65e-183 < t < 9.20000000000000068e60Initial program 46.6%
associate-*l/46.6%
Simplified46.6%
Taylor expanded in x around inf 82.9%
associate--l+82.9%
unpow282.9%
distribute-lft-out82.9%
unpow282.9%
unpow282.9%
associate-*r/82.9%
mul-1-neg82.9%
unpow282.9%
fma-udef82.9%
unpow282.9%
Simplified82.9%
if 4.0000000000000001e-281 < t < 1.65e-183Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 34.8%
associate--l+34.8%
unpow234.8%
distribute-lft-out34.8%
unpow234.8%
unpow234.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
fma-udef34.8%
unpow234.8%
Simplified34.8%
Taylor expanded in l around inf 34.8%
associate-*r/34.8%
mul-1-neg34.8%
unpow234.8%
distribute-rgt-neg-in34.8%
Simplified34.8%
Taylor expanded in x around inf 75.9%
fma-def75.9%
unpow275.9%
unpow275.9%
mul-1-neg75.9%
unpow275.9%
distribute-rgt-neg-out75.9%
Simplified75.9%
if 9.20000000000000068e60 < t Initial program 39.7%
associate-*l/39.7%
Simplified39.7%
Taylor expanded in x around inf 98.4%
sqrt-unprod100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification88.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma l l (* 2.0 (* t t))) x)))))))
(t_2 (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))))
(if (<= t -5.6e+136)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t -4.4e-155)
t_1
(if (<= t 6e-217)
t_2
(if (<= t 6.8e-189)
1.0
(if (<= t 3.2e-164) t_2 (if (<= t 9e+60) t_1 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma(l, l, (2.0 * (t * t))) / x)))));
double t_2 = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
double tmp;
if (t <= -5.6e+136) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -4.4e-155) {
tmp = t_1;
} else if (t <= 6e-217) {
tmp = t_2;
} else if (t <= 6.8e-189) {
tmp = 1.0;
} else if (t <= 3.2e-164) {
tmp = t_2;
} else if (t <= 9e+60) {
tmp = t_1;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(l, l, Float64(2.0 * Float64(t * t))) / x)))))) t_2 = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x))))) tmp = 0.0 if (t <= -5.6e+136) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= -4.4e-155) tmp = t_1; elseif (t <= 6e-217) tmp = t_2; elseif (t <= 6.8e-189) tmp = 1.0; elseif (t <= 3.2e-164) tmp = t_2; elseif (t <= 9e+60) tmp = t_1; else tmp = 1.0; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+136], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -4.4e-155], t$95$1, If[LessEqual[t, 6e-217], t$95$2, If[LessEqual[t, 6.8e-189], 1.0, If[LessEqual[t, 3.2e-164], t$95$2, If[LessEqual[t, 9e+60], t$95$1, 1.0]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}\right)}}\\
t_2 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+136}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-217}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-189}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-164}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.6000000000000004e136Initial program 3.9%
associate-*r/3.9%
fma-neg3.9%
sub-neg3.9%
metadata-eval3.9%
+-commutative3.9%
fma-def3.9%
distribute-rgt-neg-in3.9%
Simplified3.9%
Applied egg-rr83.5%
Taylor expanded in t around -inf 94.5%
mul-1-neg94.5%
sub-neg94.5%
metadata-eval94.5%
+-commutative94.5%
Simplified94.5%
if -5.6000000000000004e136 < t < -4.3999999999999998e-155 or 3.2e-164 < t < 9.00000000000000026e60Initial program 62.2%
associate-*l/62.3%
Simplified62.3%
Taylor expanded in x around inf 88.2%
associate--l+88.2%
unpow288.2%
distribute-lft-out88.2%
unpow288.2%
unpow288.2%
associate-*r/88.2%
mul-1-neg88.2%
unpow288.2%
fma-udef88.2%
unpow288.2%
Simplified88.2%
if -4.3999999999999998e-155 < t < 6.00000000000000009e-217 or 6.8000000000000002e-189 < t < 3.2e-164Initial program 1.7%
associate-*r/1.7%
fma-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
fma-def1.7%
distribute-rgt-neg-in1.7%
Simplified1.7%
Taylor expanded in l around inf 8.8%
Taylor expanded in x around inf 52.4%
if 6.00000000000000009e-217 < t < 6.8000000000000002e-189 or 9.00000000000000026e60 < t Initial program 34.5%
associate-*l/34.5%
Simplified34.5%
Taylor expanded in x around inf 94.6%
sqrt-unprod96.1%
metadata-eval96.1%
metadata-eval96.1%
Applied egg-rr96.1%
Final simplification85.9%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x))))))
(t_2 (/ (* l l) x))
(t_3
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -5.6e+136)
(- (sqrt (/ (+ -1.0 x) (+ x 1.0))))
(if (<= t -4e-155)
t_3
(if (<= t 1.25e-216)
t_1
(if (<= t 2.3e-190)
1.0
(if (<= t 2.45e-163) t_1 (if (<= t 5.9e+59) t_3 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
double t_2 = (l * l) / x;
double t_3 = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -5.6e+136) {
tmp = -sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -4e-155) {
tmp = t_3;
} else if (t <= 1.25e-216) {
tmp = t_1;
} else if (t <= 2.3e-190) {
tmp = 1.0;
} else if (t <= 2.45e-163) {
tmp = t_1;
} else if (t <= 5.9e+59) {
tmp = t_3;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
t_2 = (l * l) / x
t_3 = t * (sqrt(2.0d0) / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
if (t <= (-5.6d+136)) then
tmp = -sqrt((((-1.0d0) + x) / (x + 1.0d0)))
else if (t <= (-4d-155)) then
tmp = t_3
else if (t <= 1.25d-216) then
tmp = t_1
else if (t <= 2.3d-190) then
tmp = 1.0d0
else if (t <= 2.45d-163) then
tmp = t_1
else if (t <= 5.9d+59) then
tmp = t_3
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 = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
double t_2 = (l * l) / x;
double t_3 = t * (Math.sqrt(2.0) / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -5.6e+136) {
tmp = -Math.sqrt(((-1.0 + x) / (x + 1.0)));
} else if (t <= -4e-155) {
tmp = t_3;
} else if (t <= 1.25e-216) {
tmp = t_1;
} else if (t <= 2.3e-190) {
tmp = 1.0;
} else if (t <= 2.45e-163) {
tmp = t_1;
} else if (t <= 5.9e+59) {
tmp = t_3;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x)))) t_2 = (l * l) / x t_3 = t * (math.sqrt(2.0) / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) tmp = 0 if t <= -5.6e+136: tmp = -math.sqrt(((-1.0 + x) / (x + 1.0))) elif t <= -4e-155: tmp = t_3 elif t <= 1.25e-216: tmp = t_1 elif t <= 2.3e-190: tmp = 1.0 elif t <= 2.45e-163: tmp = t_1 elif t <= 5.9e+59: tmp = t_3 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x))))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))) tmp = 0.0 if (t <= -5.6e+136) tmp = Float64(-sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0)))); elseif (t <= -4e-155) tmp = t_3; elseif (t <= 1.25e-216) tmp = t_1; elseif (t <= 2.3e-190) tmp = 1.0; elseif (t <= 2.45e-163) tmp = t_1; elseif (t <= 5.9e+59) tmp = t_3; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x)))); t_2 = (l * l) / x; t_3 = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); tmp = 0.0; if (t <= -5.6e+136) tmp = -sqrt(((-1.0 + x) / (x + 1.0))); elseif (t <= -4e-155) tmp = t_3; elseif (t <= 1.25e-216) tmp = t_1; elseif (t <= 2.3e-190) tmp = 1.0; elseif (t <= 2.45e-163) tmp = t_1; elseif (t <= 5.9e+59) tmp = t_3; 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[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$2 + N[(t$95$2 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+136], (-N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -4e-155], t$95$3, If[LessEqual[t, 1.25e-216], t$95$1, If[LessEqual[t, 2.3e-190], 1.0, If[LessEqual[t, 2.45e-163], t$95$1, If[LessEqual[t, 5.9e+59], t$95$3, 1.0]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := t \cdot \frac{\sqrt{2}}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+136}:\\
\;\;\;\;-\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-155}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-216}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-190}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+59}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -5.6000000000000004e136Initial program 3.9%
associate-*r/3.9%
fma-neg3.9%
sub-neg3.9%
metadata-eval3.9%
+-commutative3.9%
fma-def3.9%
distribute-rgt-neg-in3.9%
Simplified3.9%
Applied egg-rr83.5%
Taylor expanded in t around -inf 94.5%
mul-1-neg94.5%
sub-neg94.5%
metadata-eval94.5%
+-commutative94.5%
Simplified94.5%
if -5.6000000000000004e136 < t < -4.00000000000000006e-155 or 2.4500000000000001e-163 < t < 5.90000000000000038e59Initial program 62.2%
associate-*l/62.3%
Simplified62.3%
Taylor expanded in x around inf 88.2%
associate--l+88.2%
unpow288.2%
distribute-lft-out88.2%
unpow288.2%
unpow288.2%
associate-*r/88.2%
mul-1-neg88.2%
unpow288.2%
fma-udef88.2%
unpow288.2%
Simplified88.2%
Taylor expanded in l around inf 87.7%
associate-*r/87.7%
mul-1-neg87.7%
unpow287.7%
distribute-rgt-neg-in87.7%
Simplified87.7%
if -4.00000000000000006e-155 < t < 1.25000000000000005e-216 or 2.29999999999999992e-190 < t < 2.4500000000000001e-163Initial program 1.7%
associate-*r/1.7%
fma-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
fma-def1.7%
distribute-rgt-neg-in1.7%
Simplified1.7%
Taylor expanded in l around inf 8.8%
Taylor expanded in x around inf 52.4%
if 1.25000000000000005e-216 < t < 2.29999999999999992e-190 or 5.90000000000000038e59 < t Initial program 34.5%
associate-*l/34.5%
Simplified34.5%
Taylor expanded in x around inf 94.6%
sqrt-unprod96.1%
metadata-eval96.1%
metadata-eval96.1%
Applied egg-rr96.1%
Final simplification85.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))
(if (<= t -1.04e-151)
(- t_1)
(if (<= t 2.55e-216)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x)))))
(if (<= t 1.75e-189)
1.0
(if (<= t 1.02e-164)
(* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x)))))
t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1.04e-151) {
tmp = -t_1;
} else if (t <= 2.55e-216) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x))));
} else if (t <= 1.75e-189) {
tmp = 1.0;
} else if (t <= 1.02e-164) {
tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
if (t <= (-1.04d-151)) then
tmp = -t_1
else if (t <= 2.55d-216) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt(((2.0d0 / (x * x)) + (2.0d0 / x))))
else if (t <= 1.75d-189) then
tmp = 1.0d0
else if (t <= 1.02d-164) then
tmp = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1.04e-151) {
tmp = -t_1;
} else if (t <= 2.55e-216) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt(((2.0 / (x * x)) + (2.0 / x))));
} else if (t <= 1.75e-189) {
tmp = 1.0;
} else if (t <= 1.02e-164) {
tmp = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((-1.0 + x) / (x + 1.0))) tmp = 0 if t <= -1.04e-151: tmp = -t_1 elif t <= 2.55e-216: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt(((2.0 / (x * x)) + (2.0 / x)))) elif t <= 1.75e-189: tmp = 1.0 elif t <= 1.02e-164: tmp = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x)))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.04e-151) tmp = Float64(-t_1); elseif (t <= 2.55e-216) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x))))); elseif (t <= 1.75e-189) tmp = 1.0; elseif (t <= 1.02e-164) tmp = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((-1.0 + x) / (x + 1.0))); tmp = 0.0; if (t <= -1.04e-151) tmp = -t_1; elseif (t <= 2.55e-216) tmp = (t * sqrt(2.0)) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))); elseif (t <= 1.75e-189) tmp = 1.0; elseif (t <= 1.02e-164) tmp = sqrt(2.0) * (t / (l * sqrt((2.0 / x)))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.04e-151], (-t$95$1), If[LessEqual[t, 2.55e-216], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-189], 1.0, If[LessEqual[t, 1.02e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{if}\;t \leq -1.04 \cdot 10^{-151}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-216}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-189}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.04000000000000005e-151Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Applied egg-rr74.2%
Taylor expanded in t around -inf 84.3%
mul-1-neg84.3%
sub-neg84.3%
metadata-eval84.3%
+-commutative84.3%
Simplified84.3%
if -1.04000000000000005e-151 < t < 2.5500000000000001e-216Initial program 1.8%
associate-*r/1.8%
fma-neg1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
fma-def1.8%
distribute-rgt-neg-in1.8%
Simplified1.8%
Taylor expanded in l around inf 7.0%
Taylor expanded in x around inf 52.4%
associate-*r/52.4%
metadata-eval52.4%
unpow252.4%
associate-*r/52.4%
metadata-eval52.4%
Simplified52.4%
associate-*r/52.5%
*-commutative52.5%
Applied egg-rr52.5%
if 2.5500000000000001e-216 < t < 1.7500000000000001e-189Initial program 2.7%
associate-*l/2.7%
Simplified2.7%
Taylor expanded in x around inf 71.4%
sqrt-unprod72.5%
metadata-eval72.5%
metadata-eval72.5%
Applied egg-rr72.5%
if 1.7500000000000001e-189 < t < 1.02e-164Initial program 1.5%
associate-*r/1.5%
fma-neg1.5%
sub-neg1.5%
metadata-eval1.5%
+-commutative1.5%
fma-def1.5%
distribute-rgt-neg-in1.5%
Simplified1.5%
Taylor expanded in l around inf 21.1%
Taylor expanded in x around inf 60.9%
if 1.02e-164 < t Initial program 49.0%
associate-*r/48.9%
fma-neg48.9%
sub-neg48.9%
metadata-eval48.9%
+-commutative48.9%
fma-def48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Applied egg-rr79.6%
Taylor expanded in l around 0 90.2%
Final simplification81.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) (/ t (* l (sqrt (/ 2.0 x))))))
(t_2 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))
(if (<= t -1.2e-151)
(- t_2)
(if (<= t 2.4e-216)
t_1
(if (<= t 1.16e-189) 1.0 (if (<= t 7e-165) t_1 t_2))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x))));
double t_2 = sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1.2e-151) {
tmp = -t_2;
} else if (t <= 2.4e-216) {
tmp = t_1;
} else if (t <= 1.16e-189) {
tmp = 1.0;
} else if (t <= 7e-165) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt(2.0d0) * (t / (l * sqrt((2.0d0 / x))))
t_2 = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
if (t <= (-1.2d-151)) then
tmp = -t_2
else if (t <= 2.4d-216) then
tmp = t_1
else if (t <= 1.16d-189) then
tmp = 1.0d0
else if (t <= 7d-165) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(2.0) * (t / (l * Math.sqrt((2.0 / x))));
double t_2 = Math.sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1.2e-151) {
tmp = -t_2;
} else if (t <= 2.4e-216) {
tmp = t_1;
} else if (t <= 1.16e-189) {
tmp = 1.0;
} else if (t <= 7e-165) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(2.0) * (t / (l * math.sqrt((2.0 / x)))) t_2 = math.sqrt(((-1.0 + x) / (x + 1.0))) tmp = 0 if t <= -1.2e-151: tmp = -t_2 elif t <= 2.4e-216: tmp = t_1 elif t <= 1.16e-189: tmp = 1.0 elif t <= 7e-165: tmp = t_1 else: tmp = t_2 return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * Float64(t / Float64(l * sqrt(Float64(2.0 / x))))) t_2 = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.2e-151) tmp = Float64(-t_2); elseif (t <= 2.4e-216) tmp = t_1; elseif (t <= 1.16e-189) tmp = 1.0; elseif (t <= 7e-165) tmp = t_1; else tmp = t_2; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(2.0) * (t / (l * sqrt((2.0 / x)))); t_2 = sqrt(((-1.0 + x) / (x + 1.0))); tmp = 0.0; if (t <= -1.2e-151) tmp = -t_2; elseif (t <= 2.4e-216) tmp = t_1; elseif (t <= 1.16e-189) tmp = 1.0; elseif (t <= 7e-165) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[(l * N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.2e-151], (-t$95$2), If[LessEqual[t, 2.4e-216], t$95$1, If[LessEqual[t, 1.16e-189], 1.0, If[LessEqual[t, 7e-165], t$95$1, t$95$2]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \frac{t}{\ell \cdot \sqrt{\frac{2}{x}}}\\
t_2 := \sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-151}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-216}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-189}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.2e-151Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Applied egg-rr74.2%
Taylor expanded in t around -inf 84.3%
mul-1-neg84.3%
sub-neg84.3%
metadata-eval84.3%
+-commutative84.3%
Simplified84.3%
if -1.2e-151 < t < 2.40000000000000004e-216 or 1.1600000000000001e-189 < t < 7.0000000000000003e-165Initial program 1.7%
associate-*r/1.7%
fma-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
fma-def1.7%
distribute-rgt-neg-in1.7%
Simplified1.7%
Taylor expanded in l around inf 8.7%
Taylor expanded in x around inf 53.4%
if 2.40000000000000004e-216 < t < 1.1600000000000001e-189Initial program 2.7%
associate-*l/2.7%
Simplified2.7%
Taylor expanded in x around inf 71.4%
sqrt-unprod72.5%
metadata-eval72.5%
metadata-eval72.5%
Applied egg-rr72.5%
if 7.0000000000000003e-165 < t Initial program 49.0%
associate-*r/48.9%
fma-neg48.9%
sub-neg48.9%
metadata-eval48.9%
+-commutative48.9%
fma-def48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Applied egg-rr79.6%
Taylor expanded in l around 0 90.2%
Final simplification81.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* t (/ (sqrt x) l))))
(if (<= t -2.65e-151)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (<= t 4e-217)
t_1
(if (<= t 4e-189)
1.0
(if (<= t 3.8e-164) t_1 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = t * (sqrt(x) / l);
double tmp;
if (t <= -2.65e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 4e-217) {
tmp = t_1;
} else if (t <= 4e-189) {
tmp = 1.0;
} else if (t <= 3.8e-164) {
tmp = t_1;
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (sqrt(x) / l)
if (t <= (-2.65d-151)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 4d-217) then
tmp = t_1
else if (t <= 4d-189) then
tmp = 1.0d0
else if (t <= 3.8d-164) then
tmp = t_1
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(x) / l);
double tmp;
if (t <= -2.65e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 4e-217) {
tmp = t_1;
} else if (t <= 4e-189) {
tmp = 1.0;
} else if (t <= 3.8e-164) {
tmp = t_1;
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = t * (math.sqrt(x) / l) tmp = 0 if t <= -2.65e-151: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 4e-217: tmp = t_1 elif t <= 4e-189: tmp = 1.0 elif t <= 3.8e-164: tmp = t_1 else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(t * Float64(sqrt(x) / l)) tmp = 0.0 if (t <= -2.65e-151) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 4e-217) tmp = t_1; elseif (t <= 4e-189) tmp = 1.0; elseif (t <= 3.8e-164) tmp = t_1; else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = t * (sqrt(x) / l); tmp = 0.0; if (t <= -2.65e-151) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 4e-217) tmp = t_1; elseif (t <= 4e-189) tmp = 1.0; elseif (t <= 3.8e-164) tmp = t_1; else tmp = sqrt(((-1.0 + x) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e-151], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-217], t$95$1, If[LessEqual[t, 4e-189], 1.0, If[LessEqual[t, 3.8e-164], t$95$1, N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{-151}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-189}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-164}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
if t < -2.64999999999999989e-151Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Taylor expanded in t around -inf 84.2%
associate-*r*84.2%
neg-mul-184.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
sub-neg84.2%
metadata-eval84.2%
+-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
metadata-eval84.0%
unpow284.0%
Simplified84.0%
if -2.64999999999999989e-151 < t < 4.00000000000000033e-217 or 4.00000000000000027e-189 < t < 3.79999999999999989e-164Initial program 1.7%
associate-*l/1.7%
Simplified1.7%
Taylor expanded in x around inf 65.0%
associate--l+65.0%
unpow265.0%
distribute-lft-out65.0%
unpow265.0%
unpow265.0%
associate-*r/65.0%
mul-1-neg65.0%
unpow265.0%
fma-udef65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in t around 0 64.7%
cancel-sign-sub-inv64.7%
metadata-eval64.7%
distribute-rgt1-in64.7%
metadata-eval64.7%
unpow264.7%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in l around 0 53.3%
associate-*l/53.4%
*-lft-identity53.4%
Simplified53.4%
if 4.00000000000000033e-217 < t < 4.00000000000000027e-189Initial program 2.7%
associate-*l/2.7%
Simplified2.7%
Taylor expanded in x around inf 71.4%
sqrt-unprod72.5%
metadata-eval72.5%
metadata-eval72.5%
Applied egg-rr72.5%
if 3.79999999999999989e-164 < t Initial program 49.0%
associate-*r/48.9%
fma-neg48.9%
sub-neg48.9%
metadata-eval48.9%
+-commutative48.9%
fma-def48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Applied egg-rr79.6%
Taylor expanded in l around 0 90.2%
Final simplification81.1%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.3e-151)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (<= t 2.4e-216)
(* t (/ (sqrt x) l))
(if (<= t 1.02e-189)
1.0
(if (<= t 1.38e-163)
(* t (* (sqrt x) (/ 1.0 l)))
(sqrt (/ (+ -1.0 x) (+ x 1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.3e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.4e-216) {
tmp = t * (sqrt(x) / l);
} else if (t <= 1.02e-189) {
tmp = 1.0;
} else if (t <= 1.38e-163) {
tmp = t * (sqrt(x) * (1.0 / l));
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.3d-151)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 2.4d-216) then
tmp = t * (sqrt(x) / l)
else if (t <= 1.02d-189) then
tmp = 1.0d0
else if (t <= 1.38d-163) then
tmp = t * (sqrt(x) * (1.0d0 / l))
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.3e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 2.4e-216) {
tmp = t * (Math.sqrt(x) / l);
} else if (t <= 1.02e-189) {
tmp = 1.0;
} else if (t <= 1.38e-163) {
tmp = t * (Math.sqrt(x) * (1.0 / l));
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.3e-151: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 2.4e-216: tmp = t * (math.sqrt(x) / l) elif t <= 1.02e-189: tmp = 1.0 elif t <= 1.38e-163: tmp = t * (math.sqrt(x) * (1.0 / l)) else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.3e-151) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 2.4e-216) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 1.02e-189) tmp = 1.0; elseif (t <= 1.38e-163) tmp = Float64(t * Float64(sqrt(x) * Float64(1.0 / l))); else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.3e-151) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 2.4e-216) tmp = t * (sqrt(x) / l); elseif (t <= 1.02e-189) tmp = 1.0; elseif (t <= 1.38e-163) tmp = t * (sqrt(x) * (1.0 / l)); else tmp = sqrt(((-1.0 + x) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.3e-151], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-216], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-189], 1.0, If[LessEqual[t, 1.38e-163], N[(t * N[(N[Sqrt[x], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-151}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-216}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-189}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.38 \cdot 10^{-163}:\\
\;\;\;\;t \cdot \left(\sqrt{x} \cdot \frac{1}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
if t < -2.29999999999999996e-151Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Taylor expanded in t around -inf 84.2%
associate-*r*84.2%
neg-mul-184.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
sub-neg84.2%
metadata-eval84.2%
+-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
metadata-eval84.0%
unpow284.0%
Simplified84.0%
if -2.29999999999999996e-151 < t < 2.40000000000000004e-216Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around inf 63.0%
associate--l+63.0%
unpow263.0%
distribute-lft-out63.0%
unpow263.0%
unpow263.0%
associate-*r/63.0%
mul-1-neg63.0%
unpow263.0%
fma-udef63.0%
unpow263.0%
Simplified63.0%
Taylor expanded in t around 0 62.7%
cancel-sign-sub-inv62.7%
metadata-eval62.7%
distribute-rgt1-in62.7%
metadata-eval62.7%
unpow262.7%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in l around 0 52.3%
associate-*l/52.4%
*-lft-identity52.4%
Simplified52.4%
if 2.40000000000000004e-216 < t < 1.01999999999999999e-189Initial program 2.7%
associate-*l/2.7%
Simplified2.7%
Taylor expanded in x around inf 71.4%
sqrt-unprod72.5%
metadata-eval72.5%
metadata-eval72.5%
Applied egg-rr72.5%
if 1.01999999999999999e-189 < t < 1.37999999999999999e-163Initial program 1.5%
associate-*l/1.5%
Simplified1.5%
Taylor expanded in x around inf 80.0%
associate--l+80.0%
unpow280.0%
distribute-lft-out80.0%
unpow280.0%
unpow280.0%
associate-*r/80.0%
mul-1-neg80.0%
unpow280.0%
fma-udef80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in t around 0 80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
distribute-rgt1-in80.0%
metadata-eval80.0%
unpow280.0%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in l around 0 60.9%
if 1.37999999999999999e-163 < t Initial program 49.0%
associate-*r/48.9%
fma-neg48.9%
sub-neg48.9%
metadata-eval48.9%
+-commutative48.9%
fma-def48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Applied egg-rr79.6%
Taylor expanded in l around 0 90.2%
Final simplification81.1%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))
(if (<= t -1e-151)
(- t_1)
(if (<= t 1.3e-216)
(* t (/ (sqrt x) l))
(if (<= t 3.6e-190)
1.0
(if (<= t 1.02e-164) (* t (* (sqrt x) (/ 1.0 l))) t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1e-151) {
tmp = -t_1;
} else if (t <= 1.3e-216) {
tmp = t * (sqrt(x) / l);
} else if (t <= 3.6e-190) {
tmp = 1.0;
} else if (t <= 1.02e-164) {
tmp = t * (sqrt(x) * (1.0 / l));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
if (t <= (-1d-151)) then
tmp = -t_1
else if (t <= 1.3d-216) then
tmp = t * (sqrt(x) / l)
else if (t <= 3.6d-190) then
tmp = 1.0d0
else if (t <= 1.02d-164) then
tmp = t * (sqrt(x) * (1.0d0 / l))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((-1.0 + x) / (x + 1.0)));
double tmp;
if (t <= -1e-151) {
tmp = -t_1;
} else if (t <= 1.3e-216) {
tmp = t * (Math.sqrt(x) / l);
} else if (t <= 3.6e-190) {
tmp = 1.0;
} else if (t <= 1.02e-164) {
tmp = t * (Math.sqrt(x) * (1.0 / l));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((-1.0 + x) / (x + 1.0))) tmp = 0 if t <= -1e-151: tmp = -t_1 elif t <= 1.3e-216: tmp = t * (math.sqrt(x) / l) elif t <= 3.6e-190: tmp = 1.0 elif t <= 1.02e-164: tmp = t * (math.sqrt(x) * (1.0 / l)) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1e-151) tmp = Float64(-t_1); elseif (t <= 1.3e-216) tmp = Float64(t * Float64(sqrt(x) / l)); elseif (t <= 3.6e-190) tmp = 1.0; elseif (t <= 1.02e-164) tmp = Float64(t * Float64(sqrt(x) * Float64(1.0 / l))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((-1.0 + x) / (x + 1.0))); tmp = 0.0; if (t <= -1e-151) tmp = -t_1; elseif (t <= 1.3e-216) tmp = t * (sqrt(x) / l); elseif (t <= 3.6e-190) tmp = 1.0; elseif (t <= 1.02e-164) tmp = t * (sqrt(x) * (1.0 / l)); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1e-151], (-t$95$1), If[LessEqual[t, 1.3e-216], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-190], 1.0, If[LessEqual[t, 1.02e-164], N[(t * N[(N[Sqrt[x], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-151}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-216}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-190}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-164}:\\
\;\;\;\;t \cdot \left(\sqrt{x} \cdot \frac{1}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.9999999999999994e-152Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Applied egg-rr74.2%
Taylor expanded in t around -inf 84.3%
mul-1-neg84.3%
sub-neg84.3%
metadata-eval84.3%
+-commutative84.3%
Simplified84.3%
if -9.9999999999999994e-152 < t < 1.2999999999999999e-216Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around inf 63.0%
associate--l+63.0%
unpow263.0%
distribute-lft-out63.0%
unpow263.0%
unpow263.0%
associate-*r/63.0%
mul-1-neg63.0%
unpow263.0%
fma-udef63.0%
unpow263.0%
Simplified63.0%
Taylor expanded in t around 0 62.7%
cancel-sign-sub-inv62.7%
metadata-eval62.7%
distribute-rgt1-in62.7%
metadata-eval62.7%
unpow262.7%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in l around 0 52.3%
associate-*l/52.4%
*-lft-identity52.4%
Simplified52.4%
if 1.2999999999999999e-216 < t < 3.60000000000000007e-190Initial program 2.7%
associate-*l/2.7%
Simplified2.7%
Taylor expanded in x around inf 71.4%
sqrt-unprod72.5%
metadata-eval72.5%
metadata-eval72.5%
Applied egg-rr72.5%
if 3.60000000000000007e-190 < t < 1.02e-164Initial program 1.5%
associate-*l/1.5%
Simplified1.5%
Taylor expanded in x around inf 80.0%
associate--l+80.0%
unpow280.0%
distribute-lft-out80.0%
unpow280.0%
unpow280.0%
associate-*r/80.0%
mul-1-neg80.0%
unpow280.0%
fma-udef80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in t around 0 80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
distribute-rgt1-in80.0%
metadata-eval80.0%
unpow280.0%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in l around 0 60.9%
if 1.02e-164 < t Initial program 49.0%
associate-*r/48.9%
fma-neg48.9%
sub-neg48.9%
metadata-eval48.9%
+-commutative48.9%
fma-def48.9%
distribute-rgt-neg-in48.9%
Simplified48.9%
Applied egg-rr79.6%
Taylor expanded in l around 0 90.2%
Final simplification81.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1e-151)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (or (<= t 2.1e-234) (and (not (<= t 8.5e-189)) (<= t 1.12e-164)))
(* (sqrt x) (/ t l))
1.0)))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if ((t <= 2.1e-234) || (!(t <= 8.5e-189) && (t <= 1.12e-164))) {
tmp = sqrt(x) * (t / l);
} 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-151)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if ((t <= 2.1d-234) .or. (.not. (t <= 8.5d-189)) .and. (t <= 1.12d-164)) then
tmp = sqrt(x) * (t / l)
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-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if ((t <= 2.1e-234) || (!(t <= 8.5e-189) && (t <= 1.12e-164))) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-151: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif (t <= 2.1e-234) or (not (t <= 8.5e-189) and (t <= 1.12e-164)): tmp = math.sqrt(x) * (t / l) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-151) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif ((t <= 2.1e-234) || (!(t <= 8.5e-189) && (t <= 1.12e-164))) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-151) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif ((t <= 2.1e-234) || (~((t <= 8.5e-189)) && (t <= 1.12e-164))) tmp = sqrt(x) * (t / l); 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-151], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.1e-234], And[N[Not[LessEqual[t, 8.5e-189]], $MachinePrecision], LessEqual[t, 1.12e-164]]], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-151}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-234} \lor \neg \left(t \leq 8.5 \cdot 10^{-189}\right) \land t \leq 1.12 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.9999999999999994e-152Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Taylor expanded in t around -inf 84.2%
associate-*r*84.2%
neg-mul-184.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
sub-neg84.2%
metadata-eval84.2%
+-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
metadata-eval84.0%
unpow284.0%
Simplified84.0%
if -9.9999999999999994e-152 < t < 2.09999999999999991e-234 or 8.50000000000000068e-189 < t < 1.12e-164Initial program 1.7%
associate-*l/1.7%
Simplified1.7%
Taylor expanded in x around inf 66.7%
associate--l+66.7%
unpow266.7%
distribute-lft-out66.7%
unpow266.7%
unpow266.7%
associate-*r/66.7%
mul-1-neg66.7%
unpow266.7%
fma-udef66.7%
unpow266.7%
Simplified66.7%
Taylor expanded in t around 0 66.5%
cancel-sign-sub-inv66.5%
metadata-eval66.5%
distribute-rgt1-in66.5%
metadata-eval66.5%
unpow266.5%
associate-*l/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in l around 0 50.3%
if 2.09999999999999991e-234 < t < 8.50000000000000068e-189 or 1.12e-164 < t Initial program 43.5%
associate-*l/43.5%
Simplified43.5%
Taylor expanded in x around inf 85.6%
sqrt-unprod86.9%
metadata-eval86.9%
metadata-eval86.9%
Applied egg-rr86.9%
Final simplification80.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.1e-151)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (or (<= t 2.55e-216) (and (not (<= t 1.52e-189)) (<= t 5.7e-164)))
(* t (/ (sqrt x) l))
1.0)))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.1e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if ((t <= 2.55e-216) || (!(t <= 1.52e-189) && (t <= 5.7e-164))) {
tmp = t * (sqrt(x) / l);
} 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.1d-151)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if ((t <= 2.55d-216) .or. (.not. (t <= 1.52d-189)) .and. (t <= 5.7d-164)) then
tmp = t * (sqrt(x) / l)
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.1e-151) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if ((t <= 2.55e-216) || (!(t <= 1.52e-189) && (t <= 5.7e-164))) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.1e-151: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif (t <= 2.55e-216) or (not (t <= 1.52e-189) and (t <= 5.7e-164)): tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.1e-151) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif ((t <= 2.55e-216) || (!(t <= 1.52e-189) && (t <= 5.7e-164))) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.1e-151) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif ((t <= 2.55e-216) || (~((t <= 1.52e-189)) && (t <= 5.7e-164))) tmp = t * (sqrt(x) / l); 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.1e-151], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.55e-216], And[N[Not[LessEqual[t, 1.52e-189]], $MachinePrecision], LessEqual[t, 5.7e-164]]], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-151}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-216} \lor \neg \left(t \leq 1.52 \cdot 10^{-189}\right) \land t \leq 5.7 \cdot 10^{-164}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.1e-151Initial program 34.1%
associate-*r/34.1%
fma-neg34.1%
sub-neg34.1%
metadata-eval34.1%
+-commutative34.1%
fma-def34.1%
distribute-rgt-neg-in34.1%
Simplified34.1%
Taylor expanded in t around -inf 84.2%
associate-*r*84.2%
neg-mul-184.2%
distribute-rgt-neg-out84.2%
+-commutative84.2%
sub-neg84.2%
metadata-eval84.2%
+-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 84.0%
associate-*r/84.0%
metadata-eval84.0%
unpow284.0%
Simplified84.0%
if -1.1e-151 < t < 2.5500000000000001e-216 or 1.5199999999999999e-189 < t < 5.70000000000000023e-164Initial program 1.7%
associate-*l/1.7%
Simplified1.7%
Taylor expanded in x around inf 65.0%
associate--l+65.0%
unpow265.0%
distribute-lft-out65.0%
unpow265.0%
unpow265.0%
associate-*r/65.0%
mul-1-neg65.0%
unpow265.0%
fma-udef65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in t around 0 64.7%
cancel-sign-sub-inv64.7%
metadata-eval64.7%
distribute-rgt1-in64.7%
metadata-eval64.7%
unpow264.7%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in l around 0 53.3%
associate-*l/53.4%
*-lft-identity53.4%
Simplified53.4%
if 2.5500000000000001e-216 < t < 1.5199999999999999e-189 or 5.70000000000000023e-164 < t Initial program 45.0%
associate-*l/45.0%
Simplified45.0%
Taylor expanded in x around inf 87.2%
sqrt-unprod88.5%
metadata-eval88.5%
metadata-eval88.5%
Applied egg-rr88.5%
Final simplification81.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = (1.0 / x) + (-1.0 - (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 <= (-5d-310)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (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 <= -5e-310) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - 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 <= -5e-310) tmp = (1.0 / x) + (-1.0 - (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, -5e-310], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 26.8%
associate-*r/26.7%
fma-neg26.7%
sub-neg26.7%
metadata-eval26.7%
+-commutative26.7%
fma-def26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
Taylor expanded in t around -inf 71.3%
associate-*r*71.3%
neg-mul-171.3%
distribute-rgt-neg-out71.3%
+-commutative71.3%
sub-neg71.3%
metadata-eval71.3%
+-commutative71.3%
Simplified71.3%
Taylor expanded in x around inf 71.2%
associate-*r/71.2%
metadata-eval71.2%
unpow271.2%
Simplified71.2%
if -4.999999999999985e-310 < t Initial program 40.6%
associate-*l/40.6%
Simplified40.6%
Taylor expanded in x around inf 80.6%
sqrt-unprod81.9%
metadata-eval81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification76.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = -1.0 + (1.0 / x); else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 26.8%
associate-*r/26.7%
fma-neg26.7%
sub-neg26.7%
metadata-eval26.7%
+-commutative26.7%
fma-def26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
Taylor expanded in t around -inf 71.3%
associate-*r*71.3%
neg-mul-171.3%
distribute-rgt-neg-out71.3%
+-commutative71.3%
sub-neg71.3%
metadata-eval71.3%
+-commutative71.3%
Simplified71.3%
Taylor expanded in x around inf 70.8%
if -4.999999999999985e-310 < t Initial program 40.6%
associate-*l/40.6%
Simplified40.6%
Taylor expanded in x around inf 80.6%
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 -2.75e-304) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.75e-304) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.75d-304)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.75e-304) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.75e-304: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.75e-304) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.75e-304) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.75e-304], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{-304}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -2.75000000000000017e-304Initial program 27.0%
associate-*r/27.0%
fma-neg27.0%
sub-neg27.0%
metadata-eval27.0%
+-commutative27.0%
fma-def27.0%
distribute-rgt-neg-in27.0%
Simplified27.0%
Taylor expanded in t around -inf 71.8%
associate-*r*71.8%
neg-mul-171.8%
distribute-rgt-neg-out71.8%
+-commutative71.8%
sub-neg71.8%
metadata-eval71.8%
+-commutative71.8%
Simplified71.8%
Taylor expanded in x around inf 70.7%
if -2.75000000000000017e-304 < t Initial program 40.3%
associate-*l/40.3%
Simplified40.3%
Taylor expanded in x around inf 80.0%
sqrt-unprod81.2%
metadata-eval81.2%
metadata-eval81.2%
Applied egg-rr81.2%
Final simplification76.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.7%
associate-*r/33.6%
fma-neg33.6%
sub-neg33.6%
metadata-eval33.6%
+-commutative33.6%
fma-def33.6%
distribute-rgt-neg-in33.6%
Simplified33.6%
Taylor expanded in t around -inf 36.5%
associate-*r*36.5%
neg-mul-136.5%
distribute-rgt-neg-out36.5%
+-commutative36.5%
sub-neg36.5%
metadata-eval36.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around inf 36.0%
Final simplification36.0%
herbie shell --seed 2023240
(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)))))