
(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 9 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))))
(if (<= t -3.4e+87)
(+ (/ 1.0 x) -1.0)
(if (<= t -3e-163)
(/
t
(/
(sqrt
(+
(+ (* 2.0 (/ (pow t 2.0) x)) (+ t_1 (/ (pow l 2.0) x)))
(/ (+ t_1 (pow l 2.0)) x)))
(sqrt 2.0)))
(if (<= t -6.6e-254)
-1.0
(if (<= t 4.1e-211)
(* (/ t l) (sqrt x))
(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 tmp;
if (t <= -3.4e+87) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -3e-163) {
tmp = t / (sqrt((((2.0 * (pow(t, 2.0) / x)) + (t_1 + (pow(l, 2.0) / x))) + ((t_1 + pow(l, 2.0)) / x))) / sqrt(2.0));
} else if (t <= -6.6e-254) {
tmp = -1.0;
} else if (t <= 4.1e-211) {
tmp = (t / l) * sqrt(x);
} 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 = 2.0d0 * (t ** 2.0d0)
if (t <= (-3.4d+87)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= (-3d-163)) then
tmp = t / (sqrt((((2.0d0 * ((t ** 2.0d0) / x)) + (t_1 + ((l ** 2.0d0) / x))) + ((t_1 + (l ** 2.0d0)) / x))) / sqrt(2.0d0))
else if (t <= (-6.6d-254)) then
tmp = -1.0d0
else if (t <= 4.1d-211) then
tmp = (t / l) * sqrt(x)
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 tmp;
if (t <= -3.4e+87) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -3e-163) {
tmp = t / (Math.sqrt((((2.0 * (Math.pow(t, 2.0) / x)) + (t_1 + (Math.pow(l, 2.0) / x))) + ((t_1 + Math.pow(l, 2.0)) / x))) / Math.sqrt(2.0));
} else if (t <= -6.6e-254) {
tmp = -1.0;
} else if (t <= 4.1e-211) {
tmp = (t / l) * Math.sqrt(x);
} 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) tmp = 0 if t <= -3.4e+87: tmp = (1.0 / x) + -1.0 elif t <= -3e-163: tmp = t / (math.sqrt((((2.0 * (math.pow(t, 2.0) / x)) + (t_1 + (math.pow(l, 2.0) / x))) + ((t_1 + math.pow(l, 2.0)) / x))) / math.sqrt(2.0)) elif t <= -6.6e-254: tmp = -1.0 elif t <= 4.1e-211: tmp = (t / l) * math.sqrt(x) 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)) tmp = 0.0 if (t <= -3.4e+87) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= -3e-163) tmp = Float64(t / Float64(sqrt(Float64(Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(t_1 + Float64((l ^ 2.0) / x))) + Float64(Float64(t_1 + (l ^ 2.0)) / x))) / sqrt(2.0))); elseif (t <= -6.6e-254) tmp = -1.0; elseif (t <= 4.1e-211) tmp = Float64(Float64(t / l) * sqrt(x)); 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); tmp = 0.0; if (t <= -3.4e+87) tmp = (1.0 / x) + -1.0; elseif (t <= -3e-163) tmp = t / (sqrt((((2.0 * ((t ^ 2.0) / x)) + (t_1 + ((l ^ 2.0) / x))) + ((t_1 + (l ^ 2.0)) / x))) / sqrt(2.0)); elseif (t <= -6.6e-254) tmp = -1.0; elseif (t <= 4.1e-211) tmp = (t / l) * sqrt(x); 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]}, If[LessEqual[t, -3.4e+87], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, -3e-163], N[(t / N[(N[Sqrt[N[(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] + N[(N[(t$95$1 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.6e-254], -1.0, If[LessEqual[t, 4.1e-211], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $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}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-163}:\\
\;\;\;\;\frac{t}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(t_1 + \frac{{\ell}^{2}}{x}\right)\right) + \frac{t_1 + {\ell}^{2}}{x}}}{\sqrt{2}}}\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-254}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-211}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -3.4000000000000002e87Initial program 33.1%
Simplified33.2%
Taylor expanded in t around -inf 100.0%
associate-*r*100.0%
neg-mul-1100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -3.4000000000000002e87 < t < -3.0000000000000002e-163Initial program 47.4%
Simplified47.3%
Taylor expanded in x around inf 81.6%
if -3.0000000000000002e-163 < t < -6.60000000000000033e-254Initial program 2.6%
Simplified2.6%
Taylor expanded in t around -inf 69.3%
associate-*r*69.3%
neg-mul-169.3%
+-commutative69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
if -6.60000000000000033e-254 < t < 4.1000000000000002e-211Initial program 1.7%
Simplified1.7%
Taylor expanded in x around inf 61.0%
Taylor expanded in t around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
distribute-rgt1-in60.8%
metadata-eval60.8%
Simplified60.8%
Taylor expanded in t around 0 50.2%
if 4.1000000000000002e-211 < t Initial program 38.9%
Simplified39.0%
Taylor expanded in t around inf 85.9%
+-commutative85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in t around 0 85.9%
Final simplification83.9%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -2.95e-92)
(+ (/ 1.0 x) -1.0)
(if (<= t -1.26e-163)
(/ t (* (sqrt (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))) (/ l (sqrt 2.0))))
(if (<= t -2.25e-247)
-1.0
(if (<= t 6.6e-212)
(* (/ t l) (sqrt x))
(sqrt (/ (+ x -1.0) (+ 1.0 x))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -2.95e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.26e-163) {
tmp = t / (sqrt(((1.0 / x) + (1.0 / (x + -1.0)))) * (l / sqrt(2.0)));
} else if (t <= -2.25e-247) {
tmp = -1.0;
} else if (t <= 6.6e-212) {
tmp = (t / l) * sqrt(x);
} 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 <= (-2.95d-92)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= (-1.26d-163)) then
tmp = t / (sqrt(((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))) * (l / sqrt(2.0d0)))
else if (t <= (-2.25d-247)) then
tmp = -1.0d0
else if (t <= 6.6d-212) then
tmp = (t / l) * sqrt(x)
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 <= -2.95e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.26e-163) {
tmp = t / (Math.sqrt(((1.0 / x) + (1.0 / (x + -1.0)))) * (l / Math.sqrt(2.0)));
} else if (t <= -2.25e-247) {
tmp = -1.0;
} else if (t <= 6.6e-212) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -2.95e-92: tmp = (1.0 / x) + -1.0 elif t <= -1.26e-163: tmp = t / (math.sqrt(((1.0 / x) + (1.0 / (x + -1.0)))) * (l / math.sqrt(2.0))) elif t <= -2.25e-247: tmp = -1.0 elif t <= 6.6e-212: tmp = (t / l) * math.sqrt(x) 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 <= -2.95e-92) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= -1.26e-163) tmp = Float64(t / Float64(sqrt(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))) * Float64(l / sqrt(2.0)))); elseif (t <= -2.25e-247) tmp = -1.0; elseif (t <= 6.6e-212) tmp = Float64(Float64(t / l) * sqrt(x)); 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 <= -2.95e-92) tmp = (1.0 / x) + -1.0; elseif (t <= -1.26e-163) tmp = t / (sqrt(((1.0 / x) + (1.0 / (x + -1.0)))) * (l / sqrt(2.0))); elseif (t <= -2.25e-247) tmp = -1.0; elseif (t <= 6.6e-212) tmp = (t / l) * sqrt(x); 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, -2.95e-92], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, -1.26e-163], N[(t / N[(N[Sqrt[N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.25e-247], -1.0, If[LessEqual[t, 6.6e-212], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $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 -2.95 \cdot 10^{-92}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq -1.26 \cdot 10^{-163}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{1}{x} + \frac{1}{x + -1}} \cdot \frac{\ell}{\sqrt{2}}}\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-247}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-212}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -2.95e-92Initial program 43.6%
Simplified43.6%
Taylor expanded in t around -inf 91.2%
associate-*r*91.2%
neg-mul-191.2%
+-commutative91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 91.2%
if -2.95e-92 < t < -1.26000000000000002e-163Initial program 9.2%
Simplified9.2%
Taylor expanded in l around inf 1.7%
*-commutative1.7%
associate--l+16.0%
sub-neg16.0%
metadata-eval16.0%
+-commutative16.0%
sub-neg16.0%
metadata-eval16.0%
+-commutative16.0%
Simplified16.0%
Taylor expanded in x around inf 46.4%
if -1.26000000000000002e-163 < t < -2.2500000000000001e-247Initial program 2.6%
Simplified2.6%
Taylor expanded in t around -inf 69.3%
associate-*r*69.3%
neg-mul-169.3%
+-commutative69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
if -2.2500000000000001e-247 < t < 6.6000000000000004e-212Initial program 1.7%
Simplified1.7%
Taylor expanded in x around inf 61.0%
Taylor expanded in t around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
distribute-rgt1-in60.8%
metadata-eval60.8%
Simplified60.8%
Taylor expanded in t around 0 50.2%
if 6.6000000000000004e-212 < t Initial program 38.9%
Simplified39.0%
Taylor expanded in t around inf 85.9%
+-commutative85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in t around 0 85.9%
Final simplification81.4%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(if (<= t -1.6e-81)
(+ (/ 1.0 x) -1.0)
(if (<= t -3.2e-163)
(* (sqrt (* x 0.5)) (/ t (/ l (sqrt 2.0))))
(if (<= t -4.4e-245)
-1.0
(if (<= t 7.2e-212)
(* (/ t l) (sqrt x))
(sqrt (/ (+ x -1.0) (+ 1.0 x))))))))l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -1.6e-81) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -3.2e-163) {
tmp = sqrt((x * 0.5)) * (t / (l / sqrt(2.0)));
} else if (t <= -4.4e-245) {
tmp = -1.0;
} else if (t <= 7.2e-212) {
tmp = (t / l) * sqrt(x);
} 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 <= (-1.6d-81)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= (-3.2d-163)) then
tmp = sqrt((x * 0.5d0)) * (t / (l / sqrt(2.0d0)))
else if (t <= (-4.4d-245)) then
tmp = -1.0d0
else if (t <= 7.2d-212) then
tmp = (t / l) * sqrt(x)
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 <= -1.6e-81) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -3.2e-163) {
tmp = Math.sqrt((x * 0.5)) * (t / (l / Math.sqrt(2.0)));
} else if (t <= -4.4e-245) {
tmp = -1.0;
} else if (t <= 7.2e-212) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -1.6e-81: tmp = (1.0 / x) + -1.0 elif t <= -3.2e-163: tmp = math.sqrt((x * 0.5)) * (t / (l / math.sqrt(2.0))) elif t <= -4.4e-245: tmp = -1.0 elif t <= 7.2e-212: tmp = (t / l) * math.sqrt(x) 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 <= -1.6e-81) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= -3.2e-163) tmp = Float64(sqrt(Float64(x * 0.5)) * Float64(t / Float64(l / sqrt(2.0)))); elseif (t <= -4.4e-245) tmp = -1.0; elseif (t <= 7.2e-212) tmp = Float64(Float64(t / l) * sqrt(x)); 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 <= -1.6e-81) tmp = (1.0 / x) + -1.0; elseif (t <= -3.2e-163) tmp = sqrt((x * 0.5)) * (t / (l / sqrt(2.0))); elseif (t <= -4.4e-245) tmp = -1.0; elseif (t <= 7.2e-212) tmp = (t / l) * sqrt(x); 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, -1.6e-81], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, -3.2e-163], N[(N[Sqrt[N[(x * 0.5), $MachinePrecision]], $MachinePrecision] * N[(t / N[(l / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e-245], -1.0, If[LessEqual[t, 7.2e-212], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $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 -1.6 \cdot 10^{-81}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{x \cdot 0.5} \cdot \frac{t}{\frac{\ell}{\sqrt{2}}}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-245}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-212}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.6e-81Initial program 43.6%
Simplified43.6%
Taylor expanded in t around -inf 91.2%
associate-*r*91.2%
neg-mul-191.2%
+-commutative91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 91.2%
if -1.6e-81 < t < -3.19999999999999988e-163Initial program 9.2%
Simplified9.2%
Taylor expanded in l around inf 1.5%
*-commutative1.5%
associate--l+16.3%
sub-neg16.3%
metadata-eval16.3%
+-commutative16.3%
sub-neg16.3%
metadata-eval16.3%
+-commutative16.3%
associate-/l*16.3%
Simplified16.3%
Taylor expanded in x around inf 43.5%
Taylor expanded in x around inf 43.5%
*-commutative43.5%
Simplified43.5%
if -3.19999999999999988e-163 < t < -4.39999999999999986e-245Initial program 2.6%
Simplified2.6%
Taylor expanded in t around -inf 69.3%
associate-*r*69.3%
neg-mul-169.3%
+-commutative69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
if -4.39999999999999986e-245 < t < 7.2000000000000002e-212Initial program 1.7%
Simplified1.7%
Taylor expanded in x around inf 61.0%
Taylor expanded in t around 0 60.8%
cancel-sign-sub-inv60.8%
metadata-eval60.8%
distribute-rgt1-in60.8%
metadata-eval60.8%
Simplified60.8%
Taylor expanded in t around 0 50.2%
if 7.2000000000000002e-212 < t Initial program 38.9%
Simplified39.0%
Taylor expanded in t around inf 85.9%
+-commutative85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in t around 0 85.9%
Final simplification81.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))))
(if (<= t -4.3e-92)
(+ (/ 1.0 x) -1.0)
(if (<= t -1.65e-163)
t_1
(if (<= t -2.7e-250)
-1.0
(if (<= t 5e-212) t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double tmp;
if (t <= -4.3e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.65e-163) {
tmp = t_1;
} else if (t <= -2.7e-250) {
tmp = -1.0;
} else if (t <= 5e-212) {
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 / l) * sqrt(x)
if (t <= (-4.3d-92)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= (-1.65d-163)) then
tmp = t_1
else if (t <= (-2.7d-250)) then
tmp = -1.0d0
else if (t <= 5d-212) 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 / l) * Math.sqrt(x);
double tmp;
if (t <= -4.3e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.65e-163) {
tmp = t_1;
} else if (t <= -2.7e-250) {
tmp = -1.0;
} else if (t <= 5e-212) {
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 / l) * math.sqrt(x) tmp = 0 if t <= -4.3e-92: tmp = (1.0 / x) + -1.0 elif t <= -1.65e-163: tmp = t_1 elif t <= -2.7e-250: tmp = -1.0 elif t <= 5e-212: 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 / l) * sqrt(x)) tmp = 0.0 if (t <= -4.3e-92) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= -1.65e-163) tmp = t_1; elseif (t <= -2.7e-250) tmp = -1.0; elseif (t <= 5e-212) 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 / l) * sqrt(x); tmp = 0.0; if (t <= -4.3e-92) tmp = (1.0 / x) + -1.0; elseif (t <= -1.65e-163) tmp = t_1; elseif (t <= -2.7e-250) tmp = -1.0; elseif (t <= 5e-212) 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 / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e-92], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, -1.65e-163], t$95$1, If[LessEqual[t, -2.7e-250], -1.0, If[LessEqual[t, 5e-212], 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}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-92}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-250}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -4.30000000000000014e-92Initial program 43.6%
Simplified43.6%
Taylor expanded in t around -inf 91.2%
associate-*r*91.2%
neg-mul-191.2%
+-commutative91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 91.2%
if -4.30000000000000014e-92 < t < -1.65e-163 or -2.70000000000000002e-250 < t < 5.00000000000000043e-212Initial program 4.2%
Simplified4.2%
Taylor expanded in x around inf 66.5%
Taylor expanded in t around 0 58.9%
cancel-sign-sub-inv58.9%
metadata-eval58.9%
distribute-rgt1-in58.9%
metadata-eval58.9%
Simplified58.9%
Taylor expanded in t around 0 47.8%
if -1.65e-163 < t < -2.70000000000000002e-250Initial program 2.6%
Simplified2.6%
Taylor expanded in t around -inf 69.3%
associate-*r*69.3%
neg-mul-169.3%
+-commutative69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
if 5.00000000000000043e-212 < t Initial program 38.9%
Simplified39.0%
Taylor expanded in t around inf 85.9%
+-commutative85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in t around 0 85.9%
Final simplification81.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))))
(if (<= t -1.38e-92)
(+ (/ 1.0 x) -1.0)
(if (<= t -1.06e-163)
t_1
(if (<= t -8.8e-245)
-1.0
(if (<= t 3.2e-211) t_1 (+ 1.0 (/ -1.0 x))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double tmp;
if (t <= -1.38e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.06e-163) {
tmp = t_1;
} else if (t <= -8.8e-245) {
tmp = -1.0;
} else if (t <= 3.2e-211) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t / l) * sqrt(x)
if (t <= (-1.38d-92)) then
tmp = (1.0d0 / x) + (-1.0d0)
else if (t <= (-1.06d-163)) then
tmp = t_1
else if (t <= (-8.8d-245)) then
tmp = -1.0d0
else if (t <= 3.2d-211) then
tmp = t_1
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 t_1 = (t / l) * Math.sqrt(x);
double tmp;
if (t <= -1.38e-92) {
tmp = (1.0 / x) + -1.0;
} else if (t <= -1.06e-163) {
tmp = t_1;
} else if (t <= -8.8e-245) {
tmp = -1.0;
} else if (t <= 3.2e-211) {
tmp = t_1;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = (t / l) * math.sqrt(x) tmp = 0 if t <= -1.38e-92: tmp = (1.0 / x) + -1.0 elif t <= -1.06e-163: tmp = t_1 elif t <= -8.8e-245: tmp = -1.0 elif t <= 3.2e-211: tmp = t_1 else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) tmp = 0.0 if (t <= -1.38e-92) tmp = Float64(Float64(1.0 / x) + -1.0); elseif (t <= -1.06e-163) tmp = t_1; elseif (t <= -8.8e-245) tmp = -1.0; elseif (t <= 3.2e-211) tmp = t_1; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); tmp = 0.0; if (t <= -1.38e-92) tmp = (1.0 / x) + -1.0; elseif (t <= -1.06e-163) tmp = t_1; elseif (t <= -8.8e-245) tmp = -1.0; elseif (t <= 3.2e-211) tmp = t_1; 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_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.38e-92], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[t, -1.06e-163], t$95$1, If[LessEqual[t, -8.8e-245], -1.0, If[LessEqual[t, 3.2e-211], t$95$1, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -1.38 \cdot 10^{-92}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{elif}\;t \leq -1.06 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-245}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.38000000000000006e-92Initial program 43.6%
Simplified43.6%
Taylor expanded in t around -inf 91.2%
associate-*r*91.2%
neg-mul-191.2%
+-commutative91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in x around inf 91.2%
if -1.38000000000000006e-92 < t < -1.06000000000000006e-163 or -8.79999999999999971e-245 < t < 3.19999999999999985e-211Initial program 4.2%
Simplified4.2%
Taylor expanded in x around inf 66.5%
Taylor expanded in t around 0 58.9%
cancel-sign-sub-inv58.9%
metadata-eval58.9%
distribute-rgt1-in58.9%
metadata-eval58.9%
Simplified58.9%
Taylor expanded in t around 0 47.8%
if -1.06000000000000006e-163 < t < -8.79999999999999971e-245Initial program 2.6%
Simplified2.6%
Taylor expanded in t around -inf 69.3%
associate-*r*69.3%
neg-mul-169.3%
+-commutative69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
Simplified69.3%
Taylor expanded in x around inf 69.3%
if 3.19999999999999985e-211 < t Initial program 38.9%
Simplified39.0%
Taylor expanded in t around inf 85.9%
+-commutative85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in x around inf 84.5%
Final simplification80.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) -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;
} 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
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;
} 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 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 = -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; 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], -1.0, 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}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 33.5%
Simplified33.5%
Taylor expanded in t around -inf 79.7%
associate-*r*79.7%
neg-mul-179.7%
+-commutative79.7%
sub-neg79.7%
metadata-eval79.7%
+-commutative79.7%
Simplified79.7%
Taylor expanded in x around inf 79.2%
if -4.999999999999985e-310 < t Initial program 33.3%
Simplified33.3%
Taylor expanded in t around inf 77.3%
+-commutative77.3%
sub-neg77.3%
metadata-eval77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in x around inf 76.1%
Final simplification77.7%
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 33.5%
Simplified33.5%
Taylor expanded in t around -inf 79.7%
associate-*r*79.7%
neg-mul-179.7%
+-commutative79.7%
sub-neg79.7%
metadata-eval79.7%
+-commutative79.7%
Simplified79.7%
Taylor expanded in x around inf 79.7%
if -4.999999999999985e-310 < t Initial program 33.3%
Simplified33.3%
Taylor expanded in t around inf 77.3%
+-commutative77.3%
sub-neg77.3%
metadata-eval77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in x around inf 76.1%
Final simplification78.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-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 <= (-5d-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 <= -5e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-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 <= -5e-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, -5e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 33.5%
Simplified33.5%
Taylor expanded in t around -inf 79.7%
associate-*r*79.7%
neg-mul-179.7%
+-commutative79.7%
sub-neg79.7%
metadata-eval79.7%
+-commutative79.7%
Simplified79.7%
Taylor expanded in x around inf 79.2%
if -4.999999999999985e-310 < t Initial program 33.3%
Simplified33.3%
Taylor expanded in t around -inf 1.8%
associate-*r*1.8%
neg-mul-11.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
div-inv1.8%
+-commutative1.8%
Applied egg-rr1.8%
Taylor expanded in x around -inf 0.0%
*-commutative0.0%
unpow20.0%
rem-square-sqrt75.1%
associate-*r*75.1%
metadata-eval75.1%
*-lft-identity75.1%
Simplified75.1%
Taylor expanded in t around 0 75.3%
Final simplification77.3%
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 33.4%
Simplified33.4%
Taylor expanded in t around -inf 41.4%
associate-*r*41.4%
neg-mul-141.4%
+-commutative41.4%
sub-neg41.4%
metadata-eval41.4%
+-commutative41.4%
Simplified41.4%
Taylor expanded in x around inf 41.1%
Final simplification41.1%
herbie shell --seed 2023318
(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)))))