
(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 14 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}
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ (/ 1.0 x) -1.0)) (t_2 (* l (/ l x))))
(if (<= t -1.95e+96)
t_1
(if (<= t -3.5e-112)
(* t (/ (sqrt 2.0) (sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 t_2)))))
(if (<= t -5.2e-269)
t_1
(if (<= t 5.5e+120)
(*
t
(/
(sqrt 2.0)
(pow
(+ t_2 (- (* 2.0 (+ (* t t) (/ t (/ x t)))) (/ l (/ x (- l)))))
0.5)))
(+ 1.0 (/ -1.0 x))))))))
double code(double x, double l, double t) {
double t_1 = (1.0 / x) + -1.0;
double t_2 = l * (l / x);
double tmp;
if (t <= -1.95e+96) {
tmp = t_1;
} else if (t <= -3.5e-112) {
tmp = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))));
} else if (t <= -5.2e-269) {
tmp = t_1;
} else if (t <= 5.5e+120) {
tmp = t * (sqrt(2.0) / pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
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 = (1.0d0 / x) + (-1.0d0)
t_2 = l * (l / x)
if (t <= (-1.95d+96)) then
tmp = t_1
else if (t <= (-3.5d-112)) then
tmp = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * t_2))))
else if (t <= (-5.2d-269)) then
tmp = t_1
else if (t <= 5.5d+120) then
tmp = t * (sqrt(2.0d0) / ((t_2 + ((2.0d0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))) ** 0.5d0))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (1.0 / x) + -1.0;
double t_2 = l * (l / x);
double tmp;
if (t <= -1.95e+96) {
tmp = t_1;
} else if (t <= -3.5e-112) {
tmp = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2))));
} else if (t <= -5.2e-269) {
tmp = t_1;
} else if (t <= 5.5e+120) {
tmp = t * (Math.sqrt(2.0) / Math.pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): t_1 = (1.0 / x) + -1.0 t_2 = l * (l / x) tmp = 0 if t <= -1.95e+96: tmp = t_1 elif t <= -3.5e-112: tmp = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2)))) elif t <= -5.2e-269: tmp = t_1 elif t <= 5.5e+120: tmp = t * (math.sqrt(2.0) / math.pow((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))), 0.5)) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) t_1 = Float64(Float64(1.0 / x) + -1.0) t_2 = Float64(l * Float64(l / x)) tmp = 0.0 if (t <= -1.95e+96) tmp = t_1; elseif (t <= -3.5e-112) tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * t_2))))); elseif (t <= -5.2e-269) tmp = t_1; elseif (t <= 5.5e+120) tmp = Float64(t * Float64(sqrt(2.0) / (Float64(t_2 + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(t / Float64(x / t)))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (1.0 / x) + -1.0; t_2 = l * (l / x); tmp = 0.0; if (t <= -1.95e+96) tmp = t_1; elseif (t <= -3.5e-112) tmp = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * t_2)))); elseif (t <= -5.2e-269) tmp = t_1; elseif (t <= 5.5e+120) tmp = t * (sqrt(2.0) / ((t_2 + ((2.0 * ((t * t) + (t / (x / t)))) - (l / (x / -l)))) ^ 0.5)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+96], t$95$1, If[LessEqual[t, -3.5e-112], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-269], t$95$1, If[LessEqual[t, 5.5e+120], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(t$95$2 + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{x} + -1\\
t_2 := \ell \cdot \frac{\ell}{x}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot t_2}}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+120}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{{\left(t_2 + \left(2 \cdot \left(t \cdot t + \frac{t}{\frac{x}{t}}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.95e96 or -3.49999999999999994e-112 < t < -5.2e-269Initial program 22.0%
associate-/l*22.0%
fma-neg22.0%
remove-double-neg22.0%
fma-neg22.0%
sub-neg22.0%
metadata-eval22.0%
remove-double-neg22.0%
fma-def22.0%
Simplified22.0%
Taylor expanded in t around -inf 87.5%
associate-*r*87.5%
neg-mul-187.5%
+-commutative87.5%
sub-neg87.5%
metadata-eval87.5%
+-commutative87.5%
Simplified87.5%
Taylor expanded in x around inf 87.6%
if -1.95e96 < t < -3.49999999999999994e-112Initial program 69.7%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in x around inf 82.7%
associate--l+82.7%
unpow282.7%
distribute-lft-out82.7%
unpow282.7%
unpow282.7%
associate-*r/82.7%
mul-1-neg82.7%
+-commutative82.7%
unpow282.7%
associate-*l*82.7%
unpow282.7%
fma-udef82.7%
Simplified82.7%
Taylor expanded in t around 0 82.4%
associate-*r/82.4%
neg-mul-182.4%
unpow282.4%
distribute-rgt-neg-in82.4%
Simplified82.4%
*-un-lft-identity82.4%
associate-/l*82.4%
div-inv82.4%
clear-num82.4%
+-commutative82.4%
associate-/l*82.4%
associate-/l*89.5%
Applied egg-rr89.5%
*-lft-identity89.5%
associate-*r/82.4%
unpow282.4%
+-commutative82.4%
sub-neg82.4%
associate-/r/82.4%
distribute-rgt-neg-in82.4%
associate-*l/82.4%
unpow282.4%
remove-double-neg82.4%
associate-+l+82.4%
Simplified89.5%
if -5.2e-269 < t < 5.50000000000000003e120Initial program 38.7%
associate-*l/38.8%
Simplified38.8%
Taylor expanded in x around inf 79.3%
associate--l+79.3%
unpow279.3%
distribute-lft-out79.3%
unpow279.3%
unpow279.3%
associate-*r/79.3%
mul-1-neg79.3%
+-commutative79.3%
unpow279.3%
associate-*l*79.3%
unpow279.3%
fma-udef79.3%
Simplified79.3%
Taylor expanded in t around 0 78.9%
associate-*r/78.9%
neg-mul-178.9%
unpow278.9%
distribute-rgt-neg-in78.9%
Simplified78.9%
pow1/279.0%
associate-/l*79.0%
div-inv79.0%
clear-num79.0%
+-commutative79.0%
associate-/l*79.0%
associate-/l*85.2%
Applied egg-rr85.2%
if 5.50000000000000003e120 < t Initial program 13.2%
associate-*r/13.2%
fma-neg13.2%
sub-neg13.2%
metadata-eval13.2%
+-commutative13.2%
fma-def13.2%
distribute-rgt-neg-in13.2%
Simplified13.2%
Applied egg-rr92.4%
Taylor expanded in l around 0 97.4%
sub-neg97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
Taylor expanded in x around inf 97.4%
Final simplification88.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ (/ 1.0 x) -1.0))
(t_2
(*
t
(/
(sqrt 2.0)
(sqrt (+ (* 2.0 (* t (+ t (/ t x)))) (* 2.0 (* l (/ l x)))))))))
(if (<= t -5.2e+94)
t_1
(if (<= t -3.5e-112)
t_2
(if (<= t -1e-266) t_1 (if (<= t 2e+121) t_2 (+ 1.0 (/ -1.0 x))))))))
double code(double x, double l, double t) {
double t_1 = (1.0 / x) + -1.0;
double t_2 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -5.2e+94) {
tmp = t_1;
} else if (t <= -3.5e-112) {
tmp = t_2;
} else if (t <= -1e-266) {
tmp = t_1;
} else if (t <= 2e+121) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
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 = (1.0d0 / x) + (-1.0d0)
t_2 = t * (sqrt(2.0d0) / sqrt(((2.0d0 * (t * (t + (t / x)))) + (2.0d0 * (l * (l / x))))))
if (t <= (-5.2d+94)) then
tmp = t_1
else if (t <= (-3.5d-112)) then
tmp = t_2
else if (t <= (-1d-266)) then
tmp = t_1
else if (t <= 2d+121) then
tmp = t_2
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (1.0 / x) + -1.0;
double t_2 = t * (Math.sqrt(2.0) / Math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x))))));
double tmp;
if (t <= -5.2e+94) {
tmp = t_1;
} else if (t <= -3.5e-112) {
tmp = t_2;
} else if (t <= -1e-266) {
tmp = t_1;
} else if (t <= 2e+121) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): t_1 = (1.0 / x) + -1.0 t_2 = t * (math.sqrt(2.0) / math.sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))) tmp = 0 if t <= -5.2e+94: tmp = t_1 elif t <= -3.5e-112: tmp = t_2 elif t <= -1e-266: tmp = t_1 elif t <= 2e+121: tmp = t_2 else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) t_1 = Float64(Float64(1.0 / x) + -1.0) t_2 = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 * Float64(t * Float64(t + Float64(t / x)))) + Float64(2.0 * Float64(l * Float64(l / x))))))) tmp = 0.0 if (t <= -5.2e+94) tmp = t_1; elseif (t <= -3.5e-112) tmp = t_2; elseif (t <= -1e-266) tmp = t_1; elseif (t <= 2e+121) tmp = t_2; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (1.0 / x) + -1.0; t_2 = t * (sqrt(2.0) / sqrt(((2.0 * (t * (t + (t / x)))) + (2.0 * (l * (l / x)))))); tmp = 0.0; if (t <= -5.2e+94) tmp = t_1; elseif (t <= -3.5e-112) tmp = t_2; elseif (t <= -1e-266) tmp = t_1; elseif (t <= 2e+121) tmp = t_2; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 * N[(t * N[(t + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+94], t$95$1, If[LessEqual[t, -3.5e-112], t$95$2, If[LessEqual[t, -1e-266], t$95$1, If[LessEqual[t, 2e+121], t$95$2, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{x} + -1\\
t_2 := t \cdot \frac{\sqrt{2}}{\sqrt{2 \cdot \left(t \cdot \left(t + \frac{t}{x}\right)\right) + 2 \cdot \left(\ell \cdot \frac{\ell}{x}\right)}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-266}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+121}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -5.1999999999999998e94 or -3.49999999999999994e-112 < t < -9.9999999999999998e-267Initial program 22.0%
associate-/l*22.0%
fma-neg22.0%
remove-double-neg22.0%
fma-neg22.0%
sub-neg22.0%
metadata-eval22.0%
remove-double-neg22.0%
fma-def22.0%
Simplified22.0%
Taylor expanded in t around -inf 87.5%
associate-*r*87.5%
neg-mul-187.5%
+-commutative87.5%
sub-neg87.5%
metadata-eval87.5%
+-commutative87.5%
Simplified87.5%
Taylor expanded in x around inf 87.6%
if -5.1999999999999998e94 < t < -3.49999999999999994e-112 or -9.9999999999999998e-267 < t < 2.00000000000000007e121Initial program 48.1%
associate-*l/48.2%
Simplified48.2%
Taylor expanded in x around inf 80.3%
associate--l+80.3%
unpow280.3%
distribute-lft-out80.3%
unpow280.3%
unpow280.3%
associate-*r/80.3%
mul-1-neg80.3%
+-commutative80.3%
unpow280.3%
associate-*l*80.3%
unpow280.3%
fma-udef80.3%
Simplified80.3%
Taylor expanded in t around 0 80.0%
associate-*r/80.0%
neg-mul-180.0%
unpow280.0%
distribute-rgt-neg-in80.0%
Simplified80.0%
*-un-lft-identity80.0%
associate-/l*80.0%
div-inv80.0%
clear-num80.0%
+-commutative80.0%
associate-/l*80.0%
associate-/l*86.5%
Applied egg-rr86.5%
*-lft-identity86.5%
associate-*r/80.0%
unpow280.0%
+-commutative80.0%
sub-neg80.0%
associate-/r/80.0%
distribute-rgt-neg-in80.0%
associate-*l/80.0%
unpow280.0%
remove-double-neg80.0%
associate-+l+80.0%
Simplified86.5%
if 2.00000000000000007e121 < t Initial program 13.2%
associate-*r/13.2%
fma-neg13.2%
sub-neg13.2%
metadata-eval13.2%
+-commutative13.2%
fma-def13.2%
distribute-rgt-neg-in13.2%
Simplified13.2%
Applied egg-rr92.4%
Taylor expanded in l around 0 97.4%
sub-neg97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
Taylor expanded in x around inf 97.4%
Final simplification88.4%
(FPCore (x l t)
:precision binary64
(if (<= t -8.5e-265)
(- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(if (<= t 8.8e-121)
(* t (/ (sqrt (/ 1.0 (+ (/ 1.0 x) (/ (/ 1.0 x) x)))) l))
(+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -8.5e-265) {
tmp = -sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 8.8e-121) {
tmp = t * (sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l);
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
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 <= (-8.5d-265)) then
tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
else if (t <= 8.8d-121) then
tmp = t * (sqrt((1.0d0 / ((1.0d0 / x) + ((1.0d0 / x) / x)))) / l)
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -8.5e-265) {
tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 8.8e-121) {
tmp = t * (Math.sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l);
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -8.5e-265: tmp = -math.sqrt(((x + -1.0) / (1.0 + x))) elif t <= 8.8e-121: tmp = t * (math.sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l) else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -8.5e-265) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)))); elseif (t <= 8.8e-121) tmp = Float64(t * Float64(sqrt(Float64(1.0 / Float64(Float64(1.0 / x) + Float64(Float64(1.0 / x) / x)))) / l)); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -8.5e-265) tmp = -sqrt(((x + -1.0) / (1.0 + x))); elseif (t <= 8.8e-121) tmp = t * (sqrt((1.0 / ((1.0 / x) + ((1.0 / x) / x)))) / l); else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -8.5e-265], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 8.8e-121], N[(t * N[(N[Sqrt[N[(1.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-265}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-121}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{1}{\frac{1}{x} + \frac{\frac{1}{x}}{x}}}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -8.4999999999999997e-265Initial program 37.1%
associate-*r/37.1%
fma-neg37.1%
sub-neg37.1%
metadata-eval37.1%
+-commutative37.1%
fma-def37.1%
distribute-rgt-neg-in37.1%
Simplified37.1%
Applied egg-rr75.4%
Taylor expanded in t around -inf 83.6%
mul-1-neg83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
Simplified83.6%
if -8.4999999999999997e-265 < t < 8.80000000000000084e-121Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 69.2%
associate--l+69.2%
unpow269.2%
sub-neg69.2%
Simplified69.2%
Taylor expanded in t around 0 67.4%
cancel-sign-sub-inv67.4%
unpow267.4%
metadata-eval67.4%
unpow267.4%
unpow267.4%
Simplified67.4%
pow167.4%
*-commutative67.4%
sqrt-undiv67.7%
distribute-lft-out67.7%
associate-/l*67.5%
times-frac73.1%
Applied egg-rr73.1%
unpow173.1%
associate-/r*73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in l around 0 53.6%
associate-*l/53.7%
*-lft-identity53.7%
+-commutative53.7%
unpow253.7%
associate-/r*53.7%
Simplified53.7%
if 8.80000000000000084e-121 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification79.1%
(FPCore (x l t)
:precision binary64
(if (<= t -8e-269)
(- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(if (<= t 3.1e-123)
(* t (sqrt (- (/ x (* l l)) (/ (/ 1.0 l) l))))
(+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -8e-269) {
tmp = -sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 3.1e-123) {
tmp = t * sqrt(((x / (l * l)) - ((1.0 / l) / l)));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8d-269)) then
tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
else if (t <= 3.1d-123) then
tmp = t * sqrt(((x / (l * l)) - ((1.0d0 / l) / l)))
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -8e-269) {
tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 3.1e-123) {
tmp = t * Math.sqrt(((x / (l * l)) - ((1.0 / l) / l)));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -8e-269: tmp = -math.sqrt(((x + -1.0) / (1.0 + x))) elif t <= 3.1e-123: tmp = t * math.sqrt(((x / (l * l)) - ((1.0 / l) / l))) else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -8e-269) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)))); elseif (t <= 3.1e-123) tmp = Float64(t * sqrt(Float64(Float64(x / Float64(l * l)) - Float64(Float64(1.0 / l) / l)))); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -8e-269) tmp = -sqrt(((x + -1.0) / (1.0 + x))); elseif (t <= 3.1e-123) tmp = t * sqrt(((x / (l * l)) - ((1.0 / l) / l))); else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -8e-269], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.1e-123], N[(t * N[Sqrt[N[(N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision] - N[(N[(1.0 / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-269}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell} - \frac{\frac{1}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -7.9999999999999997e-269Initial program 36.9%
associate-*r/36.8%
fma-neg36.9%
sub-neg36.9%
metadata-eval36.9%
+-commutative36.9%
fma-def36.9%
distribute-rgt-neg-in36.9%
Simplified36.9%
Applied egg-rr74.8%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
if -7.9999999999999997e-269 < t < 3.09999999999999998e-123Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 71.1%
associate--l+71.1%
unpow271.1%
sub-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 69.2%
cancel-sign-sub-inv69.2%
unpow269.2%
metadata-eval69.2%
unpow269.2%
unpow269.2%
Simplified69.2%
pow169.2%
*-commutative69.2%
sqrt-undiv69.5%
distribute-lft-out69.5%
associate-/l*69.4%
times-frac75.1%
Applied egg-rr75.1%
unpow175.1%
associate-/r*75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in x around inf 74.6%
unpow274.6%
unpow274.6%
associate-/r*74.6%
Simplified74.6%
if 3.09999999999999998e-123 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification81.8%
(FPCore (x l t)
:precision binary64
(if (<= t -1.06e-266)
(- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(if (<= t 7.2e-123)
(* t (sqrt (/ 1.0 (* (/ l x) (+ l (/ l x))))))
(+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.06e-266) {
tmp = -sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 7.2e-123) {
tmp = t * sqrt((1.0 / ((l / x) * (l + (l / x)))));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
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.06d-266)) then
tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
else if (t <= 7.2d-123) then
tmp = t * sqrt((1.0d0 / ((l / x) * (l + (l / x)))))
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.06e-266) {
tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 7.2e-123) {
tmp = t * Math.sqrt((1.0 / ((l / x) * (l + (l / x)))));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.06e-266: tmp = -math.sqrt(((x + -1.0) / (1.0 + x))) elif t <= 7.2e-123: tmp = t * math.sqrt((1.0 / ((l / x) * (l + (l / x))))) else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.06e-266) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)))); elseif (t <= 7.2e-123) tmp = Float64(t * sqrt(Float64(1.0 / Float64(Float64(l / x) * Float64(l + Float64(l / x)))))); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.06e-266) tmp = -sqrt(((x + -1.0) / (1.0 + x))); elseif (t <= 7.2e-123) tmp = t * sqrt((1.0 / ((l / x) * (l + (l / x))))); else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.06e-266], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 7.2e-123], N[(t * N[Sqrt[N[(1.0 / N[(N[(l / x), $MachinePrecision] * N[(l + N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{-266}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{1}{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -1.0599999999999999e-266Initial program 36.9%
associate-*r/36.8%
fma-neg36.9%
sub-neg36.9%
metadata-eval36.9%
+-commutative36.9%
fma-def36.9%
distribute-rgt-neg-in36.9%
Simplified36.9%
Applied egg-rr74.8%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
if -1.0599999999999999e-266 < t < 7.1999999999999994e-123Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 71.1%
associate--l+71.1%
unpow271.1%
sub-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 69.2%
cancel-sign-sub-inv69.2%
unpow269.2%
metadata-eval69.2%
unpow269.2%
unpow269.2%
Simplified69.2%
pow169.2%
*-commutative69.2%
sqrt-undiv69.5%
distribute-lft-out69.5%
associate-/l*69.4%
times-frac75.1%
Applied egg-rr75.1%
unpow175.1%
associate-/r*75.1%
metadata-eval75.1%
associate-/r/75.1%
distribute-lft-out74.9%
Simplified74.9%
if 7.1999999999999994e-123 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification81.8%
(FPCore (x l t)
:precision binary64
(if (<= t -5.2e-269)
(- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(if (<= t 4.7e-123)
(* t (/ 1.0 (sqrt (* (/ l x) (+ l (/ l x))))))
(+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -5.2e-269) {
tmp = -sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 4.7e-123) {
tmp = t * (1.0 / sqrt(((l / x) * (l + (l / x)))));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
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 <= (-5.2d-269)) then
tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
else if (t <= 4.7d-123) then
tmp = t * (1.0d0 / sqrt(((l / x) * (l + (l / x)))))
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5.2e-269) {
tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 4.7e-123) {
tmp = t * (1.0 / Math.sqrt(((l / x) * (l + (l / x)))));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -5.2e-269: tmp = -math.sqrt(((x + -1.0) / (1.0 + x))) elif t <= 4.7e-123: tmp = t * (1.0 / math.sqrt(((l / x) * (l + (l / x))))) else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -5.2e-269) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)))); elseif (t <= 4.7e-123) tmp = Float64(t * Float64(1.0 / sqrt(Float64(Float64(l / x) * Float64(l + Float64(l / x)))))); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5.2e-269) tmp = -sqrt(((x + -1.0) / (1.0 + x))); elseif (t <= 4.7e-123) tmp = t * (1.0 / sqrt(((l / x) * (l + (l / x))))); else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -5.2e-269], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4.7e-123], N[(t * N[(1.0 / N[Sqrt[N[(N[(l / x), $MachinePrecision] * N[(l + N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-269}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \frac{1}{\sqrt{\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -5.2e-269Initial program 36.9%
associate-*r/36.8%
fma-neg36.9%
sub-neg36.9%
metadata-eval36.9%
+-commutative36.9%
fma-def36.9%
distribute-rgt-neg-in36.9%
Simplified36.9%
Applied egg-rr74.8%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
if -5.2e-269 < t < 4.7000000000000002e-123Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 71.1%
associate--l+71.1%
unpow271.1%
sub-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 69.2%
cancel-sign-sub-inv69.2%
unpow269.2%
metadata-eval69.2%
unpow269.2%
unpow269.2%
Simplified69.2%
pow169.2%
*-commutative69.2%
sqrt-undiv69.5%
distribute-lft-out69.5%
associate-/l*69.4%
times-frac75.1%
Applied egg-rr75.1%
unpow175.1%
associate-/r*75.1%
metadata-eval75.1%
Simplified75.1%
sqrt-div75.1%
metadata-eval75.1%
div-inv75.1%
clear-num75.1%
pow275.1%
Applied egg-rr75.1%
unpow275.1%
distribute-rgt-out75.0%
Simplified75.0%
if 4.7000000000000002e-123 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification81.8%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ 0.5 (* x x))))
(if (<= t -6.1e-267)
(- (/ 1.0 x) (+ 1.0 t_1))
(if (<= t 3.1e-123)
(* t (sqrt (/ x (* l l))))
(+ (+ 1.0 (/ -1.0 x)) t_1)))))
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -6.1e-267) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 3.1e-123) {
tmp = t * sqrt((x / (l * l)));
} else {
tmp = (1.0 + (-1.0 / x)) + t_1;
}
return tmp;
}
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 = 0.5d0 / (x * x)
if (t <= (-6.1d-267)) then
tmp = (1.0d0 / x) - (1.0d0 + t_1)
else if (t <= 3.1d-123) then
tmp = t * sqrt((x / (l * l)))
else
tmp = (1.0d0 + ((-1.0d0) / x)) + t_1
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -6.1e-267) {
tmp = (1.0 / x) - (1.0 + t_1);
} else if (t <= 3.1e-123) {
tmp = t * Math.sqrt((x / (l * l)));
} else {
tmp = (1.0 + (-1.0 / x)) + t_1;
}
return tmp;
}
def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -6.1e-267: tmp = (1.0 / x) - (1.0 + t_1) elif t <= 3.1e-123: tmp = t * math.sqrt((x / (l * l))) else: tmp = (1.0 + (-1.0 / x)) + t_1 return tmp
function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -6.1e-267) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1)); elseif (t <= 3.1e-123) tmp = Float64(t * sqrt(Float64(x / Float64(l * l)))); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + t_1); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -6.1e-267) tmp = (1.0 / x) - (1.0 + t_1); elseif (t <= 3.1e-123) tmp = t * sqrt((x / (l * l))); else tmp = (1.0 + (-1.0 / x)) + t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.1e-267], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-123], N[(t * N[Sqrt[N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{-267}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\
\end{array}
\end{array}
if t < -6.10000000000000008e-267Initial program 36.9%
associate-/l*36.9%
fma-neg37.0%
remove-double-neg37.0%
fma-neg36.9%
sub-neg36.9%
metadata-eval36.9%
remove-double-neg36.9%
fma-def36.9%
Simplified36.9%
Taylor expanded in t around -inf 83.0%
associate-*r*83.0%
neg-mul-183.0%
+-commutative83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in x around inf 82.2%
associate-*r/82.2%
metadata-eval82.2%
unpow282.2%
Simplified82.2%
if -6.10000000000000008e-267 < t < 3.09999999999999998e-123Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 71.1%
associate--l+71.1%
unpow271.1%
sub-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 69.2%
cancel-sign-sub-inv69.2%
unpow269.2%
metadata-eval69.2%
unpow269.2%
unpow269.2%
Simplified69.2%
pow169.2%
*-commutative69.2%
sqrt-undiv69.5%
distribute-lft-out69.5%
associate-/l*69.4%
times-frac75.1%
Applied egg-rr75.1%
unpow175.1%
associate-/r*75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in x around inf 74.5%
unpow274.5%
Simplified74.5%
if 3.09999999999999998e-123 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification81.4%
(FPCore (x l t)
:precision binary64
(if (<= t -1.25e-267)
(- (sqrt (/ (+ x -1.0) (+ 1.0 x))))
(if (<= t 3.9e-123)
(* t (sqrt (/ x (* l l))))
(+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x))))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.25e-267) {
tmp = -sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 3.9e-123) {
tmp = t * sqrt((x / (l * l)));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
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.25d-267)) then
tmp = -sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
else if (t <= 3.9d-123) then
tmp = t * sqrt((x / (l * l)))
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.25e-267) {
tmp = -Math.sqrt(((x + -1.0) / (1.0 + x)));
} else if (t <= 3.9e-123) {
tmp = t * Math.sqrt((x / (l * l)));
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.25e-267: tmp = -math.sqrt(((x + -1.0) / (1.0 + x))) elif t <= 3.9e-123: tmp = t * math.sqrt((x / (l * l))) else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.25e-267) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x)))); elseif (t <= 3.9e-123) tmp = Float64(t * sqrt(Float64(x / Float64(l * l)))); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.25e-267) tmp = -sqrt(((x + -1.0) / (1.0 + x))); elseif (t <= 3.9e-123) tmp = t * sqrt((x / (l * l))); else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.25e-267], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 3.9e-123], N[(t * N[Sqrt[N[(x / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-267}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-123}:\\
\;\;\;\;t \cdot \sqrt{\frac{x}{\ell \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -1.25e-267Initial program 36.9%
associate-*r/36.8%
fma-neg36.9%
sub-neg36.9%
metadata-eval36.9%
+-commutative36.9%
fma-def36.9%
distribute-rgt-neg-in36.9%
Simplified36.9%
Applied egg-rr74.8%
Taylor expanded in t around -inf 83.0%
mul-1-neg83.0%
sub-neg83.0%
metadata-eval83.0%
+-commutative83.0%
Simplified83.0%
if -1.25e-267 < t < 3.89999999999999976e-123Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in x around -inf 71.1%
associate--l+71.1%
unpow271.1%
sub-neg71.1%
Simplified71.1%
Taylor expanded in t around 0 69.2%
cancel-sign-sub-inv69.2%
unpow269.2%
metadata-eval69.2%
unpow269.2%
unpow269.2%
Simplified69.2%
pow169.2%
*-commutative69.2%
sqrt-undiv69.5%
distribute-lft-out69.5%
associate-/l*69.4%
times-frac75.1%
Applied egg-rr75.1%
unpow175.1%
associate-/r*75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in x around inf 74.5%
unpow274.5%
Simplified74.5%
if 3.89999999999999976e-123 < t Initial program 41.5%
associate-*r/41.4%
fma-neg41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
fma-def41.4%
distribute-rgt-neg-in41.4%
Simplified41.4%
Applied egg-rr70.8%
Taylor expanded in l around 0 82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in x around inf 82.8%
+-commutative82.8%
associate--l+82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
Final simplification81.8%
(FPCore (x l t) :precision binary64 (if (<= t -2e-311) (+ (/ 1.0 x) -1.0) (+ (+ 1.0 (/ -1.0 x)) (/ 0.5 (* x x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
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 <= (-2d-311)) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = (1.0d0 + ((-1.0d0) / x)) + (0.5d0 / (x * x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-311: tmp = (1.0 / x) + -1.0 else: tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-311) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + Float64(0.5 / Float64(x * x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-311) tmp = (1.0 / x) + -1.0; else tmp = (1.0 + (-1.0 / x)) + (0.5 / (x * x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + \frac{0.5}{x \cdot x}\\
\end{array}
\end{array}
if t < -1.9999999999999e-311Initial program 35.3%
associate-/l*35.3%
fma-neg35.4%
remove-double-neg35.4%
fma-neg35.3%
sub-neg35.3%
metadata-eval35.3%
remove-double-neg35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in t around -inf 79.5%
associate-*r*79.5%
neg-mul-179.5%
+-commutative79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 78.6%
if -1.9999999999999e-311 < t Initial 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-rr62.5%
Taylor expanded in l around 0 68.9%
sub-neg68.9%
metadata-eval68.9%
+-commutative68.9%
Simplified68.9%
Taylor expanded in x around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-*r/68.9%
metadata-eval68.9%
unpow268.9%
Simplified68.9%
Final simplification74.0%
(FPCore (x l t) :precision binary64 (let* ((t_1 (/ 0.5 (* x x)))) (if (<= t -2e-311) (- (/ 1.0 x) (+ 1.0 t_1)) (+ (+ 1.0 (/ -1.0 x)) t_1))))
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) - (1.0 + t_1);
} else {
tmp = (1.0 + (-1.0 / x)) + t_1;
}
return tmp;
}
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 = 0.5d0 / (x * x)
if (t <= (-2d-311)) then
tmp = (1.0d0 / x) - (1.0d0 + t_1)
else
tmp = (1.0d0 + ((-1.0d0) / x)) + t_1
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) - (1.0 + t_1);
} else {
tmp = (1.0 + (-1.0 / x)) + t_1;
}
return tmp;
}
def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -2e-311: tmp = (1.0 / x) - (1.0 + t_1) else: tmp = (1.0 + (-1.0 / x)) + t_1 return tmp
function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -2e-311) tmp = Float64(Float64(1.0 / x) - Float64(1.0 + t_1)); else tmp = Float64(Float64(1.0 + Float64(-1.0 / x)) + t_1); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -2e-311) tmp = (1.0 / x) - (1.0 + t_1); else tmp = (1.0 + (-1.0 / x)) + t_1; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] - N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} - \left(1 + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1}{x}\right) + t_1\\
\end{array}
\end{array}
if t < -1.9999999999999e-311Initial program 35.3%
associate-/l*35.3%
fma-neg35.4%
remove-double-neg35.4%
fma-neg35.3%
sub-neg35.3%
metadata-eval35.3%
remove-double-neg35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in t around -inf 79.5%
associate-*r*79.5%
neg-mul-179.5%
+-commutative79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 78.7%
associate-*r/78.7%
metadata-eval78.7%
unpow278.7%
Simplified78.7%
if -1.9999999999999e-311 < t Initial 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-rr62.5%
Taylor expanded in l around 0 68.9%
sub-neg68.9%
metadata-eval68.9%
+-commutative68.9%
Simplified68.9%
Taylor expanded in x around inf 68.9%
+-commutative68.9%
associate--l+68.9%
associate-*r/68.9%
metadata-eval68.9%
unpow268.9%
Simplified68.9%
Final simplification74.0%
(FPCore (x l t) :precision binary64 (if (<= t -2e-311) -1.0 (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
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 <= (-2d-311)) then
tmp = -1.0d0
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-311: tmp = -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-311) tmp = -1.0; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-311) tmp = -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.9999999999999e-311Initial program 35.3%
associate-/l*35.3%
fma-neg35.4%
remove-double-neg35.4%
fma-neg35.3%
sub-neg35.3%
metadata-eval35.3%
remove-double-neg35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in t around -inf 79.5%
associate-*r*79.5%
neg-mul-179.5%
+-commutative79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 77.9%
if -1.9999999999999e-311 < t Initial 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-rr62.5%
Taylor expanded in l around 0 68.9%
sub-neg68.9%
metadata-eval68.9%
+-commutative68.9%
Simplified68.9%
Taylor expanded in x around inf 68.9%
Final simplification73.6%
(FPCore (x l t) :precision binary64 (if (<= t -2e-311) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
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 <= (-2d-311)) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-311: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-311) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-311) tmp = (1.0 / x) + -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.9999999999999e-311Initial program 35.3%
associate-/l*35.3%
fma-neg35.4%
remove-double-neg35.4%
fma-neg35.3%
sub-neg35.3%
metadata-eval35.3%
remove-double-neg35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in t around -inf 79.5%
associate-*r*79.5%
neg-mul-179.5%
+-commutative79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 78.6%
if -1.9999999999999e-311 < t Initial 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-rr62.5%
Taylor expanded in l around 0 68.9%
sub-neg68.9%
metadata-eval68.9%
+-commutative68.9%
Simplified68.9%
Taylor expanded in x around inf 68.9%
Final simplification74.0%
(FPCore (x l t) :precision binary64 (if (<= t -2e-311) -1.0 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
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 <= (-2d-311)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-311) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-311: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-311) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-311) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-311], -1.0, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-311}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.9999999999999e-311Initial program 35.3%
associate-/l*35.3%
fma-neg35.4%
remove-double-neg35.4%
fma-neg35.3%
sub-neg35.3%
metadata-eval35.3%
remove-double-neg35.3%
fma-def35.3%
Simplified35.3%
Taylor expanded in t around -inf 79.5%
associate-*r*79.5%
neg-mul-179.5%
+-commutative79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 77.9%
if -1.9999999999999e-311 < t Initial program 33.0%
associate-*l/33.2%
Simplified33.2%
Taylor expanded in x around inf 67.2%
sqrt-unprod68.2%
metadata-eval68.2%
metadata-eval68.2%
Applied egg-rr68.2%
Final simplification73.3%
(FPCore (x l t) :precision binary64 -1.0)
double code(double x, double l, double t) {
return -1.0;
}
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
public static double code(double x, double l, double t) {
return -1.0;
}
def code(x, l, t): return -1.0
function code(x, l, t) return -1.0 end
function tmp = code(x, l, t) tmp = -1.0; end
code[x_, l_, t_] := -1.0
\begin{array}{l}
\\
-1
\end{array}
Initial program 34.2%
associate-/l*34.2%
fma-neg34.3%
remove-double-neg34.3%
fma-neg34.2%
sub-neg34.2%
metadata-eval34.2%
remove-double-neg34.2%
fma-def34.2%
Simplified34.2%
Taylor expanded in t around -inf 42.4%
associate-*r*42.4%
neg-mul-142.4%
+-commutative42.4%
sub-neg42.4%
metadata-eval42.4%
+-commutative42.4%
Simplified42.4%
Taylor expanded in x around inf 41.6%
Final simplification41.6%
herbie shell --seed 2023252
(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)))))