
(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}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (pow t 2.0)))
(t_2 (+ (* 2.0 (/ (pow t 2.0) x)) (+ t_1 (/ (pow l 2.0) x))))
(t_3 (+ t_1 (pow l 2.0)))
(t_4 (/ t_3 x)))
(if (<= t -3.2e+64)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (pow x 2.0))))
(if (<= t -5e-125)
(/ t (/ (sqrt (+ (+ (/ (+ t_3 t_3) (pow x 2.0)) t_2) t_4)) (sqrt 2.0)))
(if (<= t 1.62e-198)
(* (/ 1.0 l) (/ t (pow x -0.5)))
(if (<= t 4.6e+35)
(/ t (/ (sqrt (+ t_2 t_4)) (sqrt 2.0)))
(sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * pow(t, 2.0);
double t_2 = (2.0 * (pow(t, 2.0) / x)) + (t_1 + (pow(l, 2.0) / x));
double t_3 = t_1 + pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -3.2e+64) {
tmp = (1.0 / x) + (-1.0 - (0.5 / pow(x, 2.0)));
} else if (t <= -5e-125) {
tmp = t / (sqrt(((((t_3 + t_3) / pow(x, 2.0)) + t_2) + t_4)) / sqrt(2.0));
} else if (t <= 1.62e-198) {
tmp = (1.0 / l) * (t / pow(x, -0.5));
} else if (t <= 4.6e+35) {
tmp = t / (sqrt((t_2 + t_4)) / sqrt(2.0));
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 2.0d0 * (t ** 2.0d0)
t_2 = (2.0d0 * ((t ** 2.0d0) / x)) + (t_1 + ((l ** 2.0d0) / x))
t_3 = t_1 + (l ** 2.0d0)
t_4 = t_3 / x
if (t <= (-3.2d+64)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x ** 2.0d0)))
else if (t <= (-5d-125)) then
tmp = t / (sqrt(((((t_3 + t_3) / (x ** 2.0d0)) + t_2) + t_4)) / sqrt(2.0d0))
else if (t <= 1.62d-198) then
tmp = (1.0d0 / l) * (t / (x ** (-0.5d0)))
else if (t <= 4.6d+35) then
tmp = t / (sqrt((t_2 + t_4)) / sqrt(2.0d0))
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 2.0 * Math.pow(t, 2.0);
double t_2 = (2.0 * (Math.pow(t, 2.0) / x)) + (t_1 + (Math.pow(l, 2.0) / x));
double t_3 = t_1 + Math.pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -3.2e+64) {
tmp = (1.0 / x) + (-1.0 - (0.5 / Math.pow(x, 2.0)));
} else if (t <= -5e-125) {
tmp = t / (Math.sqrt(((((t_3 + t_3) / Math.pow(x, 2.0)) + t_2) + t_4)) / Math.sqrt(2.0));
} else if (t <= 1.62e-198) {
tmp = (1.0 / l) * (t / Math.pow(x, -0.5));
} else if (t <= 4.6e+35) {
tmp = t / (Math.sqrt((t_2 + t_4)) / Math.sqrt(2.0));
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 2.0 * math.pow(t, 2.0) t_2 = (2.0 * (math.pow(t, 2.0) / x)) + (t_1 + (math.pow(l, 2.0) / x)) t_3 = t_1 + math.pow(l, 2.0) t_4 = t_3 / x tmp = 0 if t <= -3.2e+64: tmp = (1.0 / x) + (-1.0 - (0.5 / math.pow(x, 2.0))) elif t <= -5e-125: tmp = t / (math.sqrt(((((t_3 + t_3) / math.pow(x, 2.0)) + t_2) + t_4)) / math.sqrt(2.0)) elif t <= 1.62e-198: tmp = (1.0 / l) * (t / math.pow(x, -0.5)) elif t <= 4.6e+35: tmp = t / (math.sqrt((t_2 + t_4)) / math.sqrt(2.0)) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * (t ^ 2.0)) t_2 = Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(t_1 + Float64((l ^ 2.0) / x))) t_3 = Float64(t_1 + (l ^ 2.0)) t_4 = Float64(t_3 / x) tmp = 0.0 if (t <= -3.2e+64) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / (x ^ 2.0)))); elseif (t <= -5e-125) tmp = Float64(t / Float64(sqrt(Float64(Float64(Float64(Float64(t_3 + t_3) / (x ^ 2.0)) + t_2) + t_4)) / sqrt(2.0))); elseif (t <= 1.62e-198) tmp = Float64(Float64(1.0 / l) * Float64(t / (x ^ -0.5))); elseif (t <= 4.6e+35) tmp = Float64(t / Float64(sqrt(Float64(t_2 + t_4)) / sqrt(2.0))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 2.0 * (t ^ 2.0); t_2 = (2.0 * ((t ^ 2.0) / x)) + (t_1 + ((l ^ 2.0) / x)); t_3 = t_1 + (l ^ 2.0); t_4 = t_3 / x; tmp = 0.0; if (t <= -3.2e+64) tmp = (1.0 / x) + (-1.0 - (0.5 / (x ^ 2.0))); elseif (t <= -5e-125) tmp = t / (sqrt(((((t_3 + t_3) / (x ^ 2.0)) + t_2) + t_4)) / sqrt(2.0)); elseif (t <= 1.62e-198) tmp = (1.0 / l) * (t / (x ^ -0.5)); elseif (t <= 4.6e+35) tmp = t / (sqrt((t_2 + t_4)) / sqrt(2.0)); else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / x), $MachinePrecision]}, If[LessEqual[t, -3.2e+64], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-125], N[(t / N[(N[Sqrt[N[(N[(N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.62e-198], N[(N[(1.0 / l), $MachinePrecision] * N[(t / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+35], N[(t / N[(N[Sqrt[N[(t$95$2 + t$95$4), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot {t}^{2}\\
t_2 := 2 \cdot \frac{{t}^{2}}{x} + \left(t_1 + \frac{{\ell}^{2}}{x}\right)\\
t_3 := t_1 + {\ell}^{2}\\
t_4 := \frac{t_3}{x}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{{x}^{2}}\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-125}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\left(\frac{t_3 + t_3}{{x}^{2}} + t_2\right) + t_4}}{\sqrt{2}}}\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-198}:\\
\;\;\;\;\frac{1}{\ell} \cdot \frac{t}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{t_2 + t_4}}{\sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -3.20000000000000019e64Initial program 27.6%
Simplified27.5%
Taylor expanded in t around -inf 89.3%
associate-*r*89.3%
neg-mul-189.3%
distribute-rgt-neg-out89.3%
+-commutative89.3%
sub-neg89.3%
metadata-eval89.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in x around inf 89.4%
associate-*r/89.4%
metadata-eval89.4%
Simplified89.4%
if -3.20000000000000019e64 < t < -4.99999999999999967e-125Initial program 48.3%
Simplified48.4%
Taylor expanded in x around -inf 89.5%
if -4.99999999999999967e-125 < t < 1.62e-198Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 58.4%
Taylor expanded in l around inf 47.9%
Taylor expanded in l around 0 47.9%
*-un-lft-identity47.9%
inv-pow47.9%
sqrt-pow147.9%
metadata-eval47.9%
times-frac48.1%
Applied egg-rr48.1%
if 1.62e-198 < t < 4.5999999999999996e35Initial program 50.8%
Simplified50.9%
Taylor expanded in x around inf 88.4%
if 4.5999999999999996e35 < t Initial program 41.0%
Simplified40.9%
Taylor expanded in t around inf 92.9%
+-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
Simplified92.9%
Taylor expanded in t around 0 92.9%
Final simplification81.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (pow t 2.0))) (t_2 (/ (pow l 2.0) x)))
(if (<= t -1.86e+65)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (pow x 2.0))))
(if (<= t -5e-125)
(/
(* t (sqrt 2.0))
(sqrt (* 2.0 (+ t_2 (* (pow t 2.0) (/ (+ 1.0 x) (+ x -1.0)))))))
(if (<= t 1.62e-198)
(* (/ 1.0 l) (/ t (pow x -0.5)))
(if (<= t 2.9e+35)
(/
t
(/
(sqrt
(+
(+ (* 2.0 (/ (pow t 2.0) x)) (+ t_1 t_2))
(/ (+ t_1 (pow l 2.0)) x)))
(sqrt 2.0)))
(sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = 2.0 * pow(t, 2.0);
double t_2 = pow(l, 2.0) / x;
double tmp;
if (t <= -1.86e+65) {
tmp = (1.0 / x) + (-1.0 - (0.5 / pow(x, 2.0)));
} else if (t <= -5e-125) {
tmp = (t * sqrt(2.0)) / sqrt((2.0 * (t_2 + (pow(t, 2.0) * ((1.0 + x) / (x + -1.0))))));
} else if (t <= 1.62e-198) {
tmp = (1.0 / l) * (t / pow(x, -0.5));
} else if (t <= 2.9e+35) {
tmp = t / (sqrt((((2.0 * (pow(t, 2.0) / x)) + (t_1 + t_2)) + ((t_1 + pow(l, 2.0)) / x))) / sqrt(2.0));
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (t ** 2.0d0)
t_2 = (l ** 2.0d0) / x
if (t <= (-1.86d+65)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x ** 2.0d0)))
else if (t <= (-5d-125)) then
tmp = (t * sqrt(2.0d0)) / sqrt((2.0d0 * (t_2 + ((t ** 2.0d0) * ((1.0d0 + x) / (x + (-1.0d0)))))))
else if (t <= 1.62d-198) then
tmp = (1.0d0 / l) * (t / (x ** (-0.5d0)))
else if (t <= 2.9d+35) then
tmp = t / (sqrt((((2.0d0 * ((t ** 2.0d0) / x)) + (t_1 + t_2)) + ((t_1 + (l ** 2.0d0)) / x))) / sqrt(2.0d0))
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 2.0 * Math.pow(t, 2.0);
double t_2 = Math.pow(l, 2.0) / x;
double tmp;
if (t <= -1.86e+65) {
tmp = (1.0 / x) + (-1.0 - (0.5 / Math.pow(x, 2.0)));
} else if (t <= -5e-125) {
tmp = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * (t_2 + (Math.pow(t, 2.0) * ((1.0 + x) / (x + -1.0))))));
} else if (t <= 1.62e-198) {
tmp = (1.0 / l) * (t / Math.pow(x, -0.5));
} else if (t <= 2.9e+35) {
tmp = t / (Math.sqrt((((2.0 * (Math.pow(t, 2.0) / x)) + (t_1 + t_2)) + ((t_1 + Math.pow(l, 2.0)) / x))) / Math.sqrt(2.0));
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 2.0 * math.pow(t, 2.0) t_2 = math.pow(l, 2.0) / x tmp = 0 if t <= -1.86e+65: tmp = (1.0 / x) + (-1.0 - (0.5 / math.pow(x, 2.0))) elif t <= -5e-125: tmp = (t * math.sqrt(2.0)) / math.sqrt((2.0 * (t_2 + (math.pow(t, 2.0) * ((1.0 + x) / (x + -1.0)))))) elif t <= 1.62e-198: tmp = (1.0 / l) * (t / math.pow(x, -0.5)) elif t <= 2.9e+35: tmp = t / (math.sqrt((((2.0 * (math.pow(t, 2.0) / x)) + (t_1 + t_2)) + ((t_1 + math.pow(l, 2.0)) / x))) / math.sqrt(2.0)) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(2.0 * (t ^ 2.0)) t_2 = Float64((l ^ 2.0) / x) tmp = 0.0 if (t <= -1.86e+65) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / (x ^ 2.0)))); elseif (t <= -5e-125) tmp = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(t_2 + Float64((t ^ 2.0) * Float64(Float64(1.0 + x) / Float64(x + -1.0))))))); elseif (t <= 1.62e-198) tmp = Float64(Float64(1.0 / l) * Float64(t / (x ^ -0.5))); elseif (t <= 2.9e+35) tmp = Float64(t / Float64(sqrt(Float64(Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(t_1 + t_2)) + Float64(Float64(t_1 + (l ^ 2.0)) / x))) / sqrt(2.0))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 2.0 * (t ^ 2.0); t_2 = (l ^ 2.0) / x; tmp = 0.0; if (t <= -1.86e+65) tmp = (1.0 / x) + (-1.0 - (0.5 / (x ^ 2.0))); elseif (t <= -5e-125) tmp = (t * sqrt(2.0)) / sqrt((2.0 * (t_2 + ((t ^ 2.0) * ((1.0 + x) / (x + -1.0)))))); elseif (t <= 1.62e-198) tmp = (1.0 / l) * (t / (x ^ -0.5)); elseif (t <= 2.9e+35) tmp = t / (sqrt((((2.0 * ((t ^ 2.0) / x)) + (t_1 + t_2)) + ((t_1 + (l ^ 2.0)) / x))) / sqrt(2.0)); else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -1.86e+65], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-125], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(t$95$2 + N[(N[Power[t, 2.0], $MachinePrecision] * N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.62e-198], N[(N[(1.0 / l), $MachinePrecision] * N[(t / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+35], N[(t / N[(N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot {t}^{2}\\
t_2 := \frac{{\ell}^{2}}{x}\\
\mathbf{if}\;t \leq -1.86 \cdot 10^{+65}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{{x}^{2}}\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-125}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(t_2 + {t}^{2} \cdot \frac{1 + x}{x + -1}\right)}}\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-198}:\\
\;\;\;\;\frac{1}{\ell} \cdot \frac{t}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+35}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(t_1 + t_2\right)\right) + \frac{t_1 + {\ell}^{2}}{x}}}{\sqrt{2}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.8599999999999999e65Initial program 27.6%
Simplified27.5%
Taylor expanded in t around -inf 89.3%
associate-*r*89.3%
neg-mul-189.3%
distribute-rgt-neg-out89.3%
+-commutative89.3%
sub-neg89.3%
metadata-eval89.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in x around inf 89.4%
associate-*r/89.4%
metadata-eval89.4%
Simplified89.4%
if -1.8599999999999999e65 < t < -4.99999999999999967e-125Initial program 48.3%
Simplified48.2%
Taylor expanded in l around 0 66.9%
fma-def66.9%
+-commutative66.9%
associate-*r/66.9%
sub-neg66.9%
metadata-eval66.9%
+-commutative66.9%
associate--l+70.7%
sub-neg70.7%
metadata-eval70.7%
+-commutative70.7%
sub-neg70.7%
metadata-eval70.7%
+-commutative70.7%
Simplified70.7%
Taylor expanded in x around inf 89.2%
associate-*r/89.4%
associate-*r/89.4%
+-commutative89.4%
Applied egg-rr89.4%
expm1-log1p-u86.7%
expm1-udef36.5%
associate-/l*36.5%
Applied egg-rr36.5%
expm1-def86.7%
expm1-log1p89.4%
fma-udef89.4%
distribute-lft-out89.4%
associate-/l*89.4%
associate-*r/89.4%
+-commutative89.4%
Simplified89.4%
if -4.99999999999999967e-125 < t < 1.62e-198Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 58.4%
Taylor expanded in l around inf 47.9%
Taylor expanded in l around 0 47.9%
*-un-lft-identity47.9%
inv-pow47.9%
sqrt-pow147.9%
metadata-eval47.9%
times-frac48.1%
Applied egg-rr48.1%
if 1.62e-198 < t < 2.89999999999999995e35Initial program 50.8%
Simplified50.9%
Taylor expanded in x around inf 88.4%
if 2.89999999999999995e35 < t Initial program 41.0%
Simplified40.9%
Taylor expanded in t around inf 92.9%
+-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
Simplified92.9%
Taylor expanded in t around 0 92.9%
Final simplification81.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1
(/
(* t (sqrt 2.0))
(sqrt
(*
2.0
(+ (/ (pow l 2.0) x) (* (pow t 2.0) (/ (+ 1.0 x) (+ x -1.0)))))))))
(if (<= t -1.35e+63)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (pow x 2.0))))
(if (<= t -4.5e-125)
t_1
(if (<= t 3e-188)
(* (/ 1.0 l) (/ t (pow x -0.5)))
(if (<= t 4e+35) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (t * sqrt(2.0)) / sqrt((2.0 * ((pow(l, 2.0) / x) + (pow(t, 2.0) * ((1.0 + x) / (x + -1.0))))));
double tmp;
if (t <= -1.35e+63) {
tmp = (1.0 / x) + (-1.0 - (0.5 / pow(x, 2.0)));
} else if (t <= -4.5e-125) {
tmp = t_1;
} else if (t <= 3e-188) {
tmp = (1.0 / l) * (t / pow(x, -0.5));
} else if (t <= 4e+35) {
tmp = t_1;
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t * sqrt(2.0d0)) / sqrt((2.0d0 * (((l ** 2.0d0) / x) + ((t ** 2.0d0) * ((1.0d0 + x) / (x + (-1.0d0)))))))
if (t <= (-1.35d+63)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x ** 2.0d0)))
else if (t <= (-4.5d-125)) then
tmp = t_1
else if (t <= 3d-188) then
tmp = (1.0d0 / l) * (t / (x ** (-0.5d0)))
else if (t <= 4d+35) then
tmp = t_1
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = (t * Math.sqrt(2.0)) / Math.sqrt((2.0 * ((Math.pow(l, 2.0) / x) + (Math.pow(t, 2.0) * ((1.0 + x) / (x + -1.0))))));
double tmp;
if (t <= -1.35e+63) {
tmp = (1.0 / x) + (-1.0 - (0.5 / Math.pow(x, 2.0)));
} else if (t <= -4.5e-125) {
tmp = t_1;
} else if (t <= 3e-188) {
tmp = (1.0 / l) * (t / Math.pow(x, -0.5));
} else if (t <= 4e+35) {
tmp = t_1;
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (t * math.sqrt(2.0)) / math.sqrt((2.0 * ((math.pow(l, 2.0) / x) + (math.pow(t, 2.0) * ((1.0 + x) / (x + -1.0)))))) tmp = 0 if t <= -1.35e+63: tmp = (1.0 / x) + (-1.0 - (0.5 / math.pow(x, 2.0))) elif t <= -4.5e-125: tmp = t_1 elif t <= 3e-188: tmp = (1.0 / l) * (t / math.pow(x, -0.5)) elif t <= 4e+35: tmp = t_1 else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(t * sqrt(2.0)) / sqrt(Float64(2.0 * Float64(Float64((l ^ 2.0) / x) + Float64((t ^ 2.0) * Float64(Float64(1.0 + x) / Float64(x + -1.0))))))) tmp = 0.0 if (t <= -1.35e+63) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / (x ^ 2.0)))); elseif (t <= -4.5e-125) tmp = t_1; elseif (t <= 3e-188) tmp = Float64(Float64(1.0 / l) * Float64(t / (x ^ -0.5))); elseif (t <= 4e+35) tmp = t_1; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (t * sqrt(2.0)) / sqrt((2.0 * (((l ^ 2.0) / x) + ((t ^ 2.0) * ((1.0 + x) / (x + -1.0)))))); tmp = 0.0; if (t <= -1.35e+63) tmp = (1.0 / x) + (-1.0 - (0.5 / (x ^ 2.0))); elseif (t <= -4.5e-125) tmp = t_1; elseif (t <= 3e-188) tmp = (1.0 / l) * (t / (x ^ -0.5)); elseif (t <= 4e+35) tmp = t_1; else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(N[Power[t, 2.0], $MachinePrecision] * N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+63], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-125], t$95$1, If[LessEqual[t, 3e-188], N[(N[(1.0 / l), $MachinePrecision] * N[(t / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+35], t$95$1, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t \cdot \sqrt{2}}{\sqrt{2 \cdot \left(\frac{{\ell}^{2}}{x} + {t}^{2} \cdot \frac{1 + x}{x + -1}\right)}}\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+63}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{{x}^{2}}\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-188}:\\
\;\;\;\;\frac{1}{\ell} \cdot \frac{t}{{x}^{-0.5}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.35000000000000009e63Initial program 27.6%
Simplified27.5%
Taylor expanded in t around -inf 89.3%
associate-*r*89.3%
neg-mul-189.3%
distribute-rgt-neg-out89.3%
+-commutative89.3%
sub-neg89.3%
metadata-eval89.3%
+-commutative89.3%
Simplified89.3%
Taylor expanded in x around inf 89.4%
associate-*r/89.4%
metadata-eval89.4%
Simplified89.4%
if -1.35000000000000009e63 < t < -4.50000000000000012e-125 or 3.00000000000000017e-188 < t < 3.9999999999999999e35Initial program 50.3%
Simplified50.3%
Taylor expanded in l around 0 66.0%
fma-def66.0%
+-commutative66.0%
associate-*r/67.1%
sub-neg67.1%
metadata-eval67.1%
+-commutative67.1%
associate--l+71.6%
sub-neg71.6%
metadata-eval71.6%
+-commutative71.6%
sub-neg71.6%
metadata-eval71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in x around inf 88.5%
associate-*r/88.6%
associate-*r/87.5%
+-commutative87.5%
Applied egg-rr87.5%
expm1-log1p-u85.7%
expm1-udef30.5%
associate-/l*31.6%
Applied egg-rr31.6%
expm1-def86.8%
expm1-log1p88.6%
fma-udef88.6%
distribute-lft-out88.6%
associate-/l*87.5%
associate-*r/88.6%
+-commutative88.6%
Simplified88.6%
if -4.50000000000000012e-125 < t < 3.00000000000000017e-188Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 59.2%
Taylor expanded in l around inf 48.8%
Taylor expanded in l around 0 48.9%
*-un-lft-identity48.9%
inv-pow48.9%
sqrt-pow148.9%
metadata-eval48.9%
times-frac49.0%
Applied egg-rr49.0%
if 3.9999999999999999e35 < t Initial program 41.0%
Simplified40.9%
Taylor expanded in t around inf 92.9%
+-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
Simplified92.9%
Taylor expanded in t around 0 92.9%
Final simplification81.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -5.4e-125)
(- t_1)
(if (<= t 5e-168) (* (/ 1.0 l) (/ t (pow x -0.5))) t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -5.4e-125) {
tmp = -t_1;
} else if (t <= 5e-168) {
tmp = (1.0 / l) * (t / pow(x, -0.5));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-5.4d-125)) then
tmp = -t_1
else if (t <= 5d-168) then
tmp = (1.0d0 / l) * (t / (x ** (-0.5d0)))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -5.4e-125) {
tmp = -t_1;
} else if (t <= 5e-168) {
tmp = (1.0 / l) * (t / Math.pow(x, -0.5));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -5.4e-125: tmp = -t_1 elif t <= 5e-168: tmp = (1.0 / l) * (t / math.pow(x, -0.5)) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -5.4e-125) tmp = Float64(-t_1); elseif (t <= 5e-168) tmp = Float64(Float64(1.0 / l) * Float64(t / (x ^ -0.5))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -5.4e-125) tmp = -t_1; elseif (t <= 5e-168) tmp = (1.0 / l) * (t / (x ^ -0.5)); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -5.4e-125], (-t$95$1), If[LessEqual[t, 5e-168], N[(N[(1.0 / l), $MachinePrecision] * N[(t / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-125}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-168}:\\
\;\;\;\;\frac{1}{\ell} \cdot \frac{t}{{x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -5.3999999999999995e-125Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in t around 0 79.9%
mul-1-neg79.9%
sub-neg79.9%
metadata-eval79.9%
+-commutative79.9%
Simplified79.9%
if -5.3999999999999995e-125 < t < 5.00000000000000001e-168Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
Taylor expanded in l around 0 49.0%
*-un-lft-identity49.0%
inv-pow49.0%
sqrt-pow149.0%
metadata-eval49.0%
times-frac49.1%
Applied egg-rr49.1%
if 5.00000000000000001e-168 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in t around 0 84.4%
Final simplification75.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -4.5e-125)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (pow x 2.0))))
(if (<= t 5.7e-165)
(* (/ 1.0 l) (/ t (pow x -0.5)))
(sqrt (/ (+ x -1.0) (+ 1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -4.5e-125) {
tmp = (1.0 / x) + (-1.0 - (0.5 / pow(x, 2.0)));
} else if (t <= 5.7e-165) {
tmp = (1.0 / l) * (t / pow(x, -0.5));
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.5d-125)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x ** 2.0d0)))
else if (t <= 5.7d-165) then
tmp = (1.0d0 / l) * (t / (x ** (-0.5d0)))
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4.5e-125) {
tmp = (1.0 / x) + (-1.0 - (0.5 / Math.pow(x, 2.0)));
} else if (t <= 5.7e-165) {
tmp = (1.0 / l) * (t / Math.pow(x, -0.5));
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -4.5e-125: tmp = (1.0 / x) + (-1.0 - (0.5 / math.pow(x, 2.0))) elif t <= 5.7e-165: tmp = (1.0 / l) * (t / math.pow(x, -0.5)) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -4.5e-125) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / (x ^ 2.0)))); elseif (t <= 5.7e-165) tmp = Float64(Float64(1.0 / l) * Float64(t / (x ^ -0.5))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.5e-125) tmp = (1.0 / x) + (-1.0 - (0.5 / (x ^ 2.0))); elseif (t <= 5.7e-165) tmp = (1.0 / l) * (t / (x ^ -0.5)); else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -4.5e-125], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e-165], N[(N[(1.0 / l), $MachinePrecision] * N[(t / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{{x}^{2}}\right)\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-165}:\\
\;\;\;\;\frac{1}{\ell} \cdot \frac{t}{{x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -4.50000000000000012e-125Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 79.9%
associate-*r/79.9%
metadata-eval79.9%
Simplified79.9%
if -4.50000000000000012e-125 < t < 5.70000000000000003e-165Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
Taylor expanded in l around 0 49.0%
*-un-lft-identity49.0%
inv-pow49.0%
sqrt-pow149.0%
metadata-eval49.0%
times-frac49.1%
Applied egg-rr49.1%
if 5.70000000000000003e-165 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in t around 0 84.4%
Final simplification75.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -5.8e-125)
(+ (/ 1.0 x) -1.0)
(if (<= t 9.5e-167)
(/ t (* l (pow x -0.5)))
(sqrt (/ (+ x -1.0) (+ 1.0 x))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5.8e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 9.5e-167) {
tmp = t / (l * pow(x, -0.5));
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5.8d-125)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 9.5d-167) then
tmp = t / (l * (x ** (-0.5d0)))
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5.8e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 9.5e-167) {
tmp = t / (l * Math.pow(x, -0.5));
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5.8e-125: tmp = (1.0 / x) + -1.0 elif t <= 9.5e-167: tmp = t / (l * math.pow(x, -0.5)) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5.8e-125) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 9.5e-167) tmp = Float64(t / Float64(l * (x ^ -0.5))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5.8e-125) tmp = (1.0 / x) + -1.0; elseif (t <= 9.5e-167) tmp = t / (l * (x ^ -0.5)); else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5.8e-125], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 9.5e-167], N[(t / N[(l * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-167}:\\
\;\;\;\;\frac{t}{\ell \cdot {x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -5.8000000000000004e-125Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 79.8%
if -5.8000000000000004e-125 < t < 9.49999999999999955e-167Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
div-inv49.0%
associate-/l*48.9%
inv-pow48.9%
sqrt-pow148.8%
metadata-eval48.8%
Applied egg-rr48.8%
associate-*r/48.8%
*-rgt-identity48.8%
associate-/r/48.9%
associate-/l*49.0%
*-inverses49.0%
/-rgt-identity49.0%
Simplified49.0%
if 9.49999999999999955e-167 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in t around 0 84.4%
Final simplification75.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.6e-124)
(- t_1)
(if (<= t 1.06e-172) (/ t (* l (pow x -0.5))) t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.6e-124) {
tmp = -t_1;
} else if (t <= 1.06e-172) {
tmp = t / (l * pow(x, -0.5));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.6d-124)) then
tmp = -t_1
else if (t <= 1.06d-172) then
tmp = t / (l * (x ** (-0.5d0)))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.6e-124) {
tmp = -t_1;
} else if (t <= 1.06e-172) {
tmp = t / (l * Math.pow(x, -0.5));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.6e-124: tmp = -t_1 elif t <= 1.06e-172: tmp = t / (l * math.pow(x, -0.5)) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.6e-124) tmp = Float64(-t_1); elseif (t <= 1.06e-172) tmp = Float64(t / Float64(l * (x ^ -0.5))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.6e-124) tmp = -t_1; elseif (t <= 1.06e-172) tmp = t / (l * (x ^ -0.5)); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.6e-124], (-t$95$1), If[LessEqual[t, 1.06e-172], N[(t / N[(l * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-124}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{-172}:\\
\;\;\;\;\frac{t}{\ell \cdot {x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.60000000000000002e-124Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in t around 0 79.9%
mul-1-neg79.9%
sub-neg79.9%
metadata-eval79.9%
+-commutative79.9%
Simplified79.9%
if -1.60000000000000002e-124 < t < 1.05999999999999993e-172Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
div-inv49.0%
associate-/l*48.9%
inv-pow48.9%
sqrt-pow148.8%
metadata-eval48.8%
Applied egg-rr48.8%
associate-*r/48.8%
*-rgt-identity48.8%
associate-/r/48.9%
associate-/l*49.0%
*-inverses49.0%
/-rgt-identity49.0%
Simplified49.0%
if 1.05999999999999993e-172 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in t around 0 84.4%
Final simplification75.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.26e-124) (+ (/ 1.0 x) -1.0) (if (<= t 1.36e-165) (/ t (* l (pow x -0.5))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.26e-124) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.36e-165) {
tmp = t / (l * pow(x, -0.5));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.26d-124)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 1.36d-165) then
tmp = t / (l * (x ** (-0.5d0)))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.26e-124) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.36e-165) {
tmp = t / (l * Math.pow(x, -0.5));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.26e-124: tmp = (1.0 / x) + -1.0 elif t <= 1.36e-165: tmp = t / (l * math.pow(x, -0.5)) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.26e-124) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 1.36e-165) tmp = Float64(t / Float64(l * (x ^ -0.5))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.26e-124) tmp = (1.0 / x) + -1.0; elseif (t <= 1.36e-165) tmp = t / (l * (x ^ -0.5)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.26e-124], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.36e-165], N[(t / N[(l * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.26 \cdot 10^{-124}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-165}:\\
\;\;\;\;\frac{t}{\ell \cdot {x}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.2600000000000001e-124Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 79.8%
if -1.2600000000000001e-124 < t < 1.3599999999999999e-165Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
div-inv49.0%
associate-/l*48.9%
inv-pow48.9%
sqrt-pow148.8%
metadata-eval48.8%
Applied egg-rr48.8%
associate-*r/48.8%
*-rgt-identity48.8%
associate-/r/48.9%
associate-/l*49.0%
*-inverses49.0%
/-rgt-identity49.0%
Simplified49.0%
if 1.3599999999999999e-165 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 83.9%
Final simplification75.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -6.1e-125) (+ (/ 1.0 x) -1.0) (if (<= t 2.5e-167) (* t (/ (sqrt x) l)) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.1e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 2.5e-167) {
tmp = t * (sqrt(x) / l);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.1d-125)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 2.5d-167) then
tmp = t * (sqrt(x) / l)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -6.1e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 2.5e-167) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.1e-125: tmp = (1.0 / x) + -1.0 elif t <= 2.5e-167: tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.1e-125) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 2.5e-167) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.1e-125) tmp = (1.0 / x) + -1.0; elseif (t <= 2.5e-167) tmp = t * (sqrt(x) / l); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -6.1e-125], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 2.5e-167], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.1 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-167}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -6.10000000000000003e-125Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 79.8%
if -6.10000000000000003e-125 < t < 2.5000000000000001e-167Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
Taylor expanded in l around 0 49.0%
Taylor expanded in t around 0 43.8%
associate-*l/49.1%
associate-/l*48.9%
*-rgt-identity48.9%
associate-*r/48.9%
associate-/r/48.9%
associate-*l/48.9%
*-lft-identity48.9%
Simplified48.9%
if 2.5000000000000001e-167 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 83.9%
Final simplification75.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5.8e-125) (+ (/ 1.0 x) -1.0) (if (<= t 1.3e-161) (/ t (/ l (sqrt x))) (+ 1.0 (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5.8e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.3e-161) {
tmp = t / (l / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5.8d-125)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= 1.3d-161) then
tmp = t / (l / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5.8e-125) {
tmp = (1.0 / x) + -1.0;
} else if (t <= 1.3e-161) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5.8e-125: tmp = (1.0 / x) + -1.0 elif t <= 1.3e-161: tmp = t / (l / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5.8e-125) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= 1.3e-161) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5.8e-125) tmp = (1.0 / x) + -1.0; elseif (t <= 1.3e-161) tmp = t / (l / sqrt(x)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5.8e-125], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, 1.3e-161], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -5.8000000000000004e-125Initial program 35.8%
Simplified35.8%
Taylor expanded in t around -inf 79.8%
associate-*r*79.8%
neg-mul-179.8%
distribute-rgt-neg-out79.8%
+-commutative79.8%
sub-neg79.8%
metadata-eval79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 79.8%
if -5.8000000000000004e-125 < t < 1.29999999999999998e-161Initial program 2.6%
Simplified2.6%
Taylor expanded in x around inf 60.7%
Taylor expanded in l around inf 48.9%
Taylor expanded in l around 0 49.0%
expm1-log1p-u30.3%
expm1-udef17.1%
add-sqr-sqrt16.4%
sqrt-prod37.2%
unpow237.2%
sqrt-prod37.6%
div-inv37.6%
sqrt-div37.2%
unpow237.2%
sqrt-prod16.4%
add-sqr-sqrt17.1%
Applied egg-rr17.1%
expm1-def30.2%
expm1-log1p48.9%
Simplified48.9%
if 1.29999999999999998e-161 < t Initial program 46.5%
Simplified46.5%
Taylor expanded in t around inf 84.4%
+-commutative84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 83.9%
Final simplification75.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (/ t (- t)) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = t / -t
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / -t;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = t / -t else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(t / Float64(-t)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = t / -t; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(t / (-t)), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 26.1%
Simplified26.1%
Taylor expanded in t around inf 1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt64.7%
mul-1-neg64.7%
Simplified64.7%
if -4.999999999999985e-310 < t Initial program 40.2%
Simplified40.2%
Taylor expanded in t around inf 76.4%
+-commutative76.4%
sub-neg76.4%
metadata-eval76.4%
+-commutative76.4%
Simplified76.4%
Taylor expanded in x around inf 76.1%
Final simplification70.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = (1.0 / x) + -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 26.1%
Simplified26.1%
Taylor expanded in t around -inf 65.3%
associate-*r*65.3%
neg-mul-165.3%
distribute-rgt-neg-out65.3%
+-commutative65.3%
sub-neg65.3%
metadata-eval65.3%
+-commutative65.3%
Simplified65.3%
Taylor expanded in x around inf 65.3%
if -4.999999999999985e-310 < t Initial program 40.2%
Simplified40.2%
Taylor expanded in t around inf 76.4%
+-commutative76.4%
sub-neg76.4%
metadata-eval76.4%
+-commutative76.4%
Simplified76.4%
Taylor expanded in x around inf 76.1%
Final simplification70.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (/ t (- t)) (/ t t)))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / -t;
} else {
tmp = t / t;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = t / -t
else
tmp = t / t
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = t / -t;
} else {
tmp = t / t;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = t / -t else: tmp = t / t return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(t / Float64(-t)); else tmp = Float64(t / t); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = t / -t; else tmp = t / t; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(t / (-t)), $MachinePrecision], N[(t / t), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{t}{-t}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{t}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 26.1%
Simplified26.1%
Taylor expanded in t around inf 1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt64.7%
mul-1-neg64.7%
Simplified64.7%
if -4.999999999999985e-310 < t Initial program 40.2%
Simplified40.2%
Taylor expanded in x around inf 75.9%
Final simplification70.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (/ t t))
l = abs(l);
double code(double x, double l, double t) {
return t / t;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = t / t
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return t / t;
}
l = abs(l) def code(x, l, t): return t / t
l = abs(l) function code(x, l, t) return Float64(t / t) end
l = abs(l) function tmp = code(x, l, t) tmp = t / t; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := N[(t / t), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\frac{t}{t}
\end{array}
Initial program 33.4%
Simplified33.4%
Taylor expanded in x around inf 40.0%
Final simplification40.0%
herbie shell --seed 2023306
(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)))))