
(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 15 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 (fma 2.0 (* t t) (* l l))))
(if (<= t -1.4e-141)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1e-222)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(/ 1.0 (+ x -1.0))
(+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
(if (or (<= t 3.4e-125) (not (<= t 5.9e+35)))
(*
t
(/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(*
t
(/
(sqrt 2.0)
(sqrt
(+
(+
(fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x)))
(/ (* 2.0 t_1) (* x x)))
(/ t_1 x))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = fma(2.0, (t * t), (l * l));
double tmp;
if (t <= -1.4e-141) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1e-222) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
} else if ((t <= 3.4e-125) || !(t <= 5.9e+35)) {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
} else {
tmp = t * (sqrt(2.0) / sqrt(((fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x))) + ((2.0 * t_1) / (x * x))) + (t_1 / x))));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = fma(2.0, Float64(t * t), Float64(l * l)) tmp = 0.0 if (t <= -1.4e-141) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1e-222) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0))))))))); elseif ((t <= 3.4e-125) || !(t <= 5.9e+35)) tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); else tmp = Float64(t * Float64(sqrt(2.0) / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x))) + Float64(Float64(2.0 * t_1) / Float64(x * x))) + Float64(t_1 / x))))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.4e-125], N[Not[LessEqual[t, 5.9e+35]], $MachinePrecision]], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * t$95$1), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 5.9 \cdot 10^{+35}\right):\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\left(\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{2 \cdot t_1}{x \cdot x}\right) + \frac{t_1}{x}}}\\
\end{array}
\end{array}
if t < -1.40000000000000006e-141Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -1.40000000000000006e-141 < t < 1.00000000000000005e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 1.00000000000000005e-222 < t < 3.39999999999999975e-125 or 5.89999999999999985e35 < t Initial program 26.0%
associate-*l/26.0%
Simplified26.0%
Taylor expanded in t around inf 86.6%
if 3.39999999999999975e-125 < t < 5.89999999999999985e35Initial program 65.1%
associate-*l/65.2%
Simplified65.2%
Taylor expanded in x around -inf 85.6%
sub-neg85.6%
Simplified85.6%
Final simplification83.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.55e-137)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.65e-223)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(/ 1.0 (+ x -1.0))
(+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
(if (or (<= t 3.4e-125) (not (<= t 1.3e+36)))
(*
t
(/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))
(/
t
(sqrt
(/
(+
(fma 2.0 (/ (* t t) x) (fma 2.0 (* t t) (/ (* l l) x)))
(/ (fma l l (* 2.0 (* t t))) x))
2.0)))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.55e-137) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.65e-223) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
} else if ((t <= 3.4e-125) || !(t <= 1.3e+36)) {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
} else {
tmp = t / sqrt(((fma(2.0, ((t * t) / x), fma(2.0, (t * t), ((l * l) / x))) + (fma(l, l, (2.0 * (t * t))) / x)) / 2.0));
}
return tmp;
}
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.55e-137) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.65e-223) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0))))))))); elseif ((t <= 3.4e-125) || !(t <= 1.3e+36)) tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); else tmp = Float64(t / sqrt(Float64(Float64(fma(2.0, Float64(Float64(t * t) / x), fma(2.0, Float64(t * t), Float64(Float64(l * l) / x))) + Float64(fma(l, l, Float64(2.0 * Float64(t * t))) / x)) / 2.0))); end return tmp end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.55e-137], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.65e-223], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.4e-125], N[Not[LessEqual[t, 1.3e+36]], $MachinePrecision]], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[Sqrt[N[(N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * l + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-137}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-125} \lor \neg \left(t \leq 1.3 \cdot 10^{+36}\right):\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\mathsf{fma}\left(2, \frac{t \cdot t}{x}, \mathsf{fma}\left(2, t \cdot t, \frac{\ell \cdot \ell}{x}\right)\right) + \frac{\mathsf{fma}\left(\ell, \ell, 2 \cdot \left(t \cdot t\right)\right)}{x}}{2}}}\\
\end{array}
\end{array}
if t < -1.54999999999999989e-137Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -1.54999999999999989e-137 < t < 1.64999999999999997e-223Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 1.64999999999999997e-223 < t < 3.39999999999999975e-125 or 1.3000000000000001e36 < t Initial program 26.0%
associate-*l/26.0%
Simplified26.0%
Taylor expanded in t around inf 86.6%
if 3.39999999999999975e-125 < t < 1.3000000000000001e36Initial program 65.1%
associate-*l/65.2%
Simplified65.2%
*-commutative65.2%
clear-num65.2%
un-div-inv65.1%
sqrt-undiv65.5%
metadata-eval65.5%
sub-neg65.5%
associate-*l/65.5%
sub-neg65.5%
metadata-eval65.5%
Applied egg-rr65.5%
metadata-eval65.5%
sub-neg65.5%
associate-/l*56.6%
sub-neg56.6%
metadata-eval56.6%
+-commutative56.6%
Simplified56.6%
Taylor expanded in x around inf 84.3%
cancel-sign-sub-inv84.3%
fma-def84.3%
unpow284.3%
fma-def84.3%
unpow284.3%
unpow284.3%
metadata-eval84.3%
unpow284.3%
unpow284.3%
fma-udef84.3%
*-lft-identity84.3%
Simplified84.3%
Final simplification83.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.6e-141)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.6e-222)
(*
t
(/
(sqrt 2.0)
(*
l
(sqrt
(+
(/ 1.0 (+ x -1.0))
(+ (/ 1.0 x) (+ (/ 1.0 (* x x)) (/ 1.0 (pow x 3.0)))))))))
(*
t
(/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-141) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.6e-222) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / pow(x, 3.0))))))));
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.6d-141)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.6d-222) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + ((1.0d0 / (x * x)) + (1.0d0 / (x ** 3.0d0))))))))
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.6e-141) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.6e-222) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / Math.pow(x, 3.0))))))));
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.6e-141: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.6e-222: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / math.pow(x, 3.0)))))))) else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -2.6e-141) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.6e-222) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(Float64(1.0 / Float64(x * x)) + Float64(1.0 / (x ^ 3.0))))))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.6e-141) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.6e-222) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + ((1.0 / (x * x)) + (1.0 / (x ^ 3.0)))))))); else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -2.6e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.6e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \left(\frac{1}{x \cdot x} + \frac{1}{{x}^{3}}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.60000000000000011e-141Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -2.60000000000000011e-141 < t < 1.6e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 1.6e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around inf 82.6%
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) (+ x 1.0)))))
(if (<= t -5.4e-138)
(- t_1)
(if (<= t 2.1e-222)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
(* t (* t_1 (/ (sqrt 0.5) (/ t (sqrt 2.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -5.4e-138) {
tmp = -t_1;
} else if (t <= 2.1e-222) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = t * (t_1 * (sqrt(0.5) / (t / sqrt(2.0))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-5.4d-138)) then
tmp = -t_1
else if (t <= 2.1d-222) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
else
tmp = t * (t_1 * (sqrt(0.5d0) / (t / sqrt(2.0d0))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -5.4e-138) {
tmp = -t_1;
} else if (t <= 2.1e-222) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = t * (t_1 * (Math.sqrt(0.5) / (t / Math.sqrt(2.0))));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -5.4e-138: tmp = -t_1 elif t <= 2.1e-222: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))) else: tmp = t * (t_1 * (math.sqrt(0.5) / (t / math.sqrt(2.0)))) return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -5.4e-138) tmp = Float64(-t_1); elseif (t <= 2.1e-222) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))))); else tmp = Float64(t * Float64(t_1 * Float64(sqrt(0.5) / Float64(t / sqrt(2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -5.4e-138) tmp = -t_1; elseif (t <= 2.1e-222) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))); else tmp = t * (t_1 * (sqrt(0.5) / (t / sqrt(2.0)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -5.4e-138], (-t$95$1), If[LessEqual[t, 2.1e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(t$95$1 * N[(N[Sqrt[0.5], $MachinePrecision] / N[(t / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-138}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t_1 \cdot \frac{\sqrt{0.5}}{\frac{t}{\sqrt{2}}}\right)\\
\end{array}
\end{array}
if t < -5.40000000000000057e-138Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -5.40000000000000057e-138 < t < 2.0999999999999999e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 2.0999999999999999e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around inf 81.7%
*-commutative81.7%
sub-neg81.7%
metadata-eval81.7%
+-commutative81.7%
+-commutative81.7%
associate-/l*82.1%
Simplified82.1%
Final simplification81.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.35e-140)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.25e-222)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
(*
t
(/ (sqrt 2.0) (* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0)))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.35e-140) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.25e-222) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.35d-140)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.25d-222) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.35e-140) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.25e-222) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.35e-140: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.25e-222: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))) else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0))))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.35e-140) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.25e-222) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))))); else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.35e-140) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.25e-222) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))); else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.35e-140], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.25e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -1.35e-140Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -1.35e-140 < t < 1.25000000000000002e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 1.25000000000000002e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around inf 82.6%
Final simplification81.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.55e-140)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 4e-224)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 1.0 (+ x -1.0)) (+ (/ 1.0 x) (/ 1.0 (* x x))))))))
(+ 1.0 (/ -0.5 (* x 0.5))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.55e-140) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4e-224) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
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.55d-140)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 4d-224) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + ((1.0d0 / x) + (1.0d0 / (x * x)))))))
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
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.55e-140) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4e-224) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x)))))));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.55e-140: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 4e-224: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.55e-140) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 4e-224) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x)))))))); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.55e-140) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 4e-224) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + ((1.0 / x) + (1.0 / (x * x))))))); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.55e-140], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4e-224], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \left(\frac{1}{x} + \frac{1}{x \cdot x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -1.55e-140Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -1.55e-140 < t < 4.0000000000000001e-224Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 55.2%
unpow255.2%
Simplified55.2%
if 4.0000000000000001e-224 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
*-commutative36.2%
clear-num36.2%
un-div-inv36.2%
sqrt-undiv36.4%
metadata-eval36.4%
sub-neg36.4%
associate-*l/29.8%
sub-neg29.8%
metadata-eval29.8%
Applied egg-rr29.8%
metadata-eval29.8%
sub-neg29.8%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
+-commutative28.2%
Simplified28.2%
Taylor expanded in x around inf 48.5%
cancel-sign-sub-inv48.5%
fma-def48.5%
unpow248.5%
fma-def48.5%
unpow248.5%
unpow248.5%
metadata-eval48.5%
unpow248.5%
unpow248.5%
fma-udef48.5%
*-lft-identity48.5%
Simplified48.5%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 81.7%
sub-neg81.7%
associate-*r/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
*-commutative81.7%
unpow281.7%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification81.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -3e-139)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 1.75e-222)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 1.0 (+ x -1.0)) (/ 1.0 x))))))
(+ 1.0 (/ -0.5 (* x 0.5))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -3e-139) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.75e-222) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
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 <= (-3d-139)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.75d-222) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / (x + (-1.0d0))) + (1.0d0 / x)))))
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -3e-139) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.75e-222) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x)))));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -3e-139: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.75e-222: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / (x + -1.0)) + (1.0 / x))))) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -3e-139) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.75e-222) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / Float64(x + -1.0)) + Float64(1.0 / x)))))); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -3e-139) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.75e-222) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / (x + -1.0)) + (1.0 / x))))); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -3e-139], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.75e-222], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision] + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-139}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x + -1} + \frac{1}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -2.9999999999999999e-139Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -2.9999999999999999e-139 < t < 1.75000000000000012e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
associate--l+36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
sub-neg36.1%
metadata-eval36.1%
+-commutative36.1%
Simplified36.1%
Taylor expanded in x around inf 54.4%
if 1.75000000000000012e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
*-commutative36.2%
clear-num36.2%
un-div-inv36.2%
sqrt-undiv36.4%
metadata-eval36.4%
sub-neg36.4%
associate-*l/29.8%
sub-neg29.8%
metadata-eval29.8%
Applied egg-rr29.8%
metadata-eval29.8%
sub-neg29.8%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
+-commutative28.2%
Simplified28.2%
Taylor expanded in x around inf 48.5%
cancel-sign-sub-inv48.5%
fma-def48.5%
unpow248.5%
fma-def48.5%
unpow248.5%
unpow248.5%
metadata-eval48.5%
unpow248.5%
unpow248.5%
fma-udef48.5%
*-lft-identity48.5%
Simplified48.5%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 81.7%
sub-neg81.7%
associate-*r/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
*-commutative81.7%
unpow281.7%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification81.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.9e-141) (- (sqrt (/ (+ x -1.0) (+ x 1.0)))) (if (<= t 4.2e-223) (* t (/ (sqrt x) l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.9e-141) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4.2e-223) {
tmp = t * (sqrt(x) / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
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.9d-141)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 4.2d-223) then
tmp = t * (sqrt(x) / l)
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
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.9e-141) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4.2e-223) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.9e-141: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 4.2e-223: tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.9e-141) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 4.2e-223) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.9e-141) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 4.2e-223) tmp = t * (sqrt(x) / l); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.9e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4.2e-223], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -1.89999999999999993e-141Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
Simplified91.6%
if -1.89999999999999993e-141 < t < 4.19999999999999965e-223Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in x around inf 69.6%
sub-neg69.6%
fma-def69.6%
unpow269.6%
fma-def69.6%
unpow269.6%
unpow269.6%
mul-1-neg69.6%
remove-double-neg69.6%
fma-def69.6%
unpow269.6%
unpow269.6%
Simplified69.6%
Taylor expanded in t around 0 54.4%
Taylor expanded in l around 0 54.5%
associate-*l/54.4%
*-lft-identity54.4%
Simplified54.4%
if 4.19999999999999965e-223 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
*-commutative36.2%
clear-num36.2%
un-div-inv36.2%
sqrt-undiv36.4%
metadata-eval36.4%
sub-neg36.4%
associate-*l/29.8%
sub-neg29.8%
metadata-eval29.8%
Applied egg-rr29.8%
metadata-eval29.8%
sub-neg29.8%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
+-commutative28.2%
Simplified28.2%
Taylor expanded in x around inf 48.5%
cancel-sign-sub-inv48.5%
fma-def48.5%
unpow248.5%
fma-def48.5%
unpow248.5%
unpow248.5%
metadata-eval48.5%
unpow248.5%
unpow248.5%
fma-udef48.5%
*-lft-identity48.5%
Simplified48.5%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 81.7%
sub-neg81.7%
associate-*r/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
*-commutative81.7%
unpow281.7%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification81.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1.4e-217) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (if (<= t 3.4e-223) (* (sqrt x) (/ t l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.4e-217) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 3.4e-223) {
tmp = sqrt(x) * (t / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
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.4d-217)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 3.4d-223) then
tmp = sqrt(x) * (t / l)
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
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.4e-217) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 3.4e-223) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.4e-217: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 3.4e-223: tmp = math.sqrt(x) * (t / l) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1.4e-217) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 3.4e-223) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.4e-217) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 3.4e-223) tmp = sqrt(x) * (t / l); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1.4e-217], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-223], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-217}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-223}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -1.4e-217Initial program 44.9%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around -inf 86.4%
mul-1-neg86.4%
*-commutative86.4%
distribute-rgt-neg-in86.4%
+-commutative86.4%
sub-neg86.4%
metadata-eval86.4%
+-commutative86.4%
distribute-rgt-neg-in86.4%
Simplified86.4%
Taylor expanded in x around inf 86.1%
associate-*r/86.1%
metadata-eval86.1%
unpow286.1%
Simplified86.1%
if -1.4e-217 < t < 3.3999999999999998e-223Initial program 3.6%
associate-*l/3.6%
Simplified3.6%
Taylor expanded in x around inf 74.4%
sub-neg74.4%
fma-def74.4%
unpow274.4%
fma-def74.4%
unpow274.4%
unpow274.4%
mul-1-neg74.4%
remove-double-neg74.4%
fma-def74.4%
unpow274.4%
unpow274.4%
Simplified74.4%
Taylor expanded in t around 0 62.8%
Taylor expanded in l around 0 53.2%
if 3.3999999999999998e-223 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
*-commutative36.2%
clear-num36.2%
un-div-inv36.2%
sqrt-undiv36.4%
metadata-eval36.4%
sub-neg36.4%
associate-*l/29.8%
sub-neg29.8%
metadata-eval29.8%
Applied egg-rr29.8%
metadata-eval29.8%
sub-neg29.8%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
+-commutative28.2%
Simplified28.2%
Taylor expanded in x around inf 48.5%
cancel-sign-sub-inv48.5%
fma-def48.5%
unpow248.5%
fma-def48.5%
unpow248.5%
unpow248.5%
metadata-eval48.5%
unpow248.5%
unpow248.5%
fma-udef48.5%
*-lft-identity48.5%
Simplified48.5%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 81.7%
sub-neg81.7%
associate-*r/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
*-commutative81.7%
unpow281.7%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification80.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -6.2e-139) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (if (<= t 5.4e-223) (* t (/ (sqrt x) l)) (+ 1.0 (/ -0.5 (* x 0.5))))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -6.2e-139) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 5.4e-223) {
tmp = t * (sqrt(x) / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-6.2d-139)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= 5.4d-223) then
tmp = t * (sqrt(x) / l)
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -6.2e-139) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= 5.4e-223) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -6.2e-139: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= 5.4e-223: tmp = t * (math.sqrt(x) / l) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -6.2e-139) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= 5.4e-223) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -6.2e-139) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= 5.4e-223) tmp = t * (sqrt(x) / l); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -6.2e-139], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-223], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-139}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -6.1999999999999998e-139Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-in91.3%
Simplified91.3%
Taylor expanded in x around inf 90.8%
associate-*r/90.8%
metadata-eval90.8%
unpow290.8%
Simplified90.8%
if -6.1999999999999998e-139 < t < 5.39999999999999977e-223Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in x around inf 69.6%
sub-neg69.6%
fma-def69.6%
unpow269.6%
fma-def69.6%
unpow269.6%
unpow269.6%
mul-1-neg69.6%
remove-double-neg69.6%
fma-def69.6%
unpow269.6%
unpow269.6%
Simplified69.6%
Taylor expanded in t around 0 54.4%
Taylor expanded in l around 0 54.5%
associate-*l/54.4%
*-lft-identity54.4%
Simplified54.4%
if 5.39999999999999977e-223 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
*-commutative36.2%
clear-num36.2%
un-div-inv36.2%
sqrt-undiv36.4%
metadata-eval36.4%
sub-neg36.4%
associate-*l/29.8%
sub-neg29.8%
metadata-eval29.8%
Applied egg-rr29.8%
metadata-eval29.8%
sub-neg29.8%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
+-commutative28.2%
Simplified28.2%
Taylor expanded in x around inf 48.5%
cancel-sign-sub-inv48.5%
fma-def48.5%
unpow248.5%
fma-def48.5%
unpow248.5%
unpow248.5%
metadata-eval48.5%
unpow248.5%
unpow248.5%
fma-udef48.5%
*-lft-identity48.5%
Simplified48.5%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 81.7%
sub-neg81.7%
associate-*r/81.7%
metadata-eval81.7%
distribute-neg-frac81.7%
metadata-eval81.7%
*-commutative81.7%
unpow281.7%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification80.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (+ 1.0 (/ -0.5 (* x 0.5)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-310)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
Taylor expanded in x around inf 78.9%
associate-*r/78.9%
metadata-eval78.9%
unpow278.9%
Simplified78.9%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
*-commutative32.1%
clear-num32.1%
un-div-inv32.1%
sqrt-undiv32.3%
metadata-eval32.3%
sub-neg32.3%
associate-*l/27.2%
sub-neg27.2%
metadata-eval27.2%
Applied egg-rr27.2%
metadata-eval27.2%
sub-neg27.2%
associate-/l*25.1%
sub-neg25.1%
metadata-eval25.1%
+-commutative25.1%
Simplified25.1%
Taylor expanded in x around inf 51.2%
cancel-sign-sub-inv51.2%
fma-def51.2%
unpow251.2%
fma-def51.2%
unpow251.2%
unpow251.2%
metadata-eval51.2%
unpow251.2%
unpow251.2%
fma-udef51.2%
*-lft-identity51.2%
Simplified51.2%
Taylor expanded in t around inf 72.6%
Taylor expanded in x around inf 74.0%
sub-neg74.0%
associate-*r/74.0%
metadata-eval74.0%
distribute-neg-frac74.0%
metadata-eval74.0%
*-commutative74.0%
unpow274.0%
rem-square-sqrt74.0%
Simplified74.0%
Final simplification76.1%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -0.5 (* x 0.5)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-310)) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0 + ((-0.5d0) / (x * 0.5d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-0.5 / (x * 0.5));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 + (-0.5 / (x * 0.5)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(1.0 + Float64(-0.5 / Float64(x * 0.5))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = (1.0 / x) + -1.0; else tmp = 1.0 + (-0.5 / (x * 0.5)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-0.5 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.5}{x \cdot 0.5}\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
Taylor expanded in x around inf 78.5%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
*-commutative32.1%
clear-num32.1%
un-div-inv32.1%
sqrt-undiv32.3%
metadata-eval32.3%
sub-neg32.3%
associate-*l/27.2%
sub-neg27.2%
metadata-eval27.2%
Applied egg-rr27.2%
metadata-eval27.2%
sub-neg27.2%
associate-/l*25.1%
sub-neg25.1%
metadata-eval25.1%
+-commutative25.1%
Simplified25.1%
Taylor expanded in x around inf 51.2%
cancel-sign-sub-inv51.2%
fma-def51.2%
unpow251.2%
fma-def51.2%
unpow251.2%
unpow251.2%
metadata-eval51.2%
unpow251.2%
unpow251.2%
fma-udef51.2%
*-lft-identity51.2%
Simplified51.2%
Taylor expanded in t around inf 72.6%
Taylor expanded in x around inf 74.0%
sub-neg74.0%
associate-*r/74.0%
metadata-eval74.0%
distribute-neg-frac74.0%
metadata-eval74.0%
*-commutative74.0%
unpow274.0%
rem-square-sqrt74.0%
Simplified74.0%
Final simplification75.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ (/ 1.0 x) -1.0) 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-310)) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = (1.0 / x) + -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
Taylor expanded in x around inf 78.5%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in x around inf 71.5%
*-commutative71.5%
Simplified71.5%
sqrt-unprod72.6%
metadata-eval72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Final simplification75.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -1e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1d-310)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -1e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-in79.2%
Simplified79.2%
Taylor expanded in x around inf 77.9%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in x around inf 71.5%
*-commutative71.5%
Simplified71.5%
sqrt-unprod72.6%
metadata-eval72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Final simplification74.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return -1.0;
}
l = abs(l) def code(x, l, t): return -1.0
l = abs(l) function code(x, l, t) return -1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = -1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Initial program 36.0%
associate-*l/36.1%
Simplified36.1%
Taylor expanded in t around -inf 35.6%
mul-1-neg35.6%
*-commutative35.6%
distribute-rgt-neg-in35.6%
+-commutative35.6%
sub-neg35.6%
metadata-eval35.6%
+-commutative35.6%
distribute-rgt-neg-in35.6%
Simplified35.6%
Taylor expanded in x around inf 35.1%
Final simplification35.1%
herbie shell --seed 2023275
(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)))))