
(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 (* t (sqrt 2.0))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.05e-18)
(- t_2)
(if (<= t 3e-135)
(/ t_1 (* (sqrt 2.0) (hypot t (sqrt (/ l (/ x l))))))
(if (<= t 3.1e+83)
(/ t_1 (sqrt (* 2.0 (+ (* l (/ l x)) (* t t)))))
t_2)))))
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.05e-18) {
tmp = -t_2;
} else if (t <= 3e-135) {
tmp = t_1 / (sqrt(2.0) * hypot(t, sqrt((l / (x / l)))));
} else if (t <= 3.1e+83) {
tmp = t_1 / sqrt((2.0 * ((l * (l / x)) + (t * t))));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double l, double t) {
double t_1 = t * Math.sqrt(2.0);
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.05e-18) {
tmp = -t_2;
} else if (t <= 3e-135) {
tmp = t_1 / (Math.sqrt(2.0) * Math.hypot(t, Math.sqrt((l / (x / l)))));
} else if (t <= 3.1e+83) {
tmp = t_1 / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = t * math.sqrt(2.0) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.05e-18: tmp = -t_2 elif t <= 3e-135: tmp = t_1 / (math.sqrt(2.0) * math.hypot(t, math.sqrt((l / (x / l))))) elif t <= 3.1e+83: tmp = t_1 / math.sqrt((2.0 * ((l * (l / x)) + (t * t)))) else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.05e-18) tmp = Float64(-t_2); elseif (t <= 3e-135) tmp = Float64(t_1 / Float64(sqrt(2.0) * hypot(t, sqrt(Float64(l / Float64(x / l)))))); elseif (t <= 3.1e+83) tmp = Float64(t_1 / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * sqrt(2.0); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.05e-18) tmp = -t_2; elseif (t <= 3e-135) tmp = t_1 / (sqrt(2.0) * hypot(t, sqrt((l / (x / l))))); elseif (t <= 3.1e+83) tmp = t_1 / sqrt((2.0 * ((l * (l / x)) + (t * t)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.05e-18], (-t$95$2), If[LessEqual[t, 3e-135], N[(t$95$1 / N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[t ^ 2 + N[Sqrt[N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+83], N[(t$95$1 / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-18}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-135}:\\
\;\;\;\;\frac{t_1}{\sqrt{2} \cdot \mathsf{hypot}\left(t, \sqrt{\frac{\ell}{\frac{x}{\ell}}}\right)}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{t_1}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.0499999999999999e-18Initial program 34.5%
associate-*l/34.5%
Simplified34.5%
Applied egg-rr80.6%
Taylor expanded in t around -inf 87.4%
mul-1-neg87.4%
sub-neg87.4%
metadata-eval87.4%
Simplified87.4%
if -2.0499999999999999e-18 < t < 3.00000000000000012e-135Initial program 20.5%
fma-neg20.6%
sqr-neg20.6%
fma-neg20.5%
sqr-neg20.5%
sqr-neg20.5%
sqr-neg20.5%
Simplified20.6%
Taylor expanded in x around inf 59.1%
distribute-lft-out59.1%
fma-def59.1%
unpow259.1%
unpow259.1%
unpow259.1%
Simplified59.1%
Taylor expanded in t around 0 59.1%
unpow259.1%
Simplified59.1%
sqrt-prod59.3%
+-commutative59.3%
add-sqr-sqrt58.0%
hypot-def84.9%
associate-/l*89.6%
Applied egg-rr89.6%
if 3.00000000000000012e-135 < t < 3.09999999999999992e83Initial program 53.6%
fma-neg53.6%
sqr-neg53.6%
fma-neg53.6%
sqr-neg53.6%
sqr-neg53.6%
sqr-neg53.6%
Simplified53.6%
Taylor expanded in x around inf 75.7%
distribute-lft-out75.7%
fma-def75.7%
unpow275.7%
unpow275.7%
unpow275.7%
Simplified75.7%
Taylor expanded in t around 0 75.7%
unpow275.7%
Simplified75.7%
Taylor expanded in l around 0 75.7%
unpow275.7%
associate-*l/89.0%
Simplified89.0%
if 3.09999999999999992e83 < t Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
Applied egg-rr96.4%
Taylor expanded in t around inf 98.2%
Final simplification90.6%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* t (sqrt 2.0)) (sqrt (* 2.0 (+ (* l (/ l x)) (* t t))))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.7e+153)
(- t_2)
(if (<= t -1.1e-159)
t_1
(if (<= t -9.2e-184)
-1.0
(if (<= t 2.8e-197)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt (+ (+ (/ 1.0 x) (/ 1.0 (* x x))) (/ 1.0 (+ x -1.0)))))))
(if (<= t 3e-160) 1.0 (if (<= t 2.6e+83) t_1 t_2))))))))
double code(double x, double l, double t) {
double t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.7e+153) {
tmp = -t_2;
} else if (t <= -1.1e-159) {
tmp = t_1;
} else if (t <= -9.2e-184) {
tmp = -1.0;
} else if (t <= 2.8e-197) {
tmp = t * (sqrt(2.0) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))));
} else if (t <= 3e-160) {
tmp = 1.0;
} else if (t <= 2.6e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (t * sqrt(2.0d0)) / sqrt((2.0d0 * ((l * (l / x)) + (t * t))))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.7d+153)) then
tmp = -t_2
else if (t <= (-1.1d-159)) then
tmp = t_1
else if (t <= (-9.2d-184)) then
tmp = -1.0d0
else if (t <= 2.8d-197) then
tmp = t * (sqrt(2.0d0) / (l * sqrt((((1.0d0 / x) + (1.0d0 / (x * x))) + (1.0d0 / (x + (-1.0d0)))))))
else if (t <= 3d-160) then
tmp = 1.0d0
else if (t <= 2.6d+83) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.7e+153) {
tmp = -t_2;
} else if (t <= -1.1e-159) {
tmp = t_1;
} else if (t <= -9.2e-184) {
tmp = -1.0;
} else if (t <= 2.8e-197) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))));
} else if (t <= 3e-160) {
tmp = 1.0;
} else if (t <= 2.6e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = (t * math.sqrt(2.0)) / math.sqrt((2.0 * ((l * (l / x)) + (t * t)))) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.7e+153: tmp = -t_2 elif t <= -1.1e-159: tmp = t_1 elif t <= -9.2e-184: tmp = -1.0 elif t <= 2.8e-197: tmp = t * (math.sqrt(2.0) / (l * math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0)))))) elif t <= 3e-160: tmp = 1.0 elif t <= 2.6e+83: tmp = t_1 else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t))))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.7e+153) tmp = Float64(-t_2); elseif (t <= -1.1e-159) tmp = t_1; elseif (t <= -9.2e-184) tmp = -1.0; elseif (t <= 2.8e-197) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))) + Float64(1.0 / Float64(x + -1.0))))))); elseif (t <= 3e-160) tmp = 1.0; elseif (t <= 2.6e+83) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t)))); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.7e+153) tmp = -t_2; elseif (t <= -1.1e-159) tmp = t_1; elseif (t <= -9.2e-184) tmp = -1.0; elseif (t <= 2.8e-197) tmp = t * (sqrt(2.0) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0)))))); elseif (t <= 3e-160) tmp = 1.0; elseif (t <= 2.6e+83) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.7e+153], (-t$95$2), If[LessEqual[t, -1.1e-159], t$95$1, If[LessEqual[t, -9.2e-184], -1.0, If[LessEqual[t, 2.8e-197], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-160], 1.0, If[LessEqual[t, 2.6e+83], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+153}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-184}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-197}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right) + \frac{1}{x + -1}}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-160}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.7000000000000001e153Initial program 2.2%
associate-*l/2.2%
Simplified2.2%
Applied egg-rr91.0%
Taylor expanded in t around -inf 95.5%
mul-1-neg95.5%
sub-neg95.5%
metadata-eval95.5%
Simplified95.5%
if -2.7000000000000001e153 < t < -1.1e-159 or 2.99999999999999997e-160 < t < 2.6000000000000001e83Initial program 55.3%
fma-neg55.4%
sqr-neg55.4%
fma-neg55.3%
sqr-neg55.3%
sqr-neg55.3%
sqr-neg55.3%
Simplified55.4%
Taylor expanded in x around inf 77.8%
distribute-lft-out77.8%
fma-def77.8%
unpow277.8%
unpow277.8%
unpow277.8%
Simplified77.8%
Taylor expanded in t around 0 77.2%
unpow277.2%
Simplified77.2%
Taylor expanded in l around 0 77.2%
unpow277.2%
associate-*l/87.9%
Simplified87.9%
if -1.1e-159 < t < -9.1999999999999998e-184Initial program 9.5%
associate-*l/9.5%
Simplified9.5%
Applied egg-rr60.5%
Taylor expanded in t around inf 1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt100.0%
Simplified100.0%
if -9.1999999999999998e-184 < t < 2.8000000000000002e-197Initial program 3.4%
associate-*l/3.4%
Simplified3.4%
Taylor expanded in l around inf 1.5%
associate--l+32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
Simplified32.8%
Taylor expanded in x around inf 44.1%
unpow244.1%
Simplified44.1%
if 2.8000000000000002e-197 < t < 2.99999999999999997e-160Initial program 12.4%
fma-neg12.4%
sqr-neg12.4%
fma-neg12.4%
sqr-neg12.4%
sqr-neg12.4%
sqr-neg12.4%
Simplified12.4%
Taylor expanded in x around inf 23.1%
distribute-lft-out23.1%
fma-def23.1%
unpow223.1%
unpow223.1%
unpow223.1%
Simplified23.1%
Taylor expanded in x around inf 88.5%
if 2.6000000000000001e83 < t Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
Applied egg-rr96.4%
Taylor expanded in t around inf 98.2%
Final simplification86.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* t (sqrt 2.0)) (sqrt (* 2.0 (+ (* l (/ l x)) (* t t))))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -8.3e+152)
(- t_2)
(if (<= t -7e-160)
t_1
(if (<= t -1.2e-185)
-1.0
(if (<= t 5.2e-198)
(/ (* t (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))) l)
(if (<= t 3.2e-160) 1.0 (if (<= t 3.8e+83) t_1 t_2))))))))
double code(double x, double l, double t) {
double t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t))));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -8.3e+152) {
tmp = -t_2;
} else if (t <= -7e-160) {
tmp = t_1;
} else if (t <= -1.2e-185) {
tmp = -1.0;
} else if (t <= 5.2e-198) {
tmp = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
} else if (t <= 3.2e-160) {
tmp = 1.0;
} else if (t <= 3.8e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (t * sqrt(2.0d0)) / sqrt((2.0d0 * ((l * (l / x)) + (t * t))))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-8.3d+152)) then
tmp = -t_2
else if (t <= (-7d-160)) then
tmp = t_1
else if (t <= (-1.2d-185)) then
tmp = -1.0d0
else if (t <= 5.2d-198) then
tmp = (t * sqrt((2.0d0 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))))) / l
else if (t <= 3.2d-160) then
tmp = 1.0d0
else if (t <= 3.8d+83) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * ((l * (l / x)) + (t * t))));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -8.3e+152) {
tmp = -t_2;
} else if (t <= -7e-160) {
tmp = t_1;
} else if (t <= -1.2e-185) {
tmp = -1.0;
} else if (t <= 5.2e-198) {
tmp = (t * Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
} else if (t <= 3.2e-160) {
tmp = 1.0;
} else if (t <= 3.8e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = (t * math.sqrt(2.0)) / math.sqrt((2.0 * ((l * (l / x)) + (t * t)))) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -8.3e+152: tmp = -t_2 elif t <= -7e-160: tmp = t_1 elif t <= -1.2e-185: tmp = -1.0 elif t <= 5.2e-198: tmp = (t * math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l elif t <= 3.2e-160: tmp = 1.0 elif t <= 3.8e+83: tmp = t_1 else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(Float64(l * Float64(l / x)) + Float64(t * t))))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -8.3e+152) tmp = Float64(-t_2); elseif (t <= -7e-160) tmp = t_1; elseif (t <= -1.2e-185) tmp = -1.0; elseif (t <= 5.2e-198) tmp = Float64(Float64(t * sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))) / l); elseif (t <= 3.2e-160) tmp = 1.0; elseif (t <= 3.8e+83) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((l * (l / x)) + (t * t)))); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -8.3e+152) tmp = -t_2; elseif (t <= -7e-160) tmp = t_1; elseif (t <= -1.2e-185) tmp = -1.0; elseif (t <= 5.2e-198) tmp = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l; elseif (t <= 3.2e-160) tmp = 1.0; elseif (t <= 3.8e+83) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -8.3e+152], (-t$95$2), If[LessEqual[t, -7e-160], t$95$1, If[LessEqual[t, -1.2e-185], -1.0, If[LessEqual[t, 5.2e-198], N[(N[(t * N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], If[LessEqual[t, 3.2e-160], 1.0, If[LessEqual[t, 3.8e+83], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\ell \cdot \frac{\ell}{x} + t \cdot t\right)}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -8.3 \cdot 10^{+152}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-198}:\\
\;\;\;\;\frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-160}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+83}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -8.3000000000000001e152Initial program 2.2%
associate-*l/2.2%
Simplified2.2%
Applied egg-rr91.0%
Taylor expanded in t around -inf 95.5%
mul-1-neg95.5%
sub-neg95.5%
metadata-eval95.5%
Simplified95.5%
if -8.3000000000000001e152 < t < -7.0000000000000006e-160 or 3.20000000000000009e-160 < t < 3.8000000000000002e83Initial program 55.3%
fma-neg55.4%
sqr-neg55.4%
fma-neg55.3%
sqr-neg55.3%
sqr-neg55.3%
sqr-neg55.3%
Simplified55.4%
Taylor expanded in x around inf 77.8%
distribute-lft-out77.8%
fma-def77.8%
unpow277.8%
unpow277.8%
unpow277.8%
Simplified77.8%
Taylor expanded in t around 0 77.2%
unpow277.2%
Simplified77.2%
Taylor expanded in l around 0 77.2%
unpow277.2%
associate-*l/87.9%
Simplified87.9%
if -7.0000000000000006e-160 < t < -1.2000000000000001e-185Initial program 9.5%
associate-*l/9.5%
Simplified9.5%
Applied egg-rr60.5%
Taylor expanded in t around inf 1.6%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt100.0%
Simplified100.0%
if -1.2000000000000001e-185 < t < 5.20000000000000014e-198Initial program 3.4%
associate-*l/3.4%
Simplified3.4%
Taylor expanded in l around inf 1.5%
associate--l+32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
Simplified32.8%
Taylor expanded in x around inf 44.1%
associate-*l/44.0%
*-commutative44.0%
+-commutative44.0%
Applied egg-rr44.0%
times-frac39.3%
+-commutative39.3%
Simplified39.3%
associate-*l/44.3%
sqrt-undiv44.3%
Applied egg-rr44.3%
if 5.20000000000000014e-198 < t < 3.20000000000000009e-160Initial program 12.4%
fma-neg12.4%
sqr-neg12.4%
fma-neg12.4%
sqr-neg12.4%
sqr-neg12.4%
sqr-neg12.4%
Simplified12.4%
Taylor expanded in x around inf 23.1%
distribute-lft-out23.1%
fma-def23.1%
unpow223.1%
unpow223.1%
unpow223.1%
Simplified23.1%
Taylor expanded in x around inf 88.5%
if 3.8000000000000002e83 < t Initial program 32.7%
associate-*l/32.7%
Simplified32.7%
Applied egg-rr96.4%
Taylor expanded in t around inf 98.2%
Final simplification86.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* t (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))) l))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.45e-72)
(- t_2)
(if (<= t -8.5e-112)
t_1
(if (<= t -3.45e-186)
-1.0
(if (<= t 3e-197)
t_1
(if (<= t 1e-122) 1.0 (if (<= t 3e-70) t_1 t_2))))))))
double code(double x, double l, double t) {
double t_1 = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.45e-72) {
tmp = -t_2;
} else if (t <= -8.5e-112) {
tmp = t_1;
} else if (t <= -3.45e-186) {
tmp = -1.0;
} else if (t <= 3e-197) {
tmp = t_1;
} else if (t <= 1e-122) {
tmp = 1.0;
} else if (t <= 3e-70) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (t * sqrt((2.0d0 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))))) / l
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-4.45d-72)) then
tmp = -t_2
else if (t <= (-8.5d-112)) then
tmp = t_1
else if (t <= (-3.45d-186)) then
tmp = -1.0d0
else if (t <= 3d-197) then
tmp = t_1
else if (t <= 1d-122) then
tmp = 1.0d0
else if (t <= 3d-70) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t * Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l;
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.45e-72) {
tmp = -t_2;
} else if (t <= -8.5e-112) {
tmp = t_1;
} else if (t <= -3.45e-186) {
tmp = -1.0;
} else if (t <= 3e-197) {
tmp = t_1;
} else if (t <= 1e-122) {
tmp = 1.0;
} else if (t <= 3e-70) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = (t * math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -4.45e-72: tmp = -t_2 elif t <= -8.5e-112: tmp = t_1 elif t <= -3.45e-186: tmp = -1.0 elif t <= 3e-197: tmp = t_1 elif t <= 1e-122: tmp = 1.0 elif t <= 3e-70: tmp = t_1 else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(Float64(t * sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))) / l) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.45e-72) tmp = Float64(-t_2); elseif (t <= -8.5e-112) tmp = t_1; elseif (t <= -3.45e-186) tmp = -1.0; elseif (t <= 3e-197) tmp = t_1; elseif (t <= 1e-122) tmp = 1.0; elseif (t <= 3e-70) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t * sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0)))))) / l; t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -4.45e-72) tmp = -t_2; elseif (t <= -8.5e-112) tmp = t_1; elseif (t <= -3.45e-186) tmp = -1.0; elseif (t <= 3e-197) tmp = t_1; elseif (t <= 1e-122) tmp = 1.0; elseif (t <= 3e-70) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.45e-72], (-t$95$2), If[LessEqual[t, -8.5e-112], t$95$1, If[LessEqual[t, -3.45e-186], -1.0, If[LessEqual[t, 3e-197], t$95$1, If[LessEqual[t, 1e-122], 1.0, If[LessEqual[t, 3e-70], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}}}{\ell}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.45 \cdot 10^{-186}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-122}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.4499999999999999e-72Initial program 36.5%
associate-*l/36.6%
Simplified36.6%
Applied egg-rr79.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
if -4.4499999999999999e-72 < t < -8.49999999999999992e-112 or -3.4500000000000001e-186 < t < 3.00000000000000026e-197 or 1.00000000000000006e-122 < t < 3.0000000000000001e-70Initial program 9.8%
associate-*l/9.9%
Simplified9.9%
Taylor expanded in l around inf 1.6%
associate--l+30.2%
sub-neg30.2%
metadata-eval30.2%
+-commutative30.2%
sub-neg30.2%
metadata-eval30.2%
+-commutative30.2%
Simplified30.2%
Taylor expanded in x around inf 47.7%
associate-*l/47.7%
*-commutative47.7%
+-commutative47.7%
Applied egg-rr47.7%
times-frac41.9%
+-commutative41.9%
Simplified41.9%
associate-*l/47.9%
sqrt-undiv48.0%
Applied egg-rr48.0%
if -8.49999999999999992e-112 < t < -3.4500000000000001e-186Initial program 31.6%
associate-*l/31.6%
Simplified31.6%
Applied egg-rr57.0%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt93.6%
Simplified93.6%
if 3.00000000000000026e-197 < t < 1.00000000000000006e-122Initial program 43.8%
fma-neg44.3%
sqr-neg44.3%
fma-neg43.8%
sqr-neg43.8%
sqr-neg43.8%
sqr-neg43.8%
Simplified44.3%
Taylor expanded in x around inf 52.2%
distribute-lft-out52.2%
fma-def52.2%
unpow252.2%
unpow252.2%
unpow252.2%
Simplified52.2%
Taylor expanded in x around inf 86.7%
if 3.0000000000000001e-70 < t Initial program 42.1%
associate-*l/42.1%
Simplified42.1%
Applied egg-rr82.6%
Taylor expanded in t around inf 88.7%
Final simplification78.9%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.45e-72)
(- t_1)
(if (<= t -7.8e-109)
(* (/ t l) (sqrt x))
(if (<= t -1.8e-185)
-1.0
(if (<= t 6.2e-197)
(* (sqrt (/ 2.0 (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))))) (/ t l))
t_1))))))
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.45e-72) {
tmp = -t_1;
} else if (t <= -7.8e-109) {
tmp = (t / l) * sqrt(x);
} else if (t <= -1.8e-185) {
tmp = -1.0;
} else if (t <= 6.2e-197) {
tmp = sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l);
} else {
tmp = 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 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-4.45d-72)) then
tmp = -t_1
else if (t <= (-7.8d-109)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-1.8d-185)) then
tmp = -1.0d0
else if (t <= 6.2d-197) then
tmp = sqrt((2.0d0 / ((1.0d0 / x) + (1.0d0 / (x + (-1.0d0)))))) * (t / l)
else
tmp = t_1
end if
code = tmp
end function
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 <= -4.45e-72) {
tmp = -t_1;
} else if (t <= -7.8e-109) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -1.8e-185) {
tmp = -1.0;
} else if (t <= 6.2e-197) {
tmp = Math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -4.45e-72: tmp = -t_1 elif t <= -7.8e-109: tmp = (t / l) * math.sqrt(x) elif t <= -1.8e-185: tmp = -1.0 elif t <= 6.2e-197: tmp = math.sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l) else: tmp = t_1 return tmp
function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.45e-72) tmp = Float64(-t_1); elseif (t <= -7.8e-109) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -1.8e-185) tmp = -1.0; elseif (t <= 6.2e-197) tmp = Float64(sqrt(Float64(2.0 / Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))))) * Float64(t / l)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -4.45e-72) tmp = -t_1; elseif (t <= -7.8e-109) tmp = (t / l) * sqrt(x); elseif (t <= -1.8e-185) tmp = -1.0; elseif (t <= 6.2e-197) tmp = sqrt((2.0 / ((1.0 / x) + (1.0 / (x + -1.0))))) * (t / l); else tmp = t_1; end tmp_2 = tmp; end
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, -4.45e-72], (-t$95$1), If[LessEqual[t, -7.8e-109], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-185], -1.0, If[LessEqual[t, 6.2e-197], N[(N[Sqrt[N[(2.0 / N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-197}:\\
\;\;\;\;\sqrt{\frac{2}{\frac{1}{x} + \frac{1}{x + -1}}} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.4499999999999999e-72Initial program 36.5%
associate-*l/36.6%
Simplified36.6%
Applied egg-rr79.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
if -4.4499999999999999e-72 < t < -7.80000000000000046e-109Initial program 17.2%
fma-neg17.2%
sqr-neg17.2%
fma-neg17.2%
sqr-neg17.2%
sqr-neg17.2%
sqr-neg17.2%
Simplified17.2%
Taylor expanded in x around inf 73.7%
distribute-lft-out73.7%
fma-def73.7%
unpow273.7%
unpow273.7%
unpow273.7%
Simplified73.7%
Taylor expanded in t around 0 51.1%
if -7.80000000000000046e-109 < t < -1.7999999999999999e-185Initial program 31.6%
associate-*l/31.6%
Simplified31.6%
Applied egg-rr57.0%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt93.6%
Simplified93.6%
if -1.7999999999999999e-185 < t < 6.20000000000000057e-197Initial program 3.4%
associate-*l/3.4%
Simplified3.4%
Taylor expanded in l around inf 1.5%
associate--l+32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
sub-neg32.8%
metadata-eval32.8%
+-commutative32.8%
Simplified32.8%
Taylor expanded in x around inf 44.1%
associate-*l/44.0%
*-commutative44.0%
+-commutative44.0%
Applied egg-rr44.0%
times-frac39.3%
+-commutative39.3%
Simplified39.3%
expm1-log1p-u39.0%
expm1-udef33.3%
sqrt-undiv33.3%
Applied egg-rr33.3%
expm1-def39.1%
expm1-log1p39.3%
Simplified39.3%
if 6.20000000000000057e-197 < t Initial program 40.8%
associate-*l/40.8%
Simplified40.8%
Applied egg-rr76.6%
Taylor expanded in t around inf 83.2%
Final simplification77.2%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))))
(if (<= t -4.4e-72)
(- (+ -1.0 (/ 1.0 x)) (/ 0.5 (* x x)))
(if (<= t -7.8e-109)
t_1
(if (<= t -1.9e-185)
-1.0
(if (<= t 1.12e-197) t_1 (sqrt (/ (+ x -1.0) (+ x 1.0)))))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double tmp;
if (t <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -7.8e-109) {
tmp = t_1;
} else if (t <= -1.9e-185) {
tmp = -1.0;
} else if (t <= 1.12e-197) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (x + 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) :: t_1
real(8) :: tmp
t_1 = (t / l) * sqrt(x)
if (t <= (-4.4d-72)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - (0.5d0 / (x * x))
else if (t <= (-7.8d-109)) then
tmp = t_1
else if (t <= (-1.9d-185)) then
tmp = -1.0d0
else if (t <= 1.12d-197) then
tmp = t_1
else
tmp = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double tmp;
if (t <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x));
} else if (t <= -7.8e-109) {
tmp = t_1;
} else if (t <= -1.9e-185) {
tmp = -1.0;
} else if (t <= 1.12e-197) {
tmp = t_1;
} else {
tmp = Math.sqrt(((x + -1.0) / (x + 1.0)));
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) tmp = 0 if t <= -4.4e-72: tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)) elif t <= -7.8e-109: tmp = t_1 elif t <= -1.9e-185: tmp = -1.0 elif t <= 1.12e-197: tmp = t_1 else: tmp = math.sqrt(((x + -1.0) / (x + 1.0))) return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - Float64(0.5 / Float64(x * x))); elseif (t <= -7.8e-109) tmp = t_1; elseif (t <= -1.9e-185) tmp = -1.0; elseif (t <= 1.12e-197) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); tmp = 0.0; if (t <= -4.4e-72) tmp = (-1.0 + (1.0 / x)) - (0.5 / (x * x)); elseif (t <= -7.8e-109) tmp = t_1; elseif (t <= -1.9e-185) tmp = -1.0; elseif (t <= 1.12e-197) tmp = t_1; else tmp = sqrt(((x + -1.0) / (x + 1.0))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-109], t$95$1, If[LessEqual[t, -1.9e-185], -1.0, If[LessEqual[t, 1.12e-197], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-185}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{x + 1}}\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
associate-*l/36.6%
Simplified36.6%
Taylor expanded in t around -inf 84.0%
mul-1-neg84.0%
*-commutative84.0%
distribute-rgt-neg-in84.0%
+-commutative84.0%
sub-neg84.0%
metadata-eval84.0%
+-commutative84.0%
distribute-rgt-neg-in84.0%
Simplified84.0%
Taylor expanded in x around inf 83.4%
associate--r+83.4%
sub-neg83.4%
metadata-eval83.4%
associate-*r/83.4%
metadata-eval83.4%
unpow283.4%
Simplified83.4%
if -4.40000000000000005e-72 < t < -7.80000000000000046e-109 or -1.9e-185 < t < 1.12e-197Initial program 7.1%
fma-neg7.2%
sqr-neg7.2%
fma-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
Simplified7.2%
Taylor expanded in x around inf 65.0%
distribute-lft-out65.0%
fma-def65.0%
unpow265.0%
unpow265.0%
unpow265.0%
Simplified65.0%
Taylor expanded in t around 0 42.5%
if -7.80000000000000046e-109 < t < -1.9e-185Initial program 31.6%
associate-*l/31.6%
Simplified31.6%
Applied egg-rr57.0%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt93.6%
Simplified93.6%
if 1.12e-197 < t Initial program 40.8%
associate-*l/40.8%
Simplified40.8%
Applied egg-rr76.6%
Taylor expanded in t around inf 83.2%
Final simplification76.9%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -4.45e-72)
(- t_2)
(if (<= t -7.8e-109)
t_1
(if (<= t -2.6e-182) -1.0 (if (<= t 3.5e-197) t_1 t_2))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.45e-72) {
tmp = -t_2;
} else if (t <= -7.8e-109) {
tmp = t_1;
} else if (t <= -2.6e-182) {
tmp = -1.0;
} else if (t <= 3.5e-197) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (t / l) * sqrt(x)
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-4.45d-72)) then
tmp = -t_2
else if (t <= (-7.8d-109)) then
tmp = t_1
else if (t <= (-2.6d-182)) then
tmp = -1.0d0
else if (t <= 3.5d-197) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -4.45e-72) {
tmp = -t_2;
} else if (t <= -7.8e-109) {
tmp = t_1;
} else if (t <= -2.6e-182) {
tmp = -1.0;
} else if (t <= 3.5e-197) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -4.45e-72: tmp = -t_2 elif t <= -7.8e-109: tmp = t_1 elif t <= -2.6e-182: tmp = -1.0 elif t <= 3.5e-197: tmp = t_1 else: tmp = t_2 return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -4.45e-72) tmp = Float64(-t_2); elseif (t <= -7.8e-109) tmp = t_1; elseif (t <= -2.6e-182) tmp = -1.0; elseif (t <= 3.5e-197) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -4.45e-72) tmp = -t_2; elseif (t <= -7.8e-109) tmp = t_1; elseif (t <= -2.6e-182) tmp = -1.0; elseif (t <= 3.5e-197) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.45e-72], (-t$95$2), If[LessEqual[t, -7.8e-109], t$95$1, If[LessEqual[t, -2.6e-182], -1.0, If[LessEqual[t, 3.5e-197], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-72}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-182}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.4499999999999999e-72Initial program 36.5%
associate-*l/36.6%
Simplified36.6%
Applied egg-rr79.4%
Taylor expanded in t around -inf 84.4%
mul-1-neg84.4%
sub-neg84.4%
metadata-eval84.4%
Simplified84.4%
if -4.4499999999999999e-72 < t < -7.80000000000000046e-109 or -2.60000000000000006e-182 < t < 3.4999999999999998e-197Initial program 7.1%
fma-neg7.2%
sqr-neg7.2%
fma-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
Simplified7.2%
Taylor expanded in x around inf 65.0%
distribute-lft-out65.0%
fma-def65.0%
unpow265.0%
unpow265.0%
unpow265.0%
Simplified65.0%
Taylor expanded in t around 0 42.5%
if -7.80000000000000046e-109 < t < -2.60000000000000006e-182Initial program 31.6%
associate-*l/31.6%
Simplified31.6%
Applied egg-rr57.0%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt93.6%
Simplified93.6%
if 3.4999999999999998e-197 < t Initial program 40.8%
associate-*l/40.8%
Simplified40.8%
Applied egg-rr76.6%
Taylor expanded in t around inf 83.2%
Final simplification77.2%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (/ 0.5 (* x x))))
(if (<= t -4.4e-72)
(- (+ -1.0 (/ 1.0 x)) t_2)
(if (<= t -2.4e-114)
t_1
(if (<= t -9e-183)
-1.0
(if (<= t 1.2e-196) t_1 (+ 1.0 (+ t_2 (/ -1.0 x)))))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double t_2 = 0.5 / (x * x);
double tmp;
if (t <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - t_2;
} else if (t <= -2.4e-114) {
tmp = t_1;
} else if (t <= -9e-183) {
tmp = -1.0;
} else if (t <= 1.2e-196) {
tmp = t_1;
} else {
tmp = 1.0 + (t_2 + (-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 = (t / l) * sqrt(x)
t_2 = 0.5d0 / (x * x)
if (t <= (-4.4d-72)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - t_2
else if (t <= (-2.4d-114)) then
tmp = t_1
else if (t <= (-9d-183)) then
tmp = -1.0d0
else if (t <= 1.2d-196) then
tmp = t_1
else
tmp = 1.0d0 + (t_2 + ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double t_2 = 0.5 / (x * x);
double tmp;
if (t <= -4.4e-72) {
tmp = (-1.0 + (1.0 / x)) - t_2;
} else if (t <= -2.4e-114) {
tmp = t_1;
} else if (t <= -9e-183) {
tmp = -1.0;
} else if (t <= 1.2e-196) {
tmp = t_1;
} else {
tmp = 1.0 + (t_2 + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) t_2 = 0.5 / (x * x) tmp = 0 if t <= -4.4e-72: tmp = (-1.0 + (1.0 / x)) - t_2 elif t <= -2.4e-114: tmp = t_1 elif t <= -9e-183: tmp = -1.0 elif t <= 1.2e-196: tmp = t_1 else: tmp = 1.0 + (t_2 + (-1.0 / x)) return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) t_2 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -4.4e-72) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - t_2); elseif (t <= -2.4e-114) tmp = t_1; elseif (t <= -9e-183) tmp = -1.0; elseif (t <= 1.2e-196) tmp = t_1; else tmp = Float64(1.0 + Float64(t_2 + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); t_2 = 0.5 / (x * x); tmp = 0.0; if (t <= -4.4e-72) tmp = (-1.0 + (1.0 / x)) - t_2; elseif (t <= -2.4e-114) tmp = t_1; elseif (t <= -9e-183) tmp = -1.0; elseif (t <= 1.2e-196) tmp = t_1; else tmp = 1.0 + (t_2 + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e-72], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, -2.4e-114], t$95$1, If[LessEqual[t, -9e-183], -1.0, If[LessEqual[t, 1.2e-196], t$95$1, N[(1.0 + N[(t$95$2 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-72}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - t_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-183}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_2 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -4.40000000000000005e-72Initial program 36.5%
associate-*l/36.6%
Simplified36.6%
Taylor expanded in t around -inf 84.0%
mul-1-neg84.0%
*-commutative84.0%
distribute-rgt-neg-in84.0%
+-commutative84.0%
sub-neg84.0%
metadata-eval84.0%
+-commutative84.0%
distribute-rgt-neg-in84.0%
Simplified84.0%
Taylor expanded in x around inf 83.4%
associate--r+83.4%
sub-neg83.4%
metadata-eval83.4%
associate-*r/83.4%
metadata-eval83.4%
unpow283.4%
Simplified83.4%
if -4.40000000000000005e-72 < t < -2.4000000000000001e-114 or -8.99999999999999942e-183 < t < 1.2000000000000001e-196Initial program 7.1%
fma-neg7.2%
sqr-neg7.2%
fma-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
sqr-neg7.1%
Simplified7.2%
Taylor expanded in x around inf 65.0%
distribute-lft-out65.0%
fma-def65.0%
unpow265.0%
unpow265.0%
unpow265.0%
Simplified65.0%
Taylor expanded in t around 0 42.5%
if -2.4000000000000001e-114 < t < -8.99999999999999942e-183Initial program 31.6%
associate-*l/31.6%
Simplified31.6%
Applied egg-rr57.0%
Taylor expanded in t around inf 1.7%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt93.6%
Simplified93.6%
if 1.2000000000000001e-196 < t Initial program 40.8%
associate-*l/40.8%
Simplified40.8%
Applied egg-rr76.6%
Taylor expanded in t around inf 83.2%
Taylor expanded in x around inf 82.6%
associate--l+82.6%
associate-*r/82.6%
metadata-eval82.6%
unpow282.6%
Simplified82.6%
Final simplification76.6%
(FPCore (x l t) :precision binary64 (if (<= t -1e-309) (+ -1.0 (/ 1.0 x)) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-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 <= (-1d-309)) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-309) tmp = -1.0 + (1.0 / x); else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
associate-*l/29.6%
Simplified29.6%
Taylor expanded in t around -inf 72.1%
mul-1-neg72.1%
*-commutative72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
sub-neg72.1%
metadata-eval72.1%
+-commutative72.1%
distribute-rgt-neg-in72.1%
Simplified72.1%
Taylor expanded in x around inf 71.3%
if -1.000000000000002e-309 < t Initial program 36.8%
associate-*l/36.9%
Simplified36.9%
Applied egg-rr74.3%
Taylor expanded in t around inf 77.6%
Taylor expanded in x around inf 77.1%
associate--l+77.1%
associate-*r/77.1%
metadata-eval77.1%
unpow277.1%
Simplified77.1%
Final simplification74.0%
(FPCore (x l t) :precision binary64 (let* ((t_1 (/ 0.5 (* x x)))) (if (<= t -1e-309) (- (+ -1.0 (/ 1.0 x)) t_1) (+ 1.0 (+ t_1 (/ -1.0 x))))))
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= -1e-309) {
tmp = (-1.0 + (1.0 / x)) - t_1;
} else {
tmp = 1.0 + (t_1 + (-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) :: tmp
t_1 = 0.5d0 / (x * x)
if (t <= (-1d-309)) then
tmp = ((-1.0d0) + (1.0d0 / x)) - t_1
else
tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
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 <= -1e-309) {
tmp = (-1.0 + (1.0 / x)) - t_1;
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= -1e-309: tmp = (-1.0 + (1.0 / x)) - t_1 else: tmp = 1.0 + (t_1 + (-1.0 / x)) return tmp
function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= -1e-309) tmp = Float64(Float64(-1.0 + Float64(1.0 / x)) - t_1); else tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= -1e-309) tmp = (-1.0 + (1.0 / x)) - t_1; else tmp = 1.0 + (t_1 + (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-309], N[(N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\left(-1 + \frac{1}{x}\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
associate-*l/29.6%
Simplified29.6%
Taylor expanded in t around -inf 72.1%
mul-1-neg72.1%
*-commutative72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
sub-neg72.1%
metadata-eval72.1%
+-commutative72.1%
distribute-rgt-neg-in72.1%
Simplified72.1%
Taylor expanded in x around inf 71.8%
associate--r+71.8%
sub-neg71.8%
metadata-eval71.8%
associate-*r/71.8%
metadata-eval71.8%
unpow271.8%
Simplified71.8%
if -1.000000000000002e-309 < t Initial program 36.8%
associate-*l/36.9%
Simplified36.9%
Applied egg-rr74.3%
Taylor expanded in t around inf 77.6%
Taylor expanded in x around inf 77.1%
associate--l+77.1%
associate-*r/77.1%
metadata-eval77.1%
unpow277.1%
Simplified77.1%
Final simplification74.3%
(FPCore (x l t) :precision binary64 (if (<= t -1e-309) -1.0 (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
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 <= (-1d-309)) 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 <= -1e-309) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-309) 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 <= -1e-309) tmp = -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
associate-*l/29.6%
Simplified29.6%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt70.0%
Simplified70.0%
if -1.000000000000002e-309 < t Initial program 36.8%
associate-*l/36.9%
Simplified36.9%
Applied egg-rr74.3%
Taylor expanded in t around inf 77.6%
Taylor expanded in x around inf 77.1%
Final simplification73.3%
(FPCore (x l t) :precision binary64 (if (<= t -1e-309) (+ -1.0 (/ 1.0 x)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
tmp = -1.0 + (1.0 / x);
} 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 <= (-1d-309)) then
tmp = (-1.0d0) + (1.0d0 / x)
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 <= -1e-309) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = Float64(-1.0 + Float64(1.0 / x)); 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 <= -1e-309) tmp = -1.0 + (1.0 / x); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
associate-*l/29.6%
Simplified29.6%
Taylor expanded in t around -inf 72.1%
mul-1-neg72.1%
*-commutative72.1%
distribute-rgt-neg-in72.1%
+-commutative72.1%
sub-neg72.1%
metadata-eval72.1%
+-commutative72.1%
distribute-rgt-neg-in72.1%
Simplified72.1%
Taylor expanded in x around inf 71.3%
if -1.000000000000002e-309 < t Initial program 36.8%
associate-*l/36.9%
Simplified36.9%
Applied egg-rr74.3%
Taylor expanded in t around inf 77.6%
Taylor expanded in x around inf 77.1%
Final simplification74.0%
(FPCore (x l t) :precision binary64 (if (<= t -1e-309) -1.0 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
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 <= (-1d-309)) 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 <= -1e-309) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], -1.0, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 29.6%
associate-*l/29.6%
Simplified29.6%
Applied egg-rr67.6%
Taylor expanded in t around inf 1.8%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt70.0%
Simplified70.0%
if -1.000000000000002e-309 < t Initial program 36.8%
fma-neg36.9%
sqr-neg36.9%
fma-neg36.8%
sqr-neg36.8%
sqr-neg36.8%
sqr-neg36.8%
Simplified36.8%
Taylor expanded in x around inf 52.0%
distribute-lft-out52.0%
fma-def52.0%
unpow252.0%
unpow252.0%
unpow252.0%
Simplified52.0%
Taylor expanded in x around inf 76.5%
Final simplification73.0%
(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 33.0%
associate-*l/33.0%
Simplified33.0%
Applied egg-rr70.7%
Taylor expanded in t around inf 37.1%
Taylor expanded in x around -inf 0.0%
unpow20.0%
rem-square-sqrt38.3%
Simplified38.3%
Final simplification38.3%
herbie shell --seed 2023297
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))