
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x 1.0) (+ x -1.0)))
(t_2 (* (sqrt 2.0) t))
(t_3 (/ t_2 (sqrt (- (* (+ (* l l) (* 2.0 (* t t))) t_1) (* l l)))))
(t_4 (fma (* 2.0 t) t (* l l))))
(if (<= t_3 -1e-176)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(+ (* 2.0 (+ (* t t) (/ (* t t) x))) (/ (+ t_4 t_4) (* x x)))
(/ t_4 x))))))
(if (<= t_3 2.0)
(/ t_2 (hypot (* (hypot l t_2) (sqrt t_1)) l))
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (x + 1.0) / (x + -1.0);
double t_2 = sqrt(2.0) * t;
double t_3 = t_2 / sqrt(((((l * l) + (2.0 * (t * t))) * t_1) - (l * l)));
double t_4 = fma((2.0 * t), t, (l * l));
double tmp;
if (t_3 <= -1e-176) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + (((2.0 * ((t * t) + ((t * t) / x))) + ((t_4 + t_4) / (x * x))) + (t_4 / x)))));
} else if (t_3 <= 2.0) {
tmp = t_2 / hypot((hypot(l, t_2) * sqrt(t_1)), l);
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_2 = Float64(sqrt(2.0) * t) t_3 = Float64(t_2 / sqrt(Float64(Float64(Float64(Float64(l * l) + Float64(2.0 * Float64(t * t))) * t_1) - Float64(l * l)))) t_4 = fma(Float64(2.0 * t), t, Float64(l * l)) tmp = 0.0 if (t_3 <= -1e-176) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(Float64(t_4 + t_4) / Float64(x * x))) + Float64(t_4 / x)))))); elseif (t_3 <= 2.0) tmp = Float64(t_2 / hypot(Float64(hypot(l, t_2) * sqrt(t_1)), l)); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + 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[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-176], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 + t$95$4), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(t$95$2 / N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], 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]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{x + 1}{x + -1}\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \frac{t_2}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot t_1 - \ell \cdot \ell}}\\
t_4 := \mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-176}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(\left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{t_4 + t_4}{x \cdot x}\right) + \frac{t_4}{x}\right)}}\\
\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\frac{t_2}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_2\right) \cdot \sqrt{t_1}, \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\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)))) < -1e-176Initial program 51.3%
associate-*l/51.4%
Simplified51.4%
Taylor expanded in x around -inf 82.9%
associate--l+82.9%
unpow282.9%
sub-neg82.9%
Simplified82.9%
if -1e-176 < (/.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)))) < 2Initial program 40.6%
associate-*r/40.5%
fma-neg40.6%
sub-neg40.6%
metadata-eval40.6%
+-commutative40.6%
fma-def40.6%
distribute-rgt-neg-in40.6%
Simplified40.6%
Applied egg-rr99.1%
if 2 < (/.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.9%
associate-*l/0.9%
Simplified0.9%
Taylor expanded in x around -inf 36.8%
associate--l+36.8%
unpow236.8%
sub-neg36.8%
Simplified36.8%
Taylor expanded in l around inf 40.4%
*-commutative40.4%
associate-*r/40.4%
metadata-eval40.4%
unpow240.4%
associate-*r/40.4%
metadata-eval40.4%
Simplified40.4%
Final simplification77.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x 1.0) (+ x -1.0)))
(t_2 (* (sqrt 2.0) t))
(t_3 (/ t_2 (sqrt (- (* (+ (* l l) (* 2.0 (* t t))) t_1) (* l l))))))
(if (<= t_3 -1e-176)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma (* 2.0 t) t (* l l)) x))))))
(if (<= t_3 2.0)
(* (sqrt 2.0) (/ t (hypot (* (hypot l t_2) (sqrt t_1)) l)))
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (x + 1.0) / (x + -1.0);
double t_2 = sqrt(2.0) * t;
double t_3 = t_2 / sqrt(((((l * l) + (2.0 * (t * t))) * t_1) - (l * l)));
double tmp;
if (t_3 <= -1e-176) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
} else if (t_3 <= 2.0) {
tmp = sqrt(2.0) * (t / hypot((hypot(l, t_2) * sqrt(t_1)), l));
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_2 = Float64(sqrt(2.0) * t) t_3 = Float64(t_2 / sqrt(Float64(Float64(Float64(Float64(l * l) + Float64(2.0 * Float64(t * t))) * t_1) - Float64(l * l)))) tmp = 0.0 if (t_3 <= -1e-176) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x)))))); elseif (t_3 <= 2.0) tmp = Float64(sqrt(2.0) * Float64(t / hypot(Float64(hypot(l, t_2) * sqrt(t_1)), l))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + 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[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-176], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t / N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $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[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{x + 1}{x + -1}\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \frac{t_2}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot t_1 - \ell \cdot \ell}}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-176}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\sqrt{2} \cdot \frac{t}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_2\right) \cdot \sqrt{t_1}, \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\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)))) < -1e-176Initial program 51.3%
associate-*l/51.4%
Simplified51.4%
Taylor expanded in x around inf 82.5%
associate--l+82.5%
unpow282.5%
distribute-lft-out82.5%
unpow282.5%
unpow282.5%
associate-*r/82.5%
mul-1-neg82.5%
+-commutative82.5%
unpow282.5%
associate-*l*82.5%
unpow282.5%
fma-udef82.5%
Simplified82.5%
if -1e-176 < (/.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)))) < 2Initial program 40.6%
associate-/l*40.6%
fma-neg40.6%
remove-double-neg40.6%
fma-neg40.6%
sub-neg40.6%
metadata-eval40.6%
remove-double-neg40.6%
fma-def40.6%
Simplified40.6%
Applied egg-rr99.0%
if 2 < (/.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.9%
associate-*l/0.9%
Simplified0.9%
Taylor expanded in x around -inf 36.8%
associate--l+36.8%
unpow236.8%
sub-neg36.8%
Simplified36.8%
Taylor expanded in l around inf 40.4%
*-commutative40.4%
associate-*r/40.4%
metadata-eval40.4%
unpow240.4%
associate-*r/40.4%
metadata-eval40.4%
Simplified40.4%
Final simplification77.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (+ x 1.0) (+ x -1.0)))
(t_2 (* (sqrt 2.0) t))
(t_3 (/ t_2 (sqrt (- (* (+ (* l l) (* 2.0 (* t t))) t_1) (* l l))))))
(if (<= t_3 -1e-176)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma (* 2.0 t) t (* l l)) x))))))
(if (<= t_3 2.0)
(/ t_2 (hypot (* (hypot l t_2) (sqrt t_1)) l))
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 (* x x)) (/ 2.0 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (x + 1.0) / (x + -1.0);
double t_2 = sqrt(2.0) * t;
double t_3 = t_2 / sqrt(((((l * l) + (2.0 * (t * t))) * t_1) - (l * l)));
double tmp;
if (t_3 <= -1e-176) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
} else if (t_3 <= 2.0) {
tmp = t_2 / hypot((hypot(l, t_2) * sqrt(t_1)), l);
} else {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / (x * x)) + (2.0 / x)))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(x + 1.0) / Float64(x + -1.0)) t_2 = Float64(sqrt(2.0) * t) t_3 = Float64(t_2 / sqrt(Float64(Float64(Float64(Float64(l * l) + Float64(2.0 * Float64(t * t))) * t_1) - Float64(l * l)))) tmp = 0.0 if (t_3 <= -1e-176) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x)))))); elseif (t_3 <= 2.0) tmp = Float64(t_2 / hypot(Float64(hypot(l, t_2) * sqrt(t_1)), l)); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / Float64(x * x)) + 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[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-176], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(t$95$2 / N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$2 ^ 2], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], 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]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{x + 1}{x + -1}\\
t_2 := \sqrt{2} \cdot t\\
t_3 := \frac{t_2}{\sqrt{\left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) \cdot t_1 - \ell \cdot \ell}}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-176}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{elif}\;t_3 \leq 2:\\
\;\;\;\;\frac{t_2}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t_2\right) \cdot \sqrt{t_1}, \ell\right)}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\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)))) < -1e-176Initial program 51.3%
associate-*l/51.4%
Simplified51.4%
Taylor expanded in x around inf 82.5%
associate--l+82.5%
unpow282.5%
distribute-lft-out82.5%
unpow282.5%
unpow282.5%
associate-*r/82.5%
mul-1-neg82.5%
+-commutative82.5%
unpow282.5%
associate-*l*82.5%
unpow282.5%
fma-udef82.5%
Simplified82.5%
if -1e-176 < (/.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)))) < 2Initial program 40.6%
associate-*r/40.5%
fma-neg40.6%
sub-neg40.6%
metadata-eval40.6%
+-commutative40.6%
fma-def40.6%
distribute-rgt-neg-in40.6%
Simplified40.6%
Applied egg-rr99.1%
if 2 < (/.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.9%
associate-*l/0.9%
Simplified0.9%
Taylor expanded in x around -inf 36.8%
associate--l+36.8%
unpow236.8%
sub-neg36.8%
Simplified36.8%
Taylor expanded in l around inf 40.4%
*-commutative40.4%
associate-*r/40.4%
metadata-eval40.4%
unpow240.4%
associate-*r/40.4%
metadata-eval40.4%
Simplified40.4%
Final simplification77.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.8e+17)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 4e+38)
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(/ (* l l) x)
(+
(* 2.0 (+ (* t t) (/ (* t t) x)))
(/ (fma (* 2.0 t) t (* l l)) x))))))
(/ (sqrt 2.0) (* (sqrt 2.0) (sqrt (/ (+ x 1.0) (+ x -1.0))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.8e+17) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4e+38) {
tmp = t * (sqrt(2.0) / sqrt((((l * l) / x) + ((2.0 * ((t * t) + ((t * t) / x))) + (fma((2.0 * t), t, (l * l)) / x)))));
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * sqrt(((x + 1.0) / (x + -1.0))));
}
return tmp;
}
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.8e+17) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 4e+38) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) + Float64(fma(Float64(2.0 * t), t, Float64(l * l)) / x)))))); else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))); end return tmp end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -4.8e+17], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4e+38], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(2.0 * t), $MachinePrecision] * t + N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+17}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) + \frac{\mathsf{fma}\left(2 \cdot t, t, \ell \cdot \ell\right)}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -4.8e17Initial program 32.3%
associate-*r/32.2%
fma-neg32.2%
sub-neg32.2%
metadata-eval32.2%
+-commutative32.2%
fma-def32.2%
distribute-rgt-neg-in32.2%
Simplified32.2%
Applied egg-rr84.7%
Taylor expanded in t around -inf 90.2%
mul-1-neg90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
if -4.8e17 < t < 3.99999999999999991e38Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in x around inf 77.2%
associate--l+77.2%
unpow277.2%
distribute-lft-out77.2%
unpow277.2%
unpow277.2%
associate-*r/77.2%
mul-1-neg77.2%
+-commutative77.2%
unpow277.2%
associate-*l*77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
if 3.99999999999999991e38 < t Initial program 25.3%
associate-/l*25.2%
fma-neg25.2%
remove-double-neg25.2%
fma-neg25.2%
sub-neg25.2%
metadata-eval25.2%
remove-double-neg25.2%
fma-def25.2%
Simplified25.2%
Taylor expanded in l around 0 89.7%
+-commutative89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
Final simplification84.0%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* l l) x)))
(if (<= t -2.9e+19)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 6.2e+41)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_1 (+ t_1 (* 2.0 (+ (* t t) (/ (* t t) x))))))))
(/ (sqrt 2.0) (* (sqrt 2.0) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (l * l) / x;
double tmp;
if (t <= -2.9e+19) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.2e+41) {
tmp = t * (sqrt(2.0) / sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))));
} else {
tmp = sqrt(2.0) / (sqrt(2.0) * 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) :: t_1
real(8) :: tmp
t_1 = (l * l) / x
if (t <= (-2.9d+19)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 6.2d+41) then
tmp = t * (sqrt(2.0d0) / sqrt((t_1 + (t_1 + (2.0d0 * ((t * t) + ((t * t) / x)))))))
else
tmp = sqrt(2.0d0) / (sqrt(2.0d0) * 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 t_1 = (l * l) / x;
double tmp;
if (t <= -2.9e+19) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 6.2e+41) {
tmp = t * (Math.sqrt(2.0) / Math.sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x)))))));
} else {
tmp = Math.sqrt(2.0) / (Math.sqrt(2.0) * Math.sqrt(((x + 1.0) / (x + -1.0))));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (l * l) / x tmp = 0 if t <= -2.9e+19: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 6.2e+41: tmp = t * (math.sqrt(2.0) / math.sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))))) else: tmp = math.sqrt(2.0) / (math.sqrt(2.0) * math.sqrt(((x + 1.0) / (x + -1.0)))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -2.9e+19) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 6.2e+41) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(t_1 + Float64(t_1 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x)))))))); else tmp = Float64(sqrt(2.0) / Float64(sqrt(2.0) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (l * l) / x; tmp = 0.0; if (t <= -2.9e+19) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 6.2e+41) tmp = t * (sqrt(2.0) / sqrt((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))))); else tmp = sqrt(2.0) / (sqrt(2.0) * 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_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -2.9e+19], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 6.2e+41], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(t$95$1 + N[(t$95$1 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+19}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+41}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{t_1 + \left(t_1 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{2} \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.9e19Initial program 32.3%
associate-*r/32.2%
fma-neg32.2%
sub-neg32.2%
metadata-eval32.2%
+-commutative32.2%
fma-def32.2%
distribute-rgt-neg-in32.2%
Simplified32.2%
Applied egg-rr84.7%
Taylor expanded in t around -inf 90.2%
mul-1-neg90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
if -2.9e19 < t < 6.2e41Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in x around inf 77.2%
associate--l+77.2%
unpow277.2%
distribute-lft-out77.2%
unpow277.2%
unpow277.2%
associate-*r/77.2%
mul-1-neg77.2%
+-commutative77.2%
unpow277.2%
associate-*l*77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
Taylor expanded in t around 0 76.6%
associate-*r/76.6%
mul-1-neg76.6%
unpow276.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
if 6.2e41 < t Initial program 25.3%
associate-/l*25.2%
fma-neg25.2%
remove-double-neg25.2%
fma-neg25.2%
sub-neg25.2%
metadata-eval25.2%
remove-double-neg25.2%
fma-def25.2%
Simplified25.2%
Taylor expanded in l around 0 89.7%
+-commutative89.7%
sub-neg89.7%
metadata-eval89.7%
+-commutative89.7%
Simplified89.7%
Final simplification83.8%
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)))
(if (<= t -2.5e+17)
(- t_1)
(if (<= t 1.8e+40)
(*
t
(/
(sqrt 2.0)
(sqrt (+ t_2 (+ t_2 (* 2.0 (+ (* t t) (/ (* t t) 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 t_2 = (l * l) / x;
double tmp;
if (t <= -2.5e+17) {
tmp = -t_1;
} else if (t <= 1.8e+40) {
tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / 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) :: t_2
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
t_2 = (l * l) / x
if (t <= (-2.5d+17)) then
tmp = -t_1
else if (t <= 1.8d+40) then
tmp = t * (sqrt(2.0d0) / sqrt((t_2 + (t_2 + (2.0d0 * ((t * t) + ((t * t) / 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 t_2 = (l * l) / x;
double tmp;
if (t <= -2.5e+17) {
tmp = -t_1;
} else if (t <= 1.8e+40) {
tmp = t * (Math.sqrt(2.0) / Math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / 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))) t_2 = (l * l) / x tmp = 0 if t <= -2.5e+17: tmp = -t_1 elif t <= 1.8e+40: tmp = t * (math.sqrt(2.0) / math.sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / 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))) t_2 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -2.5e+17) tmp = Float64(-t_1); elseif (t <= 1.8e+40) tmp = 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)))))))); 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; tmp = 0.0; if (t <= -2.5e+17) tmp = -t_1; elseif (t <= 1.8e+40) tmp = t * (sqrt(2.0) / sqrt((t_2 + (t_2 + (2.0 * ((t * t) + ((t * t) / 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]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -2.5e+17], (-t$95$1), If[LessEqual[t, 1.8e+40], 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], 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}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+17}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+40}:\\
\;\;\;\;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{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.5e17Initial program 32.3%
associate-*r/32.2%
fma-neg32.2%
sub-neg32.2%
metadata-eval32.2%
+-commutative32.2%
fma-def32.2%
distribute-rgt-neg-in32.2%
Simplified32.2%
Applied egg-rr84.7%
Taylor expanded in t around -inf 90.2%
mul-1-neg90.2%
sub-neg90.2%
metadata-eval90.2%
Simplified90.2%
if -2.5e17 < t < 1.79999999999999998e40Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in x around inf 77.2%
associate--l+77.2%
unpow277.2%
distribute-lft-out77.2%
unpow277.2%
unpow277.2%
associate-*r/77.2%
mul-1-neg77.2%
+-commutative77.2%
unpow277.2%
associate-*l*77.2%
unpow277.2%
fma-udef77.2%
Simplified77.2%
Taylor expanded in t around 0 76.6%
associate-*r/76.6%
mul-1-neg76.6%
unpow276.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
if 1.79999999999999998e40 < t Initial program 25.3%
associate-*r/25.2%
fma-neg25.2%
sub-neg25.2%
metadata-eval25.2%
+-commutative25.2%
fma-def25.2%
distribute-rgt-neg-in25.2%
Simplified25.2%
Applied egg-rr82.4%
Taylor expanded in t around inf 89.7%
Final simplification83.7%
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 -2.7e-230)
(- t_1)
(if (<= t 6.2e-143)
(* t (* (sqrt (/ 1.0 (+ (/ 2.0 x) (/ (/ 2.0 x) x)))) (/ (sqrt 2.0) 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 <= -2.7e-230) {
tmp = -t_1;
} else if (t <= 6.2e-143) {
tmp = t * (sqrt((1.0 / ((2.0 / x) + ((2.0 / x) / x)))) * (sqrt(2.0) / l));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.7d-230)) then
tmp = -t_1
else if (t <= 6.2d-143) then
tmp = t * (sqrt((1.0d0 / ((2.0d0 / x) + ((2.0d0 / x) / x)))) * (sqrt(2.0d0) / l))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.7e-230) {
tmp = -t_1;
} else if (t <= 6.2e-143) {
tmp = t * (Math.sqrt((1.0 / ((2.0 / x) + ((2.0 / x) / x)))) * (Math.sqrt(2.0) / 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 <= -2.7e-230: tmp = -t_1 elif t <= 6.2e-143: tmp = t * (math.sqrt((1.0 / ((2.0 / x) + ((2.0 / x) / x)))) * (math.sqrt(2.0) / 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 <= -2.7e-230) tmp = Float64(-t_1); elseif (t <= 6.2e-143) tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(2.0 / x) + Float64(Float64(2.0 / x) / x)))) * Float64(sqrt(2.0) / 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 <= -2.7e-230) tmp = -t_1; elseif (t <= 6.2e-143) tmp = t * (sqrt((1.0 / ((2.0 / x) + ((2.0 / x) / x)))) * (sqrt(2.0) / l)); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e-230], (-t$95$1), If[LessEqual[t, 6.2e-143], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / l), $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 -2.7 \cdot 10^{-230}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-143}:\\
\;\;\;\;t \cdot \left(\sqrt{\frac{1}{\frac{2}{x} + \frac{\frac{2}{x}}{x}}} \cdot \frac{\sqrt{2}}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.70000000000000011e-230Initial program 32.0%
associate-*r/31.9%
fma-neg31.9%
sub-neg31.9%
metadata-eval31.9%
+-commutative31.9%
fma-def31.9%
distribute-rgt-neg-in31.9%
Simplified31.9%
Applied egg-rr68.8%
Taylor expanded in t around -inf 81.4%
mul-1-neg81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
if -2.70000000000000011e-230 < t < 6.20000000000000015e-143Initial program 3.5%
associate-*l/3.5%
Simplified3.5%
Taylor expanded in x around -inf 57.5%
associate--l+57.5%
unpow257.5%
sub-neg57.5%
Simplified57.5%
Taylor expanded in l around inf 49.9%
*-commutative49.9%
associate-*r/49.9%
metadata-eval49.9%
unpow249.9%
associate-*r/49.9%
metadata-eval49.9%
Simplified49.9%
Taylor expanded in l around 0 50.0%
*-commutative50.0%
+-commutative50.0%
associate-*r/50.0%
metadata-eval50.0%
associate-*r/50.0%
metadata-eval50.0%
unpow250.0%
associate-/r*50.0%
Simplified50.0%
if 6.20000000000000015e-143 < t Initial program 43.0%
associate-*r/43.0%
fma-neg43.0%
sub-neg43.0%
metadata-eval43.0%
+-commutative43.0%
fma-def43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Applied egg-rr79.0%
Taylor expanded in t around inf 87.2%
Final simplification78.9%
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.35e-230)
(- t_1)
(if (<= t 4e-132)
(* 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.35e-230) {
tmp = -t_1;
} else if (t <= 4e-132) {
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.35d-230)) then
tmp = -t_1
else if (t <= 4d-132) 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.35e-230) {
tmp = -t_1;
} else if (t <= 4e-132) {
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.35e-230: tmp = -t_1 elif t <= 4e-132: 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.35e-230) tmp = Float64(-t_1); elseif (t <= 4e-132) 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.35e-230) tmp = -t_1; elseif (t <= 4e-132) 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.35e-230], (-t$95$1), If[LessEqual[t, 4e-132], 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.35 \cdot 10^{-230}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-132}:\\
\;\;\;\;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.35000000000000015e-230Initial program 32.0%
associate-*r/31.9%
fma-neg31.9%
sub-neg31.9%
metadata-eval31.9%
+-commutative31.9%
fma-def31.9%
distribute-rgt-neg-in31.9%
Simplified31.9%
Applied egg-rr68.8%
Taylor expanded in t around -inf 81.4%
mul-1-neg81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
if -3.35000000000000015e-230 < t < 3.9999999999999999e-132Initial program 3.5%
associate-*l/3.5%
Simplified3.5%
Taylor expanded in x around -inf 57.5%
associate--l+57.5%
unpow257.5%
sub-neg57.5%
Simplified57.5%
Taylor expanded in l around inf 49.9%
*-commutative49.9%
associate-*r/49.9%
metadata-eval49.9%
unpow249.9%
associate-*r/49.9%
metadata-eval49.9%
Simplified49.9%
if 3.9999999999999999e-132 < t Initial program 43.0%
associate-*r/43.0%
fma-neg43.0%
sub-neg43.0%
metadata-eval43.0%
+-commutative43.0%
fma-def43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Applied egg-rr79.0%
Taylor expanded in t around inf 87.2%
Final simplification78.9%
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 -6.2e-206)
(- t_1)
(if (<= t 1.85e-142)
(/ (* (sqrt 2.0) t) (* 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 <= -6.2e-206) {
tmp = -t_1;
} else if (t <= 1.85e-142) {
tmp = (sqrt(2.0) * t) / (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 <= (-6.2d-206)) then
tmp = -t_1
else if (t <= 1.85d-142) then
tmp = (sqrt(2.0d0) * t) / (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 <= -6.2e-206) {
tmp = -t_1;
} else if (t <= 1.85e-142) {
tmp = (Math.sqrt(2.0) * t) / (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 <= -6.2e-206: tmp = -t_1 elif t <= 1.85e-142: tmp = (math.sqrt(2.0) * t) / (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 <= -6.2e-206) tmp = Float64(-t_1); elseif (t <= 1.85e-142) tmp = Float64(Float64(sqrt(2.0) * t) / 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 <= -6.2e-206) tmp = -t_1; elseif (t <= 1.85e-142) tmp = (sqrt(2.0) * t) / (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, -6.2e-206], (-t$95$1), If[LessEqual[t, 1.85e-142], N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / x), $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 -6.2 \cdot 10^{-206}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-142}:\\
\;\;\;\;\frac{\sqrt{2} \cdot t}{\ell \cdot \sqrt{\frac{2}{x \cdot x} + \frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.2000000000000005e-206Initial program 33.0%
associate-*r/33.0%
fma-neg33.0%
sub-neg33.0%
metadata-eval33.0%
+-commutative33.0%
fma-def33.0%
distribute-rgt-neg-in33.0%
Simplified33.0%
Applied egg-rr70.2%
Taylor expanded in t around -inf 82.4%
mul-1-neg82.4%
sub-neg82.4%
metadata-eval82.4%
Simplified82.4%
if -6.2000000000000005e-206 < t < 1.84999999999999993e-142Initial program 3.4%
associate-*l/3.4%
Simplified3.4%
Taylor expanded in x around -inf 56.9%
associate--l+56.9%
unpow256.9%
sub-neg56.9%
Simplified56.9%
Taylor expanded in l around inf 45.6%
*-commutative45.6%
associate-*r/45.6%
metadata-eval45.6%
unpow245.6%
associate-*r/45.6%
metadata-eval45.6%
Simplified45.6%
associate-*l/45.6%
Applied egg-rr45.6%
if 1.84999999999999993e-142 < t Initial program 43.0%
associate-*r/43.0%
fma-neg43.0%
sub-neg43.0%
metadata-eval43.0%
+-commutative43.0%
fma-def43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Applied egg-rr79.0%
Taylor expanded in t around inf 87.2%
Final simplification78.1%
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.35e-230)
(- t_1)
(if (<= t 2.05e-139)
(* t (/ (sqrt 2.0) (sqrt (* 2.0 (* l (/ l 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.35e-230) {
tmp = -t_1;
} else if (t <= 2.05e-139) {
tmp = t * (sqrt(2.0) / sqrt((2.0 * (l * (l / 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.35d-230)) then
tmp = -t_1
else if (t <= 2.05d-139) then
tmp = t * (sqrt(2.0d0) / sqrt((2.0d0 * (l * (l / 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.35e-230) {
tmp = -t_1;
} else if (t <= 2.05e-139) {
tmp = t * (Math.sqrt(2.0) / Math.sqrt((2.0 * (l * (l / 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.35e-230: tmp = -t_1 elif t <= 2.05e-139: tmp = t * (math.sqrt(2.0) / math.sqrt((2.0 * (l * (l / 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.35e-230) tmp = Float64(-t_1); elseif (t <= 2.05e-139) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(2.0 * Float64(l * Float64(l / 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.35e-230) tmp = -t_1; elseif (t <= 2.05e-139) tmp = t * (sqrt(2.0) / sqrt((2.0 * (l * (l / 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.35e-230], (-t$95$1), If[LessEqual[t, 2.05e-139], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(l * N[(l / 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.35 \cdot 10^{-230}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.35000000000000015e-230Initial program 32.0%
associate-*r/31.9%
fma-neg31.9%
sub-neg31.9%
metadata-eval31.9%
+-commutative31.9%
fma-def31.9%
distribute-rgt-neg-in31.9%
Simplified31.9%
Applied egg-rr68.8%
Taylor expanded in t around -inf 81.4%
mul-1-neg81.4%
sub-neg81.4%
metadata-eval81.4%
Simplified81.4%
if -3.35000000000000015e-230 < t < 2.05000000000000007e-139Initial program 3.5%
associate-*l/3.5%
Simplified3.5%
Taylor expanded in x around inf 65.0%
associate--l+65.0%
unpow265.0%
distribute-lft-out65.0%
unpow265.0%
unpow265.0%
associate-*r/65.0%
mul-1-neg65.0%
+-commutative65.0%
unpow265.0%
associate-*l*65.0%
unpow265.0%
fma-udef65.0%
Simplified65.0%
add-cube-cbrt64.8%
associate-/l*64.8%
associate-/l*64.8%
associate-/l*64.8%
Applied egg-rr64.8%
Taylor expanded in t around 0 63.9%
cancel-sign-sub-inv63.9%
metadata-eval63.9%
distribute-rgt1-in63.9%
metadata-eval63.9%
unpow263.9%
associate-*r/66.2%
Simplified66.2%
if 2.05000000000000007e-139 < t Initial program 43.0%
associate-*r/43.0%
fma-neg43.0%
sub-neg43.0%
metadata-eval43.0%
+-commutative43.0%
fma-def43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Applied egg-rr79.0%
Taylor expanded in t around inf 87.2%
Final simplification81.4%
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 -6e-206)
(- t_1)
(if (<= t 7.5e-144) (/ (sqrt 2.0) (* (sqrt (/ 2.0 x)) (/ l t))) 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 <= -6e-206) {
tmp = -t_1;
} else if (t <= 7.5e-144) {
tmp = sqrt(2.0) / (sqrt((2.0 / x)) * (l / t));
} 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 <= (-6d-206)) then
tmp = -t_1
else if (t <= 7.5d-144) then
tmp = sqrt(2.0d0) / (sqrt((2.0d0 / x)) * (l / t))
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 <= -6e-206) {
tmp = -t_1;
} else if (t <= 7.5e-144) {
tmp = Math.sqrt(2.0) / (Math.sqrt((2.0 / x)) * (l / t));
} 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 <= -6e-206: tmp = -t_1 elif t <= 7.5e-144: tmp = math.sqrt(2.0) / (math.sqrt((2.0 / x)) * (l / t)) 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 <= -6e-206) tmp = Float64(-t_1); elseif (t <= 7.5e-144) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(2.0 / x)) * Float64(l / t))); 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 <= -6e-206) tmp = -t_1; elseif (t <= 7.5e-144) tmp = sqrt(2.0) / (sqrt((2.0 / x)) * (l / t)); 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, -6e-206], (-t$95$1), If[LessEqual[t, 7.5e-144], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision] * N[(l / t), $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 -6 \cdot 10^{-206}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-144}:\\
\;\;\;\;\frac{\sqrt{2}}{\sqrt{\frac{2}{x}} \cdot \frac{\ell}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.0000000000000004e-206Initial program 33.0%
associate-*r/33.0%
fma-neg33.0%
sub-neg33.0%
metadata-eval33.0%
+-commutative33.0%
fma-def33.0%
distribute-rgt-neg-in33.0%
Simplified33.0%
Applied egg-rr70.2%
Taylor expanded in t around -inf 82.4%
mul-1-neg82.4%
sub-neg82.4%
metadata-eval82.4%
Simplified82.4%
if -6.0000000000000004e-206 < t < 7.49999999999999963e-144Initial program 3.4%
associate-/l*3.4%
fma-neg3.4%
remove-double-neg3.4%
fma-neg3.4%
sub-neg3.4%
metadata-eval3.4%
remove-double-neg3.4%
fma-def3.4%
Simplified3.4%
Taylor expanded in l around inf 3.4%
associate--l+3.4%
sub-neg3.4%
metadata-eval3.4%
+-commutative3.4%
sub-neg3.4%
metadata-eval3.4%
+-commutative3.4%
Simplified3.4%
Taylor expanded in x around inf 37.3%
if 7.49999999999999963e-144 < t Initial program 43.0%
associate-*r/43.0%
fma-neg43.0%
sub-neg43.0%
metadata-eval43.0%
+-commutative43.0%
fma-def43.0%
distribute-rgt-neg-in43.0%
Simplified43.0%
Applied egg-rr79.0%
Taylor expanded in t around inf 87.2%
Final simplification76.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -5.5e-259)
(- t_1)
(if (<= t 6.2e-219)
(* t (sqrt (/ 2.0 (+ (* l l) (/ (+ x 1.0) (/ (+ x -1.0) (* l 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 <= -5.5e-259) {
tmp = -t_1;
} else if (t <= 6.2e-219) {
tmp = t * sqrt((2.0 / ((l * l) + ((x + 1.0) / ((x + -1.0) / (l * 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 <= (-5.5d-259)) then
tmp = -t_1
else if (t <= 6.2d-219) then
tmp = t * sqrt((2.0d0 / ((l * l) + ((x + 1.0d0) / ((x + (-1.0d0)) / (l * 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 <= -5.5e-259) {
tmp = -t_1;
} else if (t <= 6.2e-219) {
tmp = t * Math.sqrt((2.0 / ((l * l) + ((x + 1.0) / ((x + -1.0) / (l * 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 <= -5.5e-259: tmp = -t_1 elif t <= 6.2e-219: tmp = t * math.sqrt((2.0 / ((l * l) + ((x + 1.0) / ((x + -1.0) / (l * 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 <= -5.5e-259) tmp = Float64(-t_1); elseif (t <= 6.2e-219) tmp = Float64(t * sqrt(Float64(2.0 / Float64(Float64(l * l) + Float64(Float64(x + 1.0) / Float64(Float64(x + -1.0) / Float64(l * 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 <= -5.5e-259) tmp = -t_1; elseif (t <= 6.2e-219) tmp = t * sqrt((2.0 / ((l * l) + ((x + 1.0) / ((x + -1.0) / (l * 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, -5.5e-259], (-t$95$1), If[LessEqual[t, 6.2e-219], N[(t * N[Sqrt[N[(2.0 / N[(N[(l * l), $MachinePrecision] + N[(N[(x + 1.0), $MachinePrecision] / N[(N[(x + -1.0), $MachinePrecision] / N[(l * l), $MachinePrecision]), $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 -5.5 \cdot 10^{-259}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-219}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{\ell \cdot \ell + \frac{x + 1}{\frac{x + -1}{\ell \cdot \ell}}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.50000000000000038e-259Initial program 30.2%
associate-*r/30.2%
fma-neg30.2%
sub-neg30.2%
metadata-eval30.2%
+-commutative30.2%
fma-def30.2%
distribute-rgt-neg-in30.2%
Simplified30.2%
Applied egg-rr68.4%
Taylor expanded in t around -inf 78.5%
mul-1-neg78.5%
sub-neg78.5%
metadata-eval78.5%
Simplified78.5%
if -5.50000000000000038e-259 < t < 6.1999999999999994e-219Initial program 1.5%
associate-*l/1.5%
Simplified1.5%
sqrt-undiv1.5%
fma-neg1.5%
distribute-rgt-neg-out1.5%
fma-udef1.5%
associate-*r*1.5%
fma-def1.5%
add-sqr-sqrt0.7%
sqrt-unprod41.5%
distribute-rgt-neg-out41.5%
distribute-rgt-neg-out41.5%
sqr-neg41.5%
sqrt-unprod41.5%
add-sqr-sqrt41.5%
Applied egg-rr41.5%
Taylor expanded in t around 0 41.5%
+-commutative41.5%
unpow241.5%
associate-/l*41.5%
sub-neg41.5%
metadata-eval41.5%
unpow241.5%
Simplified41.5%
if 6.1999999999999994e-219 < t Initial program 39.7%
associate-*r/39.6%
fma-neg39.6%
sub-neg39.6%
metadata-eval39.6%
+-commutative39.6%
fma-def39.6%
distribute-rgt-neg-in39.6%
Simplified39.6%
Applied egg-rr76.2%
Taylor expanded in t around inf 82.6%
Final simplification77.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)))))
(if (<= t -9.2e-262)
(- t_1)
(if (<= t 6.5e-220)
(* t (sqrt (/ 2.0 (* 2.0 (+ (* l l) (* t t))))))
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 <= -9.2e-262) {
tmp = -t_1;
} else if (t <= 6.5e-220) {
tmp = t * sqrt((2.0 / (2.0 * ((l * l) + (t * t)))));
} 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 <= (-9.2d-262)) then
tmp = -t_1
else if (t <= 6.5d-220) then
tmp = t * sqrt((2.0d0 / (2.0d0 * ((l * l) + (t * t)))))
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 <= -9.2e-262) {
tmp = -t_1;
} else if (t <= 6.5e-220) {
tmp = t * Math.sqrt((2.0 / (2.0 * ((l * l) + (t * t)))));
} 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 <= -9.2e-262: tmp = -t_1 elif t <= 6.5e-220: tmp = t * math.sqrt((2.0 / (2.0 * ((l * l) + (t * t))))) 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 <= -9.2e-262) tmp = Float64(-t_1); elseif (t <= 6.5e-220) tmp = Float64(t * sqrt(Float64(2.0 / Float64(2.0 * Float64(Float64(l * l) + Float64(t * t)))))); 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 <= -9.2e-262) tmp = -t_1; elseif (t <= 6.5e-220) tmp = t * sqrt((2.0 / (2.0 * ((l * l) + (t * t))))); 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, -9.2e-262], (-t$95$1), If[LessEqual[t, 6.5e-220], N[(t * N[Sqrt[N[(2.0 / N[(2.0 * N[(N[(l * l), $MachinePrecision] + N[(t * t), $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 -9.2 \cdot 10^{-262}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-220}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(\ell \cdot \ell + t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.20000000000000039e-262Initial program 30.2%
associate-*r/30.2%
fma-neg30.2%
sub-neg30.2%
metadata-eval30.2%
+-commutative30.2%
fma-def30.2%
distribute-rgt-neg-in30.2%
Simplified30.2%
Applied egg-rr68.4%
Taylor expanded in t around -inf 78.5%
mul-1-neg78.5%
sub-neg78.5%
metadata-eval78.5%
Simplified78.5%
if -9.20000000000000039e-262 < t < 6.50000000000000005e-220Initial program 1.5%
associate-*l/1.5%
Simplified1.5%
sqrt-undiv1.5%
fma-neg1.5%
distribute-rgt-neg-out1.5%
fma-udef1.5%
associate-*r*1.5%
fma-def1.5%
add-sqr-sqrt0.7%
sqrt-unprod41.5%
distribute-rgt-neg-out41.5%
distribute-rgt-neg-out41.5%
sqr-neg41.5%
sqrt-unprod41.5%
add-sqr-sqrt41.5%
Applied egg-rr41.5%
Taylor expanded in x around inf 41.5%
distribute-lft-out41.5%
unpow241.5%
unpow241.5%
Simplified41.5%
if 6.50000000000000005e-220 < t Initial program 39.7%
associate-*r/39.6%
fma-neg39.6%
sub-neg39.6%
metadata-eval39.6%
+-commutative39.6%
fma-def39.6%
distribute-rgt-neg-in39.6%
Simplified39.6%
Applied egg-rr76.2%
Taylor expanded in t around inf 82.6%
Final simplification77.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))))) (if (<= t -1e-311) (- t_1) 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 <= -1e-311) {
tmp = -t_1;
} 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 <= (-1d-311)) then
tmp = -t_1
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 <= -1e-311) {
tmp = -t_1;
} 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 <= -1e-311: tmp = -t_1 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 <= -1e-311) tmp = Float64(-t_1); 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 <= -1e-311) tmp = -t_1; 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, -1e-311], (-t$95$1), t$95$1]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-311}:\\
\;\;\;\;-t_1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around -inf 74.7%
mul-1-neg74.7%
sub-neg74.7%
metadata-eval74.7%
Simplified74.7%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*r/35.7%
fma-neg35.7%
sub-neg35.7%
metadata-eval35.7%
+-commutative35.7%
fma-def35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Applied egg-rr73.4%
Taylor expanded in t around inf 76.7%
Final simplification75.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-311) (+ -1.0 (/ 1.0 x)) (sqrt (/ (+ x -1.0) (+ x 1.0)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} 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 <= (-1d-311)) then
tmp = (-1.0d0) + (1.0d0 / x)
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 <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-311: tmp = -1.0 + (1.0 / x) 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 <= -1e-311) tmp = Float64(-1.0 + Float64(1.0 / x)); 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 <= -1e-311) tmp = -1.0 + (1.0 / x); 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, -1e-311], N[(-1.0 + N[(1.0 / x), $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 -1 \cdot 10^{-311}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.1%
Simplified74.1%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*r/35.7%
fma-neg35.7%
sub-neg35.7%
metadata-eval35.7%
+-commutative35.7%
fma-def35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Applied egg-rr73.4%
Taylor expanded in t around inf 76.7%
Final simplification75.4%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-311) (+ -1.0 (/ 1.0 x)) (+ (/ 0.5 (* x x)) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = (0.5 / (x * x)) + (1.0 + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-311)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = (0.5d0 / (x * x)) + (1.0d0 + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = (0.5 / (x * x)) + (1.0 + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-311: tmp = -1.0 + (1.0 / x) else: tmp = (0.5 / (x * x)) + (1.0 + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-311) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(Float64(0.5 / Float64(x * x)) + Float64(1.0 + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-311) tmp = -1.0 + (1.0 / x); else tmp = (0.5 / (x * x)) + (1.0 + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-311], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-311}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{x \cdot x} + \left(1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.1%
Simplified74.1%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*r/35.7%
fma-neg35.7%
sub-neg35.7%
metadata-eval35.7%
+-commutative35.7%
fma-def35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Applied egg-rr73.4%
Taylor expanded in t around inf 76.7%
Taylor expanded in x around inf 76.2%
sub-neg76.2%
+-commutative76.2%
associate-+l+76.2%
associate-*r/76.2%
metadata-eval76.2%
unpow276.2%
distribute-neg-frac76.2%
metadata-eval76.2%
Simplified76.2%
Final simplification75.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-311) (+ -1.0 (/ 1.0 x)) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-311)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-311: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-311) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-311) tmp = -1.0 + (1.0 / x); else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-311], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-311}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.1%
Simplified74.1%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*l/35.8%
Simplified35.8%
Taylor expanded in x around inf 73.8%
sqrt-unprod74.9%
metadata-eval74.9%
metadata-eval74.9%
Applied egg-rr74.9%
Final simplification74.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-311) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-311)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-311: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-311) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-311) tmp = -1.0 + (1.0 / x); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-311], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-311}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.1%
Simplified74.1%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*r/35.7%
fma-neg35.7%
sub-neg35.7%
metadata-eval35.7%
+-commutative35.7%
fma-def35.7%
distribute-rgt-neg-in35.7%
Simplified35.7%
Applied egg-rr73.4%
Taylor expanded in t around inf 76.7%
Taylor expanded in x around inf 75.8%
Final simplification74.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-311) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-311) {
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 <= (-1d-311)) 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 <= -1e-311) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-311: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-311) 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 <= -1e-311) 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, -1e-311], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-311}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.99999999999948e-312Initial program 28.4%
associate-*r/28.4%
fma-neg28.4%
sub-neg28.4%
metadata-eval28.4%
+-commutative28.4%
fma-def28.4%
distribute-rgt-neg-in28.4%
Simplified28.4%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt73.3%
Simplified73.3%
if -9.99999999999948e-312 < t Initial program 35.7%
associate-*l/35.8%
Simplified35.8%
Taylor expanded in x around inf 73.8%
sqrt-unprod74.9%
metadata-eval74.9%
metadata-eval74.9%
Applied egg-rr74.9%
Final simplification74.1%
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 32.0%
associate-*r/32.0%
fma-neg32.0%
sub-neg32.0%
metadata-eval32.0%
+-commutative32.0%
fma-def32.0%
distribute-rgt-neg-in32.0%
Simplified32.0%
Applied egg-rr70.5%
Taylor expanded in t around inf 38.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt38.1%
Simplified38.1%
Final simplification38.1%
herbie shell --seed 2023203
(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)))))