
(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 23 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 (* (sqrt 2.0) t))
(t_2 (fma 2.0 (* t t) (* l l)))
(t_3 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_4 (/ (+ x 1.0) (+ x -1.0)))
(t_5 (/ t_1 (sqrt (- (* t_4 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_6 (/ (* l l) x)))
(if (<= t_5 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_6 (+ t_6 t_3)))))
(if (<= t_5 0.0)
(/ 1.0 (/ (hypot (* (sqrt t_4) (hypot l t_1)) l) t_1))
(if (<= t_5 INFINITY)
(*
(sqrt 2.0)
(/
t
(sqrt
(+
t_6
(+
(fma
2.0
(/ (* t t) (pow x 3.0))
(+ (+ t_3 (/ (* l l) (pow x 3.0))) (/ (+ t_2 t_2) (* x x))))
(+ (/ t_2 (pow x 3.0)) (/ t_2 x)))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = fma(2.0, (t * t), (l * l));
double t_3 = 2.0 * ((t * t) + ((t * t) / x));
double t_4 = (x + 1.0) / (x + -1.0);
double t_5 = t_1 / sqrt(((t_4 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_6 = (l * l) / x;
double tmp;
if (t_5 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_6 + (t_6 + t_3))));
} else if (t_5 <= 0.0) {
tmp = 1.0 / (hypot((sqrt(t_4) * hypot(l, t_1)), l) / t_1);
} else if (t_5 <= ((double) INFINITY)) {
tmp = sqrt(2.0) * (t / sqrt((t_6 + (fma(2.0, ((t * t) / pow(x, 3.0)), ((t_3 + ((l * l) / pow(x, 3.0))) + ((t_2 + t_2) / (x * x)))) + ((t_2 / pow(x, 3.0)) + (t_2 / x))))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = fma(2.0, Float64(t * t), Float64(l * l)) t_3 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_4 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_5 = Float64(t_1 / sqrt(Float64(Float64(t_4 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_6 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_5 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_6 + Float64(t_6 + t_3))))); elseif (t_5 <= 0.0) tmp = Float64(1.0 / Float64(hypot(Float64(sqrt(t_4) * hypot(l, t_1)), l) / t_1)); elseif (t_5 <= Inf) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_6 + Float64(fma(2.0, Float64(Float64(t * t) / (x ^ 3.0)), Float64(Float64(t_3 + Float64(Float64(l * l) / (x ^ 3.0))) + Float64(Float64(t_2 + t_2) / Float64(x * x)))) + Float64(Float64(t_2 / (x ^ 3.0)) + Float64(t_2 / x))))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); end return 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] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$4 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$5, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$6 + N[(t$95$6 + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(1.0 / N[(N[Sqrt[N[(N[Sqrt[t$95$4], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$6 + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 + N[(N[(l * l), $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 + t$95$2), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_3 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_4 := \frac{x + 1}{x + -1}\\
t_5 := \frac{t_1}{\sqrt{t_4 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_6 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_5 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_6 + \left(t_6 + t_3\right)}}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\sqrt{t_4} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}{t_1}}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_6 + \left(\mathsf{fma}\left(2, \frac{t \cdot t}{{x}^{3}}, \left(t_3 + \frac{\ell \cdot \ell}{{x}^{3}}\right) + \frac{t_2 + t_2}{x \cdot x}\right) + \left(\frac{t_2}{{x}^{3}} + \frac{t_2}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
associate-*r/6.6%
fma-neg6.6%
remove-double-neg6.6%
fma-neg6.6%
sub-neg6.6%
metadata-eval6.6%
remove-double-neg6.6%
+-commutative6.6%
fma-def6.6%
Simplified6.6%
Applied egg-rr100.0%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*r/61.2%
fma-neg61.3%
remove-double-neg61.3%
fma-neg61.2%
sub-neg61.2%
metadata-eval61.2%
remove-double-neg61.2%
+-commutative61.2%
fma-def61.2%
Simplified61.2%
Taylor expanded in x around -inf 86.2%
Simplified86.2%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.5%
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 (* (sqrt 2.0) t))
(t_3 (fma 2.0 (* t t) (* l l)))
(t_4 (/ (+ x 1.0) (+ x -1.0)))
(t_5 (/ t_2 (sqrt (- (* t_4 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_6 (/ (* l l) x)))
(if (<= t_5 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_6 (+ t_6 t_1)))))
(if (<= t_5 0.0)
(/ 1.0 (/ (hypot (* (sqrt t_4) (hypot l t_2)) l) t_2))
(if (<= t_5 INFINITY)
(*
(sqrt 2.0)
(/ t (sqrt (+ t_6 (+ (+ t_1 (/ (+ t_3 t_3) (* x x))) (/ t_3 x))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = sqrt(2.0) * t;
double t_3 = fma(2.0, (t * t), (l * l));
double t_4 = (x + 1.0) / (x + -1.0);
double t_5 = t_2 / sqrt(((t_4 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_6 = (l * l) / x;
double tmp;
if (t_5 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_6 + (t_6 + t_1))));
} else if (t_5 <= 0.0) {
tmp = 1.0 / (hypot((sqrt(t_4) * hypot(l, t_2)), l) / t_2);
} else if (t_5 <= ((double) INFINITY)) {
tmp = sqrt(2.0) * (t / sqrt((t_6 + ((t_1 + ((t_3 + t_3) / (x * x))) + (t_3 / x)))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
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(sqrt(2.0) * t) t_3 = fma(2.0, Float64(t * t), Float64(l * l)) t_4 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_5 = Float64(t_2 / sqrt(Float64(Float64(t_4 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_6 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_5 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_6 + Float64(t_6 + t_1))))); elseif (t_5 <= 0.0) tmp = Float64(1.0 / Float64(hypot(Float64(sqrt(t_4) * hypot(l, t_2)), l) / t_2)); elseif (t_5 <= Inf) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_6 + Float64(Float64(t_1 + Float64(Float64(t_3 + t_3) / Float64(x * x))) + Float64(t_3 / x)))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); 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[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / N[Sqrt[N[(N[(t$95$4 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$5, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$6 + N[(t$95$6 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(1.0 / N[(N[Sqrt[N[(N[Sqrt[t$95$4], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$6 + N[(N[(t$95$1 + N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
t_4 := \frac{x + 1}{x + -1}\\
t_5 := \frac{t_2}{\sqrt{t_4 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_6 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_5 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_6 + \left(t_6 + t_1\right)}}\\
\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\sqrt{t_4} \cdot \mathsf{hypot}\left(\ell, t_2\right), \ell\right)}{t_2}}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_6 + \left(\left(t_1 + \frac{t_3 + t_3}{x \cdot x}\right) + \frac{t_3}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
associate-*r/6.6%
fma-neg6.6%
remove-double-neg6.6%
fma-neg6.6%
sub-neg6.6%
metadata-eval6.6%
remove-double-neg6.6%
+-commutative6.6%
fma-def6.6%
Simplified6.6%
Applied egg-rr100.0%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*r/61.2%
fma-neg61.3%
remove-double-neg61.3%
fma-neg61.2%
sub-neg61.2%
metadata-eval61.2%
remove-double-neg61.2%
+-commutative61.2%
fma-def61.2%
Simplified61.2%
Taylor expanded in x around -inf 85.8%
associate--l+85.8%
unpow285.8%
sub-neg85.8%
Simplified85.8%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_3 (/ (+ x 1.0) (+ x -1.0)))
(t_4 (/ t_1 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_5 (/ (* l l) x)))
(if (<= t_4 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_5 (+ t_5 t_2)))))
(if (<= t_4 0.0)
(* (sqrt 2.0) (/ t (hypot (* (sqrt t_3) (hypot l t_1)) l)))
(if (<= t_4 INFINITY)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_5 (+ t_2 (/ (fma 2.0 (* t t) (* l l)) x))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = 2.0 * ((t * t) + ((t * t) / x));
double t_3 = (x + 1.0) / (x + -1.0);
double t_4 = t_1 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_5 = (l * l) / x;
double tmp;
if (t_4 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_5 + t_2))));
} else if (t_4 <= 0.0) {
tmp = sqrt(2.0) * (t / hypot((sqrt(t_3) * hypot(l, t_1)), l));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_2 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_4 = Float64(t_1 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_5 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_4 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_5 + t_2))))); elseif (t_4 <= 0.0) tmp = Float64(sqrt(2.0) * Float64(t / hypot(Float64(sqrt(t_3) * hypot(l, t_1)), l))); elseif (t_4 <= Inf) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_2 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); end return 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] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$4, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(N[Sqrt[t$95$3], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$2 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_5 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_4 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_5 + t_2\right)}}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\mathsf{hypot}\left(\sqrt{t_3} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
Applied egg-rr99.7%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*l/61.5%
Simplified61.5%
Taylor expanded in x around inf 85.6%
associate--l+85.6%
unpow285.6%
distribute-lft-out85.6%
unpow285.6%
unpow285.6%
associate-*r/85.6%
mul-1-neg85.6%
unpow285.6%
+-commutative85.6%
unpow285.6%
fma-udef85.6%
Simplified85.6%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_3 (/ (+ x 1.0) (+ x -1.0)))
(t_4 (/ t_1 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_5 (/ (* l l) x)))
(if (<= t_4 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_5 (+ t_5 t_2)))))
(if (<= t_4 0.0)
(/ t (/ (hypot (* (sqrt t_3) (hypot l t_1)) l) (sqrt 2.0)))
(if (<= t_4 INFINITY)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_5 (+ t_2 (/ (fma 2.0 (* t t) (* l l)) x))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = 2.0 * ((t * t) + ((t * t) / x));
double t_3 = (x + 1.0) / (x + -1.0);
double t_4 = t_1 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_5 = (l * l) / x;
double tmp;
if (t_4 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_5 + t_2))));
} else if (t_4 <= 0.0) {
tmp = t / (hypot((sqrt(t_3) * hypot(l, t_1)), l) / sqrt(2.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_2 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_4 = Float64(t_1 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_5 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_4 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_5 + t_2))))); elseif (t_4 <= 0.0) tmp = Float64(t / Float64(hypot(Float64(sqrt(t_3) * hypot(l, t_1)), l) / sqrt(2.0))); elseif (t_4 <= Inf) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_2 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); end return 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] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$4, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t / N[(N[Sqrt[N[(N[Sqrt[t$95$3], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$2 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_5 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_4 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_5 + t_2\right)}}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{t}{\frac{\mathsf{hypot}\left(\sqrt{t_3} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}{\sqrt{2}}}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
associate-*r/6.6%
fma-neg6.6%
remove-double-neg6.6%
fma-neg6.6%
sub-neg6.6%
metadata-eval6.6%
remove-double-neg6.6%
+-commutative6.6%
fma-def6.6%
Simplified6.6%
Applied egg-rr99.9%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*l/61.5%
Simplified61.5%
Taylor expanded in x around inf 85.6%
associate--l+85.6%
unpow285.6%
distribute-lft-out85.6%
unpow285.6%
unpow285.6%
associate-*r/85.6%
mul-1-neg85.6%
unpow285.6%
+-commutative85.6%
unpow285.6%
fma-udef85.6%
Simplified85.6%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_3 (/ (+ x 1.0) (+ x -1.0)))
(t_4 (/ t_1 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_5 (/ (* l l) x)))
(if (<= t_4 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_5 (+ t_5 t_2)))))
(if (<= t_4 0.0)
(/ t_1 (hypot (* (sqrt t_3) (hypot l t_1)) l))
(if (<= t_4 INFINITY)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_5 (+ t_2 (/ (fma 2.0 (* t t) (* l l)) x))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = 2.0 * ((t * t) + ((t * t) / x));
double t_3 = (x + 1.0) / (x + -1.0);
double t_4 = t_1 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_5 = (l * l) / x;
double tmp;
if (t_4 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_5 + t_2))));
} else if (t_4 <= 0.0) {
tmp = t_1 / hypot((sqrt(t_3) * hypot(l, t_1)), l);
} else if (t_4 <= ((double) INFINITY)) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_2 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_4 = Float64(t_1 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_5 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_4 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_5 + t_2))))); elseif (t_4 <= 0.0) tmp = Float64(t_1 / hypot(Float64(sqrt(t_3) * hypot(l, t_1)), l)); elseif (t_4 <= Inf) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_2 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); end return 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] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$4, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$1 / N[Sqrt[N[(N[Sqrt[t$95$3], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$2 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_5 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_4 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_5 + t_2\right)}}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{t_1}{\mathsf{hypot}\left(\sqrt{t_3} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
associate-*r/6.6%
fma-neg6.6%
remove-double-neg6.6%
fma-neg6.6%
sub-neg6.6%
metadata-eval6.6%
remove-double-neg6.6%
+-commutative6.6%
fma-def6.6%
Simplified6.6%
Applied egg-rr99.9%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*l/61.5%
Simplified61.5%
Taylor expanded in x around inf 85.6%
associate--l+85.6%
unpow285.6%
distribute-lft-out85.6%
unpow285.6%
unpow285.6%
associate-*r/85.6%
mul-1-neg85.6%
unpow285.6%
+-commutative85.6%
unpow285.6%
fma-udef85.6%
Simplified85.6%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (sqrt 2.0) t))
(t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))
(t_3 (/ (+ x 1.0) (+ x -1.0)))
(t_4 (/ t_1 (sqrt (- (* t_3 (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
(t_5 (/ (* l l) x)))
(if (<= t_4 -0.99999999)
(* t (/ (sqrt 2.0) (sqrt (+ t_5 (+ t_5 t_2)))))
(if (<= t_4 0.0)
(/ 1.0 (/ (hypot (* (sqrt t_3) (hypot l t_1)) l) t_1))
(if (<= t_4 INFINITY)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_5 (+ t_2 (/ (fma 2.0 (* t t) (* l l)) x))))))
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x))))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(2.0) * t;
double t_2 = 2.0 * ((t * t) + ((t * t) / x));
double t_3 = (x + 1.0) / (x + -1.0);
double t_4 = t_1 / sqrt(((t_3 * ((l * l) + (2.0 * (t * t)))) - (l * l)));
double t_5 = (l * l) / x;
double tmp;
if (t_4 <= -0.99999999) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_5 + t_2))));
} else if (t_4 <= 0.0) {
tmp = 1.0 / (hypot((sqrt(t_3) * hypot(l, t_1)), l) / t_1);
} else if (t_4 <= ((double) INFINITY)) {
tmp = t * (sqrt(2.0) / sqrt((t_5 + (t_2 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(sqrt(2.0) * t) t_2 = Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) t_3 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_4 = Float64(t_1 / sqrt(Float64(Float64(t_3 * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) t_5 = Float64(Float64(l * l) / x) tmp = 0.0 if (t_4 <= -0.99999999) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_5 + t_2))))); elseif (t_4 <= 0.0) tmp = Float64(1.0 / Float64(hypot(Float64(sqrt(t_3) * hypot(l, t_1)), l) / t_1)); elseif (t_4 <= Inf) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_5 + Float64(t_2 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); end return 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] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / N[Sqrt[N[(N[(t$95$3 * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$4, -0.99999999], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(1.0 / N[(N[Sqrt[N[(N[Sqrt[t$95$3], $MachinePrecision] * N[Sqrt[l ^ 2 + t$95$1 ^ 2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$5 + N[(t$95$2 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot t\\
t_2 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_3 := \frac{x + 1}{x + -1}\\
t_4 := \frac{t_1}{\sqrt{t_3 \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}\\
t_5 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t_4 \leq -0.99999999:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_5 + t_2\right)}}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(\sqrt{t_3} \cdot \mathsf{hypot}\left(\ell, t_1\right), \ell\right)}{t_1}}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_5 + \left(t_2 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < -0.99999998999999995Initial program 56.2%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in x around inf 89.6%
associate--l+89.6%
unpow289.6%
distribute-lft-out89.6%
unpow289.6%
unpow289.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
+-commutative89.6%
unpow289.6%
fma-udef89.6%
Simplified89.6%
Taylor expanded in t around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
unpow289.6%
Simplified89.6%
if -0.99999998999999995 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < 0.0Initial program 6.6%
associate-*r/6.6%
fma-neg6.6%
remove-double-neg6.6%
fma-neg6.6%
sub-neg6.6%
metadata-eval6.6%
remove-double-neg6.6%
+-commutative6.6%
fma-def6.6%
Simplified6.6%
Applied egg-rr100.0%
if 0.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) < +inf.0Initial program 61.4%
associate-*l/61.5%
Simplified61.5%
Taylor expanded in x around inf 85.6%
associate--l+85.6%
unpow285.6%
distribute-lft-out85.6%
unpow285.6%
unpow285.6%
associate-*r/85.6%
mul-1-neg85.6%
unpow285.6%
+-commutative85.6%
unpow285.6%
fma-udef85.6%
Simplified85.6%
if +inf.0 < (/.f64 (*.f64 (sqrt.f64 2) t) (sqrt.f64 (-.f64 (*.f64 (/.f64 (+.f64 x 1) (-.f64 x 1)) (+.f64 (*.f64 l l) (*.f64 2 (*.f64 t t)))) (*.f64 l l)))) Initial program 0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in l around inf 2.9%
*-commutative2.9%
associate--l+2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
sub-neg2.9%
metadata-eval2.9%
+-commutative2.9%
Simplified2.9%
Taylor expanded in x around inf 45.5%
+-commutative45.5%
+-commutative45.5%
associate-+l+45.5%
associate-*r/45.5%
metadata-eval45.5%
unpow245.5%
associate-*r/45.5%
metadata-eval45.5%
associate-*r/45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification82.3%
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 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (/ (* l l) x)))
(if (<= t -4.2e+56)
(- t_2)
(if (<= t -5e-139)
(* t (/ (sqrt 2.0) (sqrt (+ t_3 (+ t_3 t_1)))))
(if (<= t 2.1e-162)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x)))
(/ 2.0 (pow x 4.0)))))))
(if (<= t 85000.0)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_3 (+ t_1 (/ (fma 2.0 (* t t) (* l l)) x))))))
t_2))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = (l * l) / x;
double tmp;
if (t <= -4.2e+56) {
tmp = -t_2;
} else if (t <= -5e-139) {
tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + t_1))));
} else if (t <= 2.1e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt((((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))) + (2.0 / pow(x, 4.0))))));
} else if (t <= 85000.0) {
tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_1 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t_2;
}
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 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -4.2e+56) tmp = Float64(-t_2); elseif (t <= -5e-139) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_3 + t_1))))); elseif (t <= 2.1e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))) + Float64(2.0 / (x ^ 4.0))))))); elseif (t <= 85000.0) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_1 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = t_2; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -4.2e+56], (-t$95$2), If[LessEqual[t, -5e-139], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 85000.0], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$1 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+56}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)\right) + \frac{2}{{x}^{4}}}}\\
\mathbf{elif}\;t \leq 85000:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.20000000000000034e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -4.20000000000000034e56 < t < -5.00000000000000034e-139Initial program 59.2%
associate-*l/59.4%
Simplified59.4%
Taylor expanded in x around inf 86.4%
associate--l+86.4%
unpow286.4%
distribute-lft-out86.4%
unpow286.4%
unpow286.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
+-commutative86.4%
unpow286.4%
fma-udef86.4%
Simplified86.4%
Taylor expanded in t around 0 86.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
Simplified86.4%
if -5.00000000000000034e-139 < t < 2.1e-162Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 47.3%
+-commutative47.3%
+-commutative47.3%
+-commutative47.3%
associate-+l+47.3%
associate-*r/47.3%
metadata-eval47.3%
unpow247.3%
associate-*r/47.3%
metadata-eval47.3%
associate-*r/47.3%
metadata-eval47.3%
associate-*r/47.3%
metadata-eval47.3%
Simplified47.3%
if 2.1e-162 < t < 85000Initial program 56.0%
associate-*l/56.0%
Simplified56.0%
Taylor expanded in x around inf 89.3%
associate--l+89.3%
unpow289.3%
distribute-lft-out89.3%
unpow289.3%
unpow289.3%
associate-*r/89.3%
mul-1-neg89.3%
unpow289.3%
+-commutative89.3%
unpow289.3%
fma-udef89.3%
Simplified89.3%
if 85000 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.5%
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 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (/ (* l l) x)))
(if (<= t -4e+56)
(- t_2)
(if (<= t -5e-139)
(* t (/ (sqrt 2.0) (sqrt (+ t_3 (+ t_3 t_1)))))
(if (<= t 2.95e-161)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x)))))))
(if (<= t 120000.0)
(*
(sqrt 2.0)
(/ t (sqrt (+ t_3 (+ t_1 (/ (fma 2.0 (* t t) (* l l)) x))))))
t_2))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = (l * l) / x;
double tmp;
if (t <= -4e+56) {
tmp = -t_2;
} else if (t <= -5e-139) {
tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + t_1))));
} else if (t <= 2.95e-161) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
} else if (t <= 120000.0) {
tmp = sqrt(2.0) * (t / sqrt((t_3 + (t_1 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t_2;
}
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 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -4e+56) tmp = Float64(-t_2); elseif (t <= -5e-139) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_3 + t_1))))); elseif (t <= 2.95e-161) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); elseif (t <= 120000.0) tmp = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_3 + Float64(t_1 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = t_2; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -4e+56], (-t$95$2), If[LessEqual[t, -5e-139], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.95e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 120000.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(t$95$3 + N[(t$95$1 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+56}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\mathbf{elif}\;t \leq 120000:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.00000000000000037e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -4.00000000000000037e56 < t < -5.00000000000000034e-139Initial program 59.2%
associate-*l/59.4%
Simplified59.4%
Taylor expanded in x around inf 86.4%
associate--l+86.4%
unpow286.4%
distribute-lft-out86.4%
unpow286.4%
unpow286.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
+-commutative86.4%
unpow286.4%
fma-udef86.4%
Simplified86.4%
Taylor expanded in t around 0 86.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
Simplified86.4%
if -5.00000000000000034e-139 < t < 2.9500000000000001e-161Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 47.1%
+-commutative47.1%
+-commutative47.1%
associate-+l+47.1%
associate-*r/47.1%
metadata-eval47.1%
unpow247.1%
associate-*r/47.1%
metadata-eval47.1%
associate-*r/47.1%
metadata-eval47.1%
Simplified47.1%
if 2.9500000000000001e-161 < t < 1.2e5Initial program 56.0%
associate-*r/55.9%
fma-neg55.9%
remove-double-neg55.9%
fma-neg55.9%
sub-neg55.9%
metadata-eval55.9%
remove-double-neg55.9%
+-commutative55.9%
fma-def55.9%
Simplified55.9%
Taylor expanded in x around inf 89.0%
associate--l+89.3%
unpow289.3%
distribute-lft-out89.3%
unpow289.3%
unpow289.3%
associate-*r/89.3%
mul-1-neg89.3%
unpow289.3%
+-commutative89.3%
unpow289.3%
fma-udef89.3%
Simplified89.0%
if 1.2e5 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.4%
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 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_3 (/ (* l l) x)))
(if (<= t -5.2e+56)
(- t_2)
(if (<= t -5e-139)
(* t (/ (sqrt 2.0) (sqrt (+ t_3 (+ t_3 t_1)))))
(if (<= t 2.8e-161)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x)))))))
(if (<= t 120000.0)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_3 (+ t_1 (/ (fma 2.0 (* t t) (* l l)) x))))))
t_2))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * ((t * t) + ((t * t) / x));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double t_3 = (l * l) / x;
double tmp;
if (t <= -5.2e+56) {
tmp = -t_2;
} else if (t <= -5e-139) {
tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_3 + t_1))));
} else if (t <= 2.8e-161) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
} else if (t <= 120000.0) {
tmp = t * (sqrt(2.0) / sqrt((t_3 + (t_1 + (fma(2.0, (t * t), (l * l)) / x)))));
} else {
tmp = t_2;
}
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 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_3 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -5.2e+56) tmp = Float64(-t_2); elseif (t <= -5e-139) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_3 + t_1))))); elseif (t <= 2.8e-161) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); elseif (t <= 120000.0) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_3 + Float64(t_1 + Float64(fma(2.0, Float64(t * t), Float64(l * l)) / x)))))); else tmp = t_2; end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -5.2e+56], (-t$95$2), If[LessEqual[t, -5e-139], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$3 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 120000.0], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$3 + N[(t$95$1 + N[(N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
t_3 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+56}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_3 + t_1\right)}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\mathbf{elif}\;t \leq 120000:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_3 + \left(t_1 + \frac{\mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.20000000000000022e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -5.20000000000000022e56 < t < -5.00000000000000034e-139Initial program 59.2%
associate-*l/59.4%
Simplified59.4%
Taylor expanded in x around inf 86.4%
associate--l+86.4%
unpow286.4%
distribute-lft-out86.4%
unpow286.4%
unpow286.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
+-commutative86.4%
unpow286.4%
fma-udef86.4%
Simplified86.4%
Taylor expanded in t around 0 86.4%
associate-*r/86.4%
mul-1-neg86.4%
unpow286.4%
Simplified86.4%
if -5.00000000000000034e-139 < t < 2.79999999999999992e-161Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 47.1%
+-commutative47.1%
+-commutative47.1%
associate-+l+47.1%
associate-*r/47.1%
metadata-eval47.1%
unpow247.1%
associate-*r/47.1%
metadata-eval47.1%
associate-*r/47.1%
metadata-eval47.1%
Simplified47.1%
if 2.79999999999999992e-161 < t < 1.2e5Initial program 56.0%
associate-*l/56.0%
Simplified56.0%
Taylor expanded in x around inf 89.3%
associate--l+89.3%
unpow289.3%
distribute-lft-out89.3%
unpow289.3%
unpow289.3%
associate-*r/89.3%
mul-1-neg89.3%
unpow289.3%
+-commutative89.3%
unpow289.3%
fma-udef89.3%
Simplified89.3%
if 1.2e5 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -6e+56)
(- t_1)
(if (<= t -5e-139)
t_3
(if (<= t 8.6e-161)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 (* x x)) (+ (/ 2.0 (pow x 3.0)) (/ 2.0 x)))))))
(if (<= t 102000.0) t_3 t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (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 <= -6e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 8.6e-161) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / pow(x, 3.0)) + (2.0 / x))))));
} else if (t <= 102000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
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 <= (-6d+56)) then
tmp = -t_1
else if (t <= (-5d-139)) then
tmp = t_3
else if (t <= 8.6d-161) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / (x * x)) + ((2.0d0 / (x ** 3.0d0)) + (2.0d0 / x))))))
else if (t <= 102000.0d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
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 <= -6e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 8.6e-161) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / (x * x)) + ((2.0 / Math.pow(x, 3.0)) + (2.0 / x))))));
} else if (t <= 102000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) 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 <= -6e+56: tmp = -t_1 elif t <= -5e-139: tmp = t_3 elif t <= 8.6e-161: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / (x * x)) + ((2.0 / math.pow(x, 3.0)) + (2.0 / x)))))) elif t <= 102000.0: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(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 <= -6e+56) tmp = Float64(-t_1); elseif (t <= -5e-139) tmp = t_3; elseif (t <= 8.6e-161) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(Float64(2.0 / (x ^ 3.0)) + Float64(2.0 / x))))))); elseif (t <= 102000.0) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); 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 <= -6e+56) tmp = -t_1; elseif (t <= -5e-139) tmp = t_3; elseif (t <= 8.6e-161) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + ((2.0 / (x ^ 3.0)) + (2.0 / x)))))); elseif (t <= 102000.0) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $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, -6e+56], (-t$95$1), If[LessEqual[t, -5e-139], t$95$3, If[LessEqual[t, 8.6e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 102000.0], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
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 -6 \cdot 10^{+56}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \left(\frac{2}{{x}^{3}} + \frac{2}{x}\right)}}\\
\mathbf{elif}\;t \leq 102000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.00000000000000012e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -6.00000000000000012e56 < t < -5.00000000000000034e-139 or 8.59999999999999933e-161 < t < 102000Initial program 57.7%
associate-*l/57.8%
Simplified57.8%
Taylor expanded in x around inf 87.8%
associate--l+87.8%
unpow287.8%
distribute-lft-out87.8%
unpow287.8%
unpow287.8%
associate-*r/87.8%
mul-1-neg87.8%
unpow287.8%
+-commutative87.8%
unpow287.8%
fma-udef87.8%
Simplified87.8%
Taylor expanded in t around 0 87.3%
associate-*r/87.3%
mul-1-neg87.3%
unpow287.3%
Simplified87.3%
if -5.00000000000000034e-139 < t < 8.59999999999999933e-161Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 47.1%
+-commutative47.1%
+-commutative47.1%
associate-+l+47.1%
associate-*r/47.1%
metadata-eval47.1%
unpow247.1%
associate-*r/47.1%
metadata-eval47.1%
associate-*r/47.1%
metadata-eval47.1%
Simplified47.1%
if 102000 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
(sqrt 2.0)
(/ t (sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -6.8e+56)
(- t_1)
(if (<= t -5e-139)
t_3
(if (<= t 1.55e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))
(if (<= t 82000.0) t_3 t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -6.8e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 1.55e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))));
} else if (t <= 82000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
t_3 = sqrt(2.0d0) * (t / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
if (t <= (-6.8d+56)) then
tmp = -t_1
else if (t <= (-5d-139)) then
tmp = t_3
else if (t <= 1.55d-162) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / (x * x)) + (2.0d0 / x)))))
else if (t <= 82000.0d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (l * l) / x;
double t_3 = Math.sqrt(2.0) * (t / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x)))))));
double tmp;
if (t <= -6.8e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 1.55e-162) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / (x * x)) + (2.0 / x)))));
} else if (t <= 82000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) t_2 = (l * l) / x t_3 = math.sqrt(2.0) * (t / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))) tmp = 0 if t <= -6.8e+56: tmp = -t_1 elif t <= -5e-139: tmp = t_3 elif t <= 1.55e-162: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / (x * x)) + (2.0 / x))))) elif t <= 82000.0: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(Float64(l * l) / x) t_3 = Float64(sqrt(2.0) * Float64(t / sqrt(Float64(t_2 + Float64(t_2 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))) tmp = 0.0 if (t <= -6.8e+56) tmp = Float64(-t_1); elseif (t <= -5e-139) tmp = t_3; elseif (t <= 1.55e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)))))); elseif (t <= 82000.0) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); t_2 = (l * l) / x; t_3 = sqrt(2.0) * (t / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / x))))))); tmp = 0.0; if (t <= -6.8e+56) tmp = -t_1; elseif (t <= -5e-139) tmp = t_3; elseif (t <= 1.55e-162) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x))))); elseif (t <= 82000.0) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / 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, -6.8e+56], (-t$95$1), If[LessEqual[t, -5e-139], t$95$3, If[LessEqual[t, 1.55e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 82000.0], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
t_3 := \sqrt{2} \cdot \frac{t}{\sqrt{t_2 + \left(t_2 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+56}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\mathbf{elif}\;t \leq 82000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.80000000000000002e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -6.80000000000000002e56 < t < -5.00000000000000034e-139 or 1.5499999999999999e-162 < t < 82000Initial program 57.7%
associate-*r/57.5%
fma-neg57.6%
remove-double-neg57.6%
fma-neg57.5%
sub-neg57.5%
metadata-eval57.5%
remove-double-neg57.5%
+-commutative57.5%
fma-def57.5%
Simplified57.5%
Taylor expanded in x around inf 87.5%
associate--l+87.8%
unpow287.8%
distribute-lft-out87.8%
unpow287.8%
unpow287.8%
associate-*r/87.8%
mul-1-neg87.8%
unpow287.8%
+-commutative87.8%
unpow287.8%
fma-udef87.8%
Simplified87.5%
Taylor expanded in t around 0 87.0%
associate-*r/87.3%
mul-1-neg87.3%
unpow287.3%
Simplified87.0%
if -5.00000000000000034e-139 < t < 1.5499999999999999e-162Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 46.6%
associate-*r/46.6%
metadata-eval46.6%
unpow246.6%
associate-*r/46.6%
metadata-eval46.6%
Simplified46.6%
if 82000 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))
(t_2 (/ (* l l) x))
(t_3
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) x))))))))))
(if (<= t -5.8e+56)
(- t_1)
(if (<= t -5e-139)
t_3
(if (<= t 2.05e-162)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))
(if (<= t 118000.0) t_3 t_1))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double t_2 = (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.8e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 2.05e-162) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))));
} else if (t <= 118000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
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.8d+56)) then
tmp = -t_1
else if (t <= (-5d-139)) then
tmp = t_3
else if (t <= 2.05d-162) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / (x * x)) + (2.0d0 / x)))))
else if (t <= 118000.0d0) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
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.8e+56) {
tmp = -t_1;
} else if (t <= -5e-139) {
tmp = t_3;
} else if (t <= 2.05e-162) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / (x * x)) + (2.0 / x)))));
} else if (t <= 118000.0) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) 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.8e+56: tmp = -t_1 elif t <= -5e-139: tmp = t_3 elif t <= 2.05e-162: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / (x * x)) + (2.0 / x))))) elif t <= 118000.0: tmp = t_3 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) t_2 = Float64(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.8e+56) tmp = Float64(-t_1); elseif (t <= -5e-139) tmp = t_3; elseif (t <= 2.05e-162) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / x)))))); elseif (t <= 118000.0) tmp = t_3; else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); 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.8e+56) tmp = -t_1; elseif (t <= -5e-139) tmp = t_3; elseif (t <= 2.05e-162) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x))))); elseif (t <= 118000.0) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $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.8e+56], (-t$95$1), If[LessEqual[t, -5e-139], t$95$3, If[LessEqual[t, 2.05e-162], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 118000.0], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
t_2 := \frac{\ell \cdot \ell}{x}\\
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.8 \cdot 10^{+56}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-139}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-162}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\mathbf{elif}\;t \leq 118000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.80000000000000014e56Initial program 23.2%
associate-*r/23.2%
fma-neg23.2%
remove-double-neg23.2%
fma-neg23.2%
sub-neg23.2%
metadata-eval23.2%
remove-double-neg23.2%
+-commutative23.2%
fma-def23.2%
Simplified23.2%
Applied egg-rr80.0%
Taylor expanded in t around -inf 89.9%
mul-1-neg89.9%
sub-neg89.9%
metadata-eval89.9%
Simplified89.9%
if -5.80000000000000014e56 < t < -5.00000000000000034e-139 or 2.0500000000000001e-162 < t < 118000Initial program 57.7%
associate-*l/57.8%
Simplified57.8%
Taylor expanded in x around inf 87.8%
associate--l+87.8%
unpow287.8%
distribute-lft-out87.8%
unpow287.8%
unpow287.8%
associate-*r/87.8%
mul-1-neg87.8%
unpow287.8%
+-commutative87.8%
unpow287.8%
fma-udef87.8%
Simplified87.8%
Taylor expanded in t around 0 87.3%
associate-*r/87.3%
mul-1-neg87.3%
unpow287.3%
Simplified87.3%
if -5.00000000000000034e-139 < t < 2.0500000000000001e-162Initial program 7.0%
associate-*l/7.0%
Simplified7.0%
Taylor expanded in l around inf 5.6%
*-commutative5.6%
associate--l+5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
sub-neg5.6%
metadata-eval5.6%
+-commutative5.6%
Simplified5.6%
Taylor expanded in x around inf 46.6%
associate-*r/46.6%
metadata-eval46.6%
unpow246.6%
associate-*r/46.6%
metadata-eval46.6%
Simplified46.6%
if 118000 < t Initial program 42.2%
associate-*r/42.2%
fma-neg42.2%
remove-double-neg42.2%
fma-neg42.2%
sub-neg42.2%
metadata-eval42.2%
remove-double-neg42.2%
+-commutative42.2%
fma-def42.2%
Simplified42.2%
Applied egg-rr82.5%
Taylor expanded in t around inf 90.7%
Final simplification81.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -3.2e-137)
(- t_1)
(if (<= t 3.5e-93)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -3.2e-137) {
tmp = -t_1;
} else if (t <= 3.5e-93) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (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(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-3.2d-137)) then
tmp = -t_1
else if (t <= 3.5d-93) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / (x * x)) + (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(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -3.2e-137) {
tmp = -t_1;
} else if (t <= 3.5e-93) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / (x * x)) + (2.0 / x)))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -3.2e-137: tmp = -t_1 elif t <= 3.5e-93: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / (x * x)) + (2.0 / x))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -3.2e-137) tmp = Float64(-t_1); elseif (t <= 3.5e-93) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + 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(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -3.2e-137) tmp = -t_1; elseif (t <= 3.5e-93) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (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[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.2e-137], (-t$95$1), If[LessEqual[t, 3.5e-93], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-137}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.20000000000000021e-137Initial program 40.4%
associate-*r/40.4%
fma-neg40.4%
remove-double-neg40.4%
fma-neg40.4%
sub-neg40.4%
metadata-eval40.4%
remove-double-neg40.4%
+-commutative40.4%
fma-def40.4%
Simplified40.4%
Applied egg-rr68.4%
Taylor expanded in t around -inf 81.8%
mul-1-neg81.8%
sub-neg81.8%
metadata-eval81.8%
Simplified81.8%
if -3.20000000000000021e-137 < t < 3.5e-93Initial program 10.3%
associate-*l/10.3%
Simplified10.3%
Taylor expanded in l around inf 4.8%
*-commutative4.8%
associate--l+4.8%
sub-neg4.8%
metadata-eval4.8%
+-commutative4.8%
sub-neg4.8%
metadata-eval4.8%
+-commutative4.8%
Simplified4.8%
Taylor expanded in x around inf 43.3%
associate-*r/43.3%
metadata-eval43.3%
unpow243.3%
associate-*r/43.3%
metadata-eval43.3%
Simplified43.3%
if 3.5e-93 < t Initial program 48.9%
associate-*r/48.8%
fma-neg48.8%
remove-double-neg48.8%
fma-neg48.8%
sub-neg48.8%
metadata-eval48.8%
remove-double-neg48.8%
+-commutative48.8%
fma-def48.8%
Simplified48.8%
Applied egg-rr78.8%
Taylor expanded in t around inf 88.3%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -6.2e-139) (+ -1.0 (/ 1.0 x)) (if (<= t 2.6e-93) (* t (/ (sqrt x) l)) (sqrt (/ (+ x -1.0) (+ x 1.0))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.2e-139) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 2.6e-93) {
tmp = t * (sqrt(x) / l);
} else {
tmp = sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.2d-139)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 2.6d-93) then
tmp = t * (sqrt(x) / l)
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -6.2e-139) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 2.6e-93) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.2e-139: tmp = -1.0 + (1.0 / x) elif t <= 2.6e-93: tmp = t * (math.sqrt(x) / l) else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.2e-139) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 2.6e-93) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.2e-139) tmp = -1.0 + (1.0 / x); elseif (t <= 2.6e-93) tmp = t * (sqrt(x) / l); else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -6.2e-139], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-93], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-139}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -6.1999999999999998e-139Initial program 40.4%
associate-*r/40.4%
fma-neg40.4%
remove-double-neg40.4%
fma-neg40.4%
sub-neg40.4%
metadata-eval40.4%
remove-double-neg40.4%
+-commutative40.4%
fma-def40.4%
Simplified40.4%
Applied egg-rr68.4%
Taylor expanded in t around inf 1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt81.2%
Simplified81.2%
if -6.1999999999999998e-139 < t < 2.5999999999999998e-93Initial program 10.3%
associate-*l/10.3%
Simplified10.3%
Taylor expanded in x around inf 56.0%
associate--l+56.0%
unpow256.0%
distribute-lft-out56.0%
unpow256.0%
unpow256.0%
associate-*r/56.0%
mul-1-neg56.0%
unpow256.0%
+-commutative56.0%
unpow256.0%
fma-udef56.0%
Simplified56.0%
Taylor expanded in l around inf 43.1%
associate-*l*43.1%
Simplified43.1%
Taylor expanded in l around 0 43.1%
associate-*l/43.1%
*-lft-identity43.1%
Simplified43.1%
if 2.5999999999999998e-93 < t Initial program 48.9%
associate-*r/48.8%
fma-neg48.8%
remove-double-neg48.8%
fma-neg48.8%
sub-neg48.8%
metadata-eval48.8%
remove-double-neg48.8%
+-commutative48.8%
fma-def48.8%
Simplified48.8%
Applied egg-rr78.8%
Taylor expanded in t around inf 88.3%
Final simplification75.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0))))) (if (<= t -1.6e-138) (- t_1) (if (<= t 2.6e-93) (* t (/ (sqrt x) l)) t_1))))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.6e-138) {
tmp = -t_1;
} else if (t <= 2.6e-93) {
tmp = t * (sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-1.6d-138)) then
tmp = -t_1
else if (t <= 2.6d-93) then
tmp = t * (sqrt(x) / l)
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -1.6e-138) {
tmp = -t_1;
} else if (t <= 2.6e-93) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -1.6e-138: tmp = -t_1 elif t <= 2.6e-93: tmp = t * (math.sqrt(x) / l) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -1.6e-138) tmp = Float64(-t_1); elseif (t <= 2.6e-93) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -1.6e-138) tmp = -t_1; elseif (t <= 2.6e-93) tmp = t * (sqrt(x) / l); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.6e-138], (-t$95$1), If[LessEqual[t, 2.6e-93], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-138}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.60000000000000005e-138Initial program 40.4%
associate-*r/40.4%
fma-neg40.4%
remove-double-neg40.4%
fma-neg40.4%
sub-neg40.4%
metadata-eval40.4%
remove-double-neg40.4%
+-commutative40.4%
fma-def40.4%
Simplified40.4%
Applied egg-rr68.4%
Taylor expanded in t around -inf 81.8%
mul-1-neg81.8%
sub-neg81.8%
metadata-eval81.8%
Simplified81.8%
if -1.60000000000000005e-138 < t < 2.5999999999999998e-93Initial program 10.3%
associate-*l/10.3%
Simplified10.3%
Taylor expanded in x around inf 56.0%
associate--l+56.0%
unpow256.0%
distribute-lft-out56.0%
unpow256.0%
unpow256.0%
associate-*r/56.0%
mul-1-neg56.0%
unpow256.0%
+-commutative56.0%
unpow256.0%
fma-udef56.0%
Simplified56.0%
Taylor expanded in l around inf 43.1%
associate-*l*43.1%
Simplified43.1%
Taylor expanded in l around 0 43.1%
associate-*l/43.1%
*-lft-identity43.1%
Simplified43.1%
if 2.5999999999999998e-93 < t Initial program 48.9%
associate-*r/48.8%
fma-neg48.8%
remove-double-neg48.8%
fma-neg48.8%
sub-neg48.8%
metadata-eval48.8%
remove-double-neg48.8%
+-commutative48.8%
fma-def48.8%
Simplified48.8%
Applied egg-rr78.8%
Taylor expanded in t around inf 88.3%
Final simplification75.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -6.5e-139)
(+ -1.0 (/ 1.0 x))
(if (<= t 3e-227)
(* (sqrt x) (/ t l))
(+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.5e-139) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3e-227) {
tmp = sqrt(x) * (t / l);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.5d-139)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 3d-227) then
tmp = sqrt(x) * (t / l)
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -6.5e-139) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3e-227) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.5e-139: tmp = -1.0 + (1.0 / x) elif t <= 3e-227: tmp = math.sqrt(x) * (t / l) else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.5e-139) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 3e-227) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.5e-139) tmp = -1.0 + (1.0 / x); elseif (t <= 3e-227) tmp = sqrt(x) * (t / l); else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -6.5e-139], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-227], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-139}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-227}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -6.5e-139Initial program 40.4%
associate-*r/40.4%
fma-neg40.4%
remove-double-neg40.4%
fma-neg40.4%
sub-neg40.4%
metadata-eval40.4%
remove-double-neg40.4%
+-commutative40.4%
fma-def40.4%
Simplified40.4%
Applied egg-rr68.4%
Taylor expanded in t around inf 1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt81.2%
Simplified81.2%
if -6.5e-139 < t < 3e-227Initial program 8.3%
associate-*l/8.3%
Simplified8.3%
Taylor expanded in x around inf 53.2%
associate--l+53.2%
unpow253.2%
distribute-lft-out53.2%
unpow253.2%
unpow253.2%
associate-*r/53.2%
mul-1-neg53.2%
unpow253.2%
+-commutative53.2%
unpow253.2%
fma-udef53.2%
Simplified53.2%
Taylor expanded in l around inf 51.2%
associate-*l*51.2%
Simplified51.2%
Taylor expanded in l around 0 40.2%
if 3e-227 < t Initial program 43.0%
associate-*r/42.9%
fma-neg42.9%
remove-double-neg42.9%
fma-neg42.9%
sub-neg42.9%
metadata-eval42.9%
remove-double-neg42.9%
+-commutative42.9%
fma-def42.9%
Simplified42.9%
Applied egg-rr71.1%
Taylor expanded in t around inf 81.6%
Taylor expanded in x around inf 81.3%
associate--l+81.3%
associate-*r/81.3%
metadata-eval81.3%
unpow281.3%
Simplified81.3%
Final simplification75.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.2e-127)
(+ -1.0 (/ 1.0 x))
(if (<= t 2.7e-93)
(* t (/ (sqrt x) l))
(+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.2e-127) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 2.7e-93) {
tmp = t * (sqrt(x) / l);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.2d-127)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 2.7d-93) then
tmp = t * (sqrt(x) / l)
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4.2e-127) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 2.7e-93) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.2e-127: tmp = -1.0 + (1.0 / x) elif t <= 2.7e-93: tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.2e-127) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 2.7e-93) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.2e-127) tmp = -1.0 + (1.0 / x); elseif (t <= 2.7e-93) tmp = t * (sqrt(x) / l); else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -4.2e-127], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-93], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-127}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -4.2000000000000002e-127Initial program 40.4%
associate-*r/40.4%
fma-neg40.4%
remove-double-neg40.4%
fma-neg40.4%
sub-neg40.4%
metadata-eval40.4%
remove-double-neg40.4%
+-commutative40.4%
fma-def40.4%
Simplified40.4%
Applied egg-rr68.4%
Taylor expanded in t around inf 1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt81.2%
Simplified81.2%
if -4.2000000000000002e-127 < t < 2.7000000000000001e-93Initial program 10.3%
associate-*l/10.3%
Simplified10.3%
Taylor expanded in x around inf 56.0%
associate--l+56.0%
unpow256.0%
distribute-lft-out56.0%
unpow256.0%
unpow256.0%
associate-*r/56.0%
mul-1-neg56.0%
unpow256.0%
+-commutative56.0%
unpow256.0%
fma-udef56.0%
Simplified56.0%
Taylor expanded in l around inf 43.1%
associate-*l*43.1%
Simplified43.1%
Taylor expanded in l around 0 43.1%
associate-*l/43.1%
*-lft-identity43.1%
Simplified43.1%
if 2.7000000000000001e-93 < t Initial program 48.9%
associate-*r/48.8%
fma-neg48.8%
remove-double-neg48.8%
fma-neg48.8%
sub-neg48.8%
metadata-eval48.8%
remove-double-neg48.8%
+-commutative48.8%
fma-def48.8%
Simplified48.8%
Applied egg-rr78.8%
Taylor expanded in t around inf 88.3%
Taylor expanded in x around inf 88.0%
associate--l+88.0%
associate-*r/88.0%
metadata-eval88.0%
unpow288.0%
Simplified88.0%
Final simplification75.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.2e-196) (+ -1.0 (/ 1.0 x)) (if (<= t 8e-234) (/ t l) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-196) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8e-234) {
tmp = t / l;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.2d-196)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 8d-234) then
tmp = t / l
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-196) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 8e-234) {
tmp = t / l;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.2e-196: tmp = -1.0 + (1.0 / x) elif t <= 8e-234: tmp = t / l else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.2e-196) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 8e-234) tmp = Float64(t / l); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.2e-196) tmp = -1.0 + (1.0 / x); elseif (t <= 8e-234) tmp = t / l; else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.2e-196], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-234], N[(t / l), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-234}:\\
\;\;\;\;\frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.2000000000000001e-196Initial program 36.7%
associate-*r/36.7%
fma-neg36.7%
remove-double-neg36.7%
fma-neg36.7%
sub-neg36.7%
metadata-eval36.7%
remove-double-neg36.7%
+-commutative36.7%
fma-def36.7%
Simplified36.7%
Applied egg-rr63.3%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt75.8%
Simplified75.8%
if -1.2000000000000001e-196 < t < 7.9999999999999997e-234Initial program 8.6%
associate-*r/8.6%
fma-neg8.7%
remove-double-neg8.7%
fma-neg8.6%
sub-neg8.6%
metadata-eval8.6%
remove-double-neg8.6%
+-commutative8.6%
fma-def8.6%
Simplified8.6%
Applied egg-rr35.9%
Taylor expanded in t around 0 35.3%
+-commutative35.3%
unpow235.3%
associate-/l*35.3%
sub-neg35.3%
metadata-eval35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in x around inf 35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in t around 0 34.6%
if 7.9999999999999997e-234 < t Initial program 43.0%
associate-*r/42.9%
fma-neg42.9%
remove-double-neg42.9%
fma-neg42.9%
sub-neg42.9%
metadata-eval42.9%
remove-double-neg42.9%
+-commutative42.9%
fma-def42.9%
Simplified42.9%
Applied egg-rr71.1%
Taylor expanded in t around inf 81.6%
Taylor expanded in x around inf 81.3%
associate--l+81.3%
associate-*r/81.3%
metadata-eval81.3%
unpow281.3%
Simplified81.3%
Final simplification74.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -7.5e-195) (+ -1.0 (/ 1.0 x)) (if (<= t 1.22e-229) (/ t l) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -7.5e-195) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.22e-229) {
tmp = t / l;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-7.5d-195)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 1.22d-229) then
tmp = t / l
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -7.5e-195) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 1.22e-229) {
tmp = t / l;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -7.5e-195: tmp = -1.0 + (1.0 / x) elif t <= 1.22e-229: tmp = t / l else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -7.5e-195) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 1.22e-229) tmp = Float64(t / l); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -7.5e-195) tmp = -1.0 + (1.0 / x); elseif (t <= 1.22e-229) tmp = t / l; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -7.5e-195], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-229], N[(t / l), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-195}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -7.5e-195Initial program 36.7%
associate-*r/36.7%
fma-neg36.7%
remove-double-neg36.7%
fma-neg36.7%
sub-neg36.7%
metadata-eval36.7%
remove-double-neg36.7%
+-commutative36.7%
fma-def36.7%
Simplified36.7%
Applied egg-rr63.3%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt75.8%
Simplified75.8%
if -7.5e-195 < t < 1.21999999999999991e-229Initial program 8.6%
associate-*r/8.6%
fma-neg8.7%
remove-double-neg8.7%
fma-neg8.6%
sub-neg8.6%
metadata-eval8.6%
remove-double-neg8.6%
+-commutative8.6%
fma-def8.6%
Simplified8.6%
Applied egg-rr35.9%
Taylor expanded in t around 0 35.3%
+-commutative35.3%
unpow235.3%
associate-/l*35.3%
sub-neg35.3%
metadata-eval35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in x around inf 35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in t around 0 34.6%
if 1.21999999999999991e-229 < t Initial program 43.0%
associate-*r/42.9%
fma-neg42.9%
remove-double-neg42.9%
fma-neg42.9%
sub-neg42.9%
metadata-eval42.9%
remove-double-neg42.9%
+-commutative42.9%
fma-def42.9%
Simplified42.9%
Applied egg-rr71.1%
Taylor expanded in t around inf 81.6%
Taylor expanded in x around inf 81.1%
Final simplification74.4%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.3e-196) -1.0 (if (<= t 1.22e-229) (/ t l) 1.0)))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.3e-196) {
tmp = -1.0;
} else if (t <= 1.22e-229) {
tmp = 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 <= (-1.3d-196)) then
tmp = -1.0d0
else if (t <= 1.22d-229) then
tmp = 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 <= -1.3e-196) {
tmp = -1.0;
} else if (t <= 1.22e-229) {
tmp = t / l;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.3e-196: tmp = -1.0 elif t <= 1.22e-229: tmp = t / l else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.3e-196) tmp = -1.0; elseif (t <= 1.22e-229) tmp = 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 <= -1.3e-196) tmp = -1.0; elseif (t <= 1.22e-229) tmp = 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, -1.3e-196], -1.0, If[LessEqual[t, 1.22e-229], N[(t / l), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-196}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-229}:\\
\;\;\;\;\frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.2999999999999999e-196Initial program 36.7%
associate-*r/36.7%
fma-neg36.7%
remove-double-neg36.7%
fma-neg36.7%
sub-neg36.7%
metadata-eval36.7%
remove-double-neg36.7%
+-commutative36.7%
fma-def36.7%
Simplified36.7%
Applied egg-rr63.3%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt75.0%
Simplified75.0%
if -1.2999999999999999e-196 < t < 1.21999999999999991e-229Initial program 8.6%
associate-*r/8.6%
fma-neg8.7%
remove-double-neg8.7%
fma-neg8.6%
sub-neg8.6%
metadata-eval8.6%
remove-double-neg8.6%
+-commutative8.6%
fma-def8.6%
Simplified8.6%
Applied egg-rr35.9%
Taylor expanded in t around 0 35.3%
+-commutative35.3%
unpow235.3%
associate-/l*35.3%
sub-neg35.3%
metadata-eval35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in x around inf 35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in t around 0 34.6%
if 1.21999999999999991e-229 < t Initial program 43.0%
associate-*r/42.9%
fma-neg42.9%
remove-double-neg42.9%
fma-neg42.9%
sub-neg42.9%
metadata-eval42.9%
remove-double-neg42.9%
+-commutative42.9%
fma-def42.9%
Simplified42.9%
Applied egg-rr71.1%
Taylor expanded in t around inf 81.6%
Taylor expanded in x around inf 80.7%
Final simplification73.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.2e-196) (+ -1.0 (/ 1.0 x)) (if (<= t 3.85e-233) (/ t l) 1.0)))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.2e-196) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3.85e-233) {
tmp = 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 <= (-1.2d-196)) then
tmp = (-1.0d0) + (1.0d0 / x)
else if (t <= 3.85d-233) then
tmp = 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 <= -1.2e-196) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3.85e-233) {
tmp = t / l;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.2e-196: tmp = -1.0 + (1.0 / x) elif t <= 3.85e-233: tmp = t / l else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.2e-196) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 3.85e-233) tmp = 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 <= -1.2e-196) tmp = -1.0 + (1.0 / x); elseif (t <= 3.85e-233) tmp = 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, -1.2e-196], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.85e-233], N[(t / l), $MachinePrecision], 1.0]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-196}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 3.85 \cdot 10^{-233}:\\
\;\;\;\;\frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.2000000000000001e-196Initial program 36.7%
associate-*r/36.7%
fma-neg36.7%
remove-double-neg36.7%
fma-neg36.7%
sub-neg36.7%
metadata-eval36.7%
remove-double-neg36.7%
+-commutative36.7%
fma-def36.7%
Simplified36.7%
Applied egg-rr63.3%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt75.8%
Simplified75.8%
if -1.2000000000000001e-196 < t < 3.85000000000000003e-233Initial program 8.6%
associate-*r/8.6%
fma-neg8.7%
remove-double-neg8.7%
fma-neg8.6%
sub-neg8.6%
metadata-eval8.6%
remove-double-neg8.6%
+-commutative8.6%
fma-def8.6%
Simplified8.6%
Applied egg-rr35.9%
Taylor expanded in t around 0 35.3%
+-commutative35.3%
unpow235.3%
associate-/l*35.3%
sub-neg35.3%
metadata-eval35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in x around inf 35.3%
unpow235.3%
Simplified35.3%
Taylor expanded in t around 0 34.6%
if 3.85000000000000003e-233 < t Initial program 43.0%
associate-*r/42.9%
fma-neg42.9%
remove-double-neg42.9%
fma-neg42.9%
sub-neg42.9%
metadata-eval42.9%
remove-double-neg42.9%
+-commutative42.9%
fma-def42.9%
Simplified42.9%
Applied egg-rr71.1%
Taylor expanded in t around inf 81.6%
Taylor expanded in x around inf 80.7%
Final simplification74.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.05e-284) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.05e-284) {
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 <= (-1.05d-284)) 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 <= -1.05e-284) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.05e-284: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.05e-284) 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 <= -1.05e-284) 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, -1.05e-284], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-284}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.04999999999999996e-284Initial program 33.5%
associate-*r/33.5%
fma-neg33.5%
remove-double-neg33.5%
fma-neg33.5%
sub-neg33.5%
metadata-eval33.5%
remove-double-neg33.5%
+-commutative33.5%
fma-def33.5%
Simplified33.5%
Applied egg-rr60.7%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt69.4%
Simplified69.4%
if -1.04999999999999996e-284 < t Initial program 39.7%
associate-*r/39.6%
fma-neg39.7%
remove-double-neg39.7%
fma-neg39.6%
sub-neg39.6%
metadata-eval39.6%
remove-double-neg39.6%
+-commutative39.6%
fma-def39.6%
Simplified39.6%
Applied egg-rr67.3%
Taylor expanded in t around inf 75.1%
Taylor expanded in x around inf 74.4%
Final simplification72.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return -1.0;
}
l = abs(l) def code(x, l, t): return -1.0
l = abs(l) function code(x, l, t) return -1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = -1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Initial program 37.1%
associate-*r/37.0%
fma-neg37.0%
remove-double-neg37.0%
fma-neg37.0%
sub-neg37.0%
metadata-eval37.0%
remove-double-neg37.0%
+-commutative37.0%
fma-def37.0%
Simplified37.0%
Applied egg-rr64.5%
Taylor expanded in t around inf 43.9%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt30.5%
Simplified30.5%
Final simplification30.5%
herbie shell --seed 2023250
(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)))))