
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (* 2.0 (pow t_m 2.0)))
(t_3 (+ t_2 (pow l_m 2.0)))
(t_4 (+ t_3 t_3))
(t_5 (fma l_m l_m (pow l_m 2.0))))
(*
t_s
(if (<= t_m 1.6e-227)
(/ (/ t_m (pow x -0.5)) l_m)
(if (<= t_m 1.26e-188)
(*
(sqrt 2.0)
(/
t_m
(+ (* 0.5 (/ t_4 (* t_m (* x (sqrt 2.0))))) (* t_m (sqrt 2.0)))))
(if (<= t_m 1.18e-163)
(* t_m (* (sqrt 2.0) (sqrt (+ (/ -1.0 t_5) (/ x t_5)))))
(if (<= t_m 1e+47)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
(+
(/ t_4 (pow x 2.0))
(+ (* 2.0 (/ (pow t_m 2.0) x)) (+ t_2 (/ (pow l_m 2.0) x))))
(/ t_3 x)))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 2.0 * pow(t_m, 2.0);
double t_3 = t_2 + pow(l_m, 2.0);
double t_4 = t_3 + t_3;
double t_5 = fma(l_m, l_m, pow(l_m, 2.0));
double tmp;
if (t_m <= 1.6e-227) {
tmp = (t_m / pow(x, -0.5)) / l_m;
} else if (t_m <= 1.26e-188) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (t_4 / (t_m * (x * sqrt(2.0))))) + (t_m * sqrt(2.0))));
} else if (t_m <= 1.18e-163) {
tmp = t_m * (sqrt(2.0) * sqrt(((-1.0 / t_5) + (x / t_5))));
} else if (t_m <= 1e+47) {
tmp = sqrt(2.0) * (t_m / sqrt((((t_4 / pow(x, 2.0)) + ((2.0 * (pow(t_m, 2.0) / x)) + (t_2 + (pow(l_m, 2.0) / x)))) + (t_3 / x))));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(2.0 * (t_m ^ 2.0)) t_3 = Float64(t_2 + (l_m ^ 2.0)) t_4 = Float64(t_3 + t_3) t_5 = fma(l_m, l_m, (l_m ^ 2.0)) tmp = 0.0 if (t_m <= 1.6e-227) tmp = Float64(Float64(t_m / (x ^ -0.5)) / l_m); elseif (t_m <= 1.26e-188) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(t_4 / Float64(t_m * Float64(x * sqrt(2.0))))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 1.18e-163) tmp = Float64(t_m * Float64(sqrt(2.0) * sqrt(Float64(Float64(-1.0 / t_5) + Float64(x / t_5))))); elseif (t_m <= 1e+47) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(t_4 / (x ^ 2.0)) + Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(t_2 + Float64((l_m ^ 2.0) / x)))) + Float64(t_3 / x))))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(l$95$m * l$95$m + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.6e-227], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], If[LessEqual[t$95$m, 1.26e-188], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(t$95$4 / N[(t$95$m * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.18e-163], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / t$95$5), $MachinePrecision] + N[(x / t$95$5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e+47], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(t$95$4 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 \cdot {t\_m}^{2}\\
t_3 := t\_2 + {l\_m}^{2}\\
t_4 := t\_3 + t\_3\\
t_5 := \mathsf{fma}\left(l\_m, l\_m, {l\_m}^{2}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-227}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
\mathbf{elif}\;t\_m \leq 1.26 \cdot 10^{-188}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{t\_4}{t\_m \cdot \left(x \cdot \sqrt{2}\right)} + t\_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t\_m \leq 1.18 \cdot 10^{-163}:\\
\;\;\;\;t\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{-1}{t\_5} + \frac{x}{t\_5}}\right)\\
\mathbf{elif}\;t\_m \leq 10^{+47}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(\frac{t\_4}{{x}^{2}} + \left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(t\_2 + \frac{{l\_m}^{2}}{x}\right)\right)\right) + \frac{t\_3}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 1.60000000000000005e-227Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 1.60000000000000005e-227 < t < 1.26e-188Initial program 2.8%
Simplified2.8%
Taylor expanded in x around inf 68.3%
if 1.26e-188 < t < 1.18000000000000004e-163Initial program 2.4%
Simplified3.4%
clear-num5.4%
inv-pow5.4%
pow25.4%
pow25.4%
Applied egg-rr5.4%
unpow-15.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in t around 0 6.6%
associate-*l*6.6%
associate-/l*2.4%
+-commutative2.4%
sub-neg2.4%
metadata-eval2.4%
fma-neg2.4%
Simplified2.4%
Taylor expanded in x around 0 99.0%
+-commutative99.0%
sub-neg99.0%
neg-mul-199.0%
distribute-neg-out99.0%
*-lft-identity99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
distribute-neg-frac299.0%
distribute-neg-frac99.0%
metadata-eval99.0%
unpow299.0%
fma-neg99.0%
neg-mul-199.0%
remove-double-neg99.0%
mul-1-neg99.0%
distribute-neg-frac299.0%
Simplified99.0%
if 1.18000000000000004e-163 < t < 1e47Initial program 51.7%
Simplified51.5%
Taylor expanded in x around -inf 85.8%
if 1e47 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification54.3%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (* t_m (sqrt 2.0)))
(t_3 (+ (* 2.0 (pow t_m 2.0)) (pow l_m 2.0)))
(t_4 (fma l_m l_m (pow l_m 2.0))))
(*
t_s
(if (<= t_m 1.8e-226)
(/ (/ t_m (pow x -0.5)) l_m)
(if (<= t_m 1.25e-188)
(*
(sqrt 2.0)
(/ t_m (+ (* 0.5 (/ (+ t_3 t_3) (* t_m (* x (sqrt 2.0))))) t_2)))
(if (<= t_m 7.2e-163)
(* t_m (* (sqrt 2.0) (sqrt (+ (/ -1.0 t_4) (/ x t_4)))))
(if (<= t_m 3.4e+47)
(/
t_2
(sqrt
(+
(fma
2.0
(/ (pow t_m 2.0) x)
(fma 2.0 (pow t_m 2.0) (/ (pow l_m 2.0) x)))
(/ (fma 2.0 (pow t_m 2.0) (pow l_m 2.0)) x))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = t_m * sqrt(2.0);
double t_3 = (2.0 * pow(t_m, 2.0)) + pow(l_m, 2.0);
double t_4 = fma(l_m, l_m, pow(l_m, 2.0));
double tmp;
if (t_m <= 1.8e-226) {
tmp = (t_m / pow(x, -0.5)) / l_m;
} else if (t_m <= 1.25e-188) {
tmp = sqrt(2.0) * (t_m / ((0.5 * ((t_3 + t_3) / (t_m * (x * sqrt(2.0))))) + t_2));
} else if (t_m <= 7.2e-163) {
tmp = t_m * (sqrt(2.0) * sqrt(((-1.0 / t_4) + (x / t_4))));
} else if (t_m <= 3.4e+47) {
tmp = t_2 / sqrt((fma(2.0, (pow(t_m, 2.0) / x), fma(2.0, pow(t_m, 2.0), (pow(l_m, 2.0) / x))) + (fma(2.0, pow(t_m, 2.0), pow(l_m, 2.0)) / x)));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(t_m * sqrt(2.0)) t_3 = Float64(Float64(2.0 * (t_m ^ 2.0)) + (l_m ^ 2.0)) t_4 = fma(l_m, l_m, (l_m ^ 2.0)) tmp = 0.0 if (t_m <= 1.8e-226) tmp = Float64(Float64(t_m / (x ^ -0.5)) / l_m); elseif (t_m <= 1.25e-188) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(t_3 + t_3) / Float64(t_m * Float64(x * sqrt(2.0))))) + t_2))); elseif (t_m <= 7.2e-163) tmp = Float64(t_m * Float64(sqrt(2.0) * sqrt(Float64(Float64(-1.0 / t_4) + Float64(x / t_4))))); elseif (t_m <= 3.4e+47) tmp = Float64(t_2 / sqrt(Float64(fma(2.0, Float64((t_m ^ 2.0) / x), fma(2.0, (t_m ^ 2.0), Float64((l_m ^ 2.0) / x))) + Float64(fma(2.0, (t_m ^ 2.0), (l_m ^ 2.0)) / x)))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(l$95$m * l$95$m + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.8e-226], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], If[LessEqual[t$95$m, 1.25e-188], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[(t$95$m * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e-163], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / t$95$4), $MachinePrecision] + N[(x / t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e+47], N[(t$95$2 / N[Sqrt[N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \sqrt{2}\\
t_3 := 2 \cdot {t\_m}^{2} + {l\_m}^{2}\\
t_4 := \mathsf{fma}\left(l\_m, l\_m, {l\_m}^{2}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.8 \cdot 10^{-226}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{-188}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{t\_3 + t\_3}{t\_m \cdot \left(x \cdot \sqrt{2}\right)} + t\_2}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{-163}:\\
\;\;\;\;t\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{-1}{t\_4} + \frac{x}{t\_4}}\right)\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{t\_2}{\sqrt{\mathsf{fma}\left(2, \frac{{t\_m}^{2}}{x}, \mathsf{fma}\left(2, {t\_m}^{2}, \frac{{l\_m}^{2}}{x}\right)\right) + \frac{\mathsf{fma}\left(2, {t\_m}^{2}, {l\_m}^{2}\right)}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 1.79999999999999997e-226Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 1.79999999999999997e-226 < t < 1.25e-188Initial program 2.8%
Simplified2.8%
Taylor expanded in x around inf 68.3%
if 1.25e-188 < t < 7.1999999999999996e-163Initial program 2.4%
Simplified3.4%
clear-num5.4%
inv-pow5.4%
pow25.4%
pow25.4%
Applied egg-rr5.4%
unpow-15.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in t around 0 6.6%
associate-*l*6.6%
associate-/l*2.4%
+-commutative2.4%
sub-neg2.4%
metadata-eval2.4%
fma-neg2.4%
Simplified2.4%
Taylor expanded in x around 0 99.0%
+-commutative99.0%
sub-neg99.0%
neg-mul-199.0%
distribute-neg-out99.0%
*-lft-identity99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
distribute-neg-frac299.0%
distribute-neg-frac99.0%
metadata-eval99.0%
unpow299.0%
fma-neg99.0%
neg-mul-199.0%
remove-double-neg99.0%
mul-1-neg99.0%
distribute-neg-frac299.0%
Simplified99.0%
if 7.1999999999999996e-163 < t < 3.3999999999999998e47Initial program 51.7%
Simplified51.5%
Taylor expanded in x around inf 84.1%
expm1-log1p-u75.2%
expm1-undefine69.6%
fma-define69.6%
Applied egg-rr69.6%
expm1-define75.2%
Simplified75.2%
associate-*r/75.4%
cancel-sign-sub-inv75.4%
fma-define75.4%
fma-define75.4%
metadata-eval75.4%
*-un-lft-identity75.4%
expm1-log1p-u84.2%
Applied egg-rr84.2%
if 3.3999999999999998e47 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification54.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (fma l_m l_m (pow l_m 2.0)))
(t_3 (- 2.0 (* 4.0 (/ -1.0 x))))
(t_4 (/ (pow l_m 2.0) x))
(t_5 (* 2.0 (pow t_m 2.0))))
(*
t_s
(if (<= t_m 3.8e-226)
(/ (/ t_m (pow x -0.5)) l_m)
(if (<= t_m 7.5e-189)
(*
(sqrt 2.0)
(/
t_m
(+
(* 0.5 (* (/ (+ t_4 t_4) t_m) (sqrt (/ 1.0 t_3))))
(* t_m (sqrt t_3)))))
(if (<= t_m 3.35e-164)
(* t_m (* (sqrt 2.0) (sqrt (+ (/ -1.0 t_2) (/ x t_2)))))
(if (<= t_m 2.2e+47)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
(+ (* 2.0 (/ (pow t_m 2.0) x)) (+ t_5 t_4))
(/ (+ t_5 (pow l_m 2.0)) x)))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = fma(l_m, l_m, pow(l_m, 2.0));
double t_3 = 2.0 - (4.0 * (-1.0 / x));
double t_4 = pow(l_m, 2.0) / x;
double t_5 = 2.0 * pow(t_m, 2.0);
double tmp;
if (t_m <= 3.8e-226) {
tmp = (t_m / pow(x, -0.5)) / l_m;
} else if (t_m <= 7.5e-189) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * sqrt((1.0 / t_3)))) + (t_m * sqrt(t_3))));
} else if (t_m <= 3.35e-164) {
tmp = t_m * (sqrt(2.0) * sqrt(((-1.0 / t_2) + (x / t_2))));
} else if (t_m <= 2.2e+47) {
tmp = sqrt(2.0) * (t_m / sqrt((((2.0 * (pow(t_m, 2.0) / x)) + (t_5 + t_4)) + ((t_5 + pow(l_m, 2.0)) / x))));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = fma(l_m, l_m, (l_m ^ 2.0)) t_3 = Float64(2.0 - Float64(4.0 * Float64(-1.0 / x))) t_4 = Float64((l_m ^ 2.0) / x) t_5 = Float64(2.0 * (t_m ^ 2.0)) tmp = 0.0 if (t_m <= 3.8e-226) tmp = Float64(Float64(t_m / (x ^ -0.5)) / l_m); elseif (t_m <= 7.5e-189) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(t_4 + t_4) / t_m) * sqrt(Float64(1.0 / t_3)))) + Float64(t_m * sqrt(t_3))))); elseif (t_m <= 3.35e-164) tmp = Float64(t_m * Float64(sqrt(2.0) * sqrt(Float64(Float64(-1.0 / t_2) + Float64(x / t_2))))); elseif (t_m <= 2.2e+47) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(t_5 + t_4)) + Float64(Float64(t_5 + (l_m ^ 2.0)) / x))))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(l$95$m * l$95$m + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 - N[(4.0 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.8e-226], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], If[LessEqual[t$95$m, 7.5e-189], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(t$95$4 + t$95$4), $MachinePrecision] / t$95$m), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.35e-164], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / t$95$2), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e+47], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \mathsf{fma}\left(l\_m, l\_m, {l\_m}^{2}\right)\\
t_3 := 2 - 4 \cdot \frac{-1}{x}\\
t_4 := \frac{{l\_m}^{2}}{x}\\
t_5 := 2 \cdot {t\_m}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-226}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{-189}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \left(\frac{t\_4 + t\_4}{t\_m} \cdot \sqrt{\frac{1}{t\_3}}\right) + t\_m \cdot \sqrt{t\_3}}\\
\mathbf{elif}\;t\_m \leq 3.35 \cdot 10^{-164}:\\
\;\;\;\;t\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{-1}{t\_2} + \frac{x}{t\_2}}\right)\\
\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(t\_5 + t\_4\right)\right) + \frac{t\_5 + {l\_m}^{2}}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 3.79999999999999981e-226Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 3.79999999999999981e-226 < t < 7.50000000000000042e-189Initial program 2.8%
Simplified2.8%
Taylor expanded in x around inf 35.2%
Taylor expanded in t around inf 68.3%
if 7.50000000000000042e-189 < t < 3.35e-164Initial program 2.4%
Simplified3.4%
clear-num5.4%
inv-pow5.4%
pow25.4%
pow25.4%
Applied egg-rr5.4%
unpow-15.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in t around 0 6.6%
associate-*l*6.6%
associate-/l*2.4%
+-commutative2.4%
sub-neg2.4%
metadata-eval2.4%
fma-neg2.4%
Simplified2.4%
Taylor expanded in x around 0 99.0%
+-commutative99.0%
sub-neg99.0%
neg-mul-199.0%
distribute-neg-out99.0%
*-lft-identity99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
distribute-neg-frac299.0%
distribute-neg-frac99.0%
metadata-eval99.0%
unpow299.0%
fma-neg99.0%
neg-mul-199.0%
remove-double-neg99.0%
mul-1-neg99.0%
distribute-neg-frac299.0%
Simplified99.0%
if 3.35e-164 < t < 2.1999999999999999e47Initial program 51.7%
Simplified51.5%
Taylor expanded in x around inf 84.1%
if 2.1999999999999999e47 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification54.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (* 2.0 (pow t_m 2.0)))
(t_3 (+ t_2 (pow l_m 2.0)))
(t_4 (fma l_m l_m (pow l_m 2.0))))
(*
t_s
(if (<= t_m 4.1e-226)
(/ (/ t_m (pow x -0.5)) l_m)
(if (<= t_m 1.1e-188)
(*
(sqrt 2.0)
(/
t_m
(+
(* 0.5 (/ (+ t_3 t_3) (* t_m (* x (sqrt 2.0)))))
(* t_m (sqrt 2.0)))))
(if (<= t_m 1.08e-162)
(* t_m (* (sqrt 2.0) (sqrt (+ (/ -1.0 t_4) (/ x t_4)))))
(if (<= t_m 9e+46)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
(+ (* 2.0 (/ (pow t_m 2.0) x)) (+ t_2 (/ (pow l_m 2.0) x)))
(/ t_3 x)))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 2.0 * pow(t_m, 2.0);
double t_3 = t_2 + pow(l_m, 2.0);
double t_4 = fma(l_m, l_m, pow(l_m, 2.0));
double tmp;
if (t_m <= 4.1e-226) {
tmp = (t_m / pow(x, -0.5)) / l_m;
} else if (t_m <= 1.1e-188) {
tmp = sqrt(2.0) * (t_m / ((0.5 * ((t_3 + t_3) / (t_m * (x * sqrt(2.0))))) + (t_m * sqrt(2.0))));
} else if (t_m <= 1.08e-162) {
tmp = t_m * (sqrt(2.0) * sqrt(((-1.0 / t_4) + (x / t_4))));
} else if (t_m <= 9e+46) {
tmp = sqrt(2.0) * (t_m / sqrt((((2.0 * (pow(t_m, 2.0) / x)) + (t_2 + (pow(l_m, 2.0) / x))) + (t_3 / x))));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(2.0 * (t_m ^ 2.0)) t_3 = Float64(t_2 + (l_m ^ 2.0)) t_4 = fma(l_m, l_m, (l_m ^ 2.0)) tmp = 0.0 if (t_m <= 4.1e-226) tmp = Float64(Float64(t_m / (x ^ -0.5)) / l_m); elseif (t_m <= 1.1e-188) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(t_3 + t_3) / Float64(t_m * Float64(x * sqrt(2.0))))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 1.08e-162) tmp = Float64(t_m * Float64(sqrt(2.0) * sqrt(Float64(Float64(-1.0 / t_4) + Float64(x / t_4))))); elseif (t_m <= 9e+46) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(t_2 + Float64((l_m ^ 2.0) / x))) + Float64(t_3 / x))))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(l$95$m * l$95$m + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.1e-226], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], If[LessEqual[t$95$m, 1.1e-188], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[(t$95$m * N[(x * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.08e-162], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / t$95$4), $MachinePrecision] + N[(x / t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e+46], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 \cdot {t\_m}^{2}\\
t_3 := t\_2 + {l\_m}^{2}\\
t_4 := \mathsf{fma}\left(l\_m, l\_m, {l\_m}^{2}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{-226}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
\mathbf{elif}\;t\_m \leq 1.1 \cdot 10^{-188}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{t\_3 + t\_3}{t\_m \cdot \left(x \cdot \sqrt{2}\right)} + t\_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t\_m \leq 1.08 \cdot 10^{-162}:\\
\;\;\;\;t\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{-1}{t\_4} + \frac{x}{t\_4}}\right)\\
\mathbf{elif}\;t\_m \leq 9 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(t\_2 + \frac{{l\_m}^{2}}{x}\right)\right) + \frac{t\_3}{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.10000000000000037e-226Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 4.10000000000000037e-226 < t < 1.1e-188Initial program 2.8%
Simplified2.8%
Taylor expanded in x around inf 68.3%
if 1.1e-188 < t < 1.08000000000000006e-162Initial program 2.4%
Simplified3.4%
clear-num5.4%
inv-pow5.4%
pow25.4%
pow25.4%
Applied egg-rr5.4%
unpow-15.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in t around 0 6.6%
associate-*l*6.6%
associate-/l*2.4%
+-commutative2.4%
sub-neg2.4%
metadata-eval2.4%
fma-neg2.4%
Simplified2.4%
Taylor expanded in x around 0 99.0%
+-commutative99.0%
sub-neg99.0%
neg-mul-199.0%
distribute-neg-out99.0%
*-lft-identity99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
distribute-neg-frac299.0%
distribute-neg-frac99.0%
metadata-eval99.0%
unpow299.0%
fma-neg99.0%
neg-mul-199.0%
remove-double-neg99.0%
mul-1-neg99.0%
distribute-neg-frac299.0%
Simplified99.0%
if 1.08000000000000006e-162 < t < 9.00000000000000019e46Initial program 51.7%
Simplified51.5%
Taylor expanded in x around inf 84.1%
if 9.00000000000000019e46 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification54.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (fma l_m l_m (pow l_m 2.0)))
(t_3 (- 2.0 (* 4.0 (/ -1.0 x))))
(t_4 (/ (pow l_m 2.0) x)))
(*
t_s
(if (<= t_m 1.55e-225)
(/ (/ t_m (pow x -0.5)) l_m)
(if (<= t_m 1.6e-188)
(*
(sqrt 2.0)
(/
t_m
(+
(* 0.5 (* (/ (+ t_4 t_4) t_m) (sqrt (/ 1.0 t_3))))
(* t_m (sqrt t_3)))))
(if (<= t_m 5.2e-164)
(* t_m (* (sqrt 2.0) (sqrt (+ (/ -1.0 t_2) (/ x t_2)))))
(if (<= t_m 4.2e+47)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
t_4
(+
(* 2.0 (/ (pow t_m 2.0) x))
(+ (* 2.0 (pow t_m 2.0)) t_4))))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = fma(l_m, l_m, pow(l_m, 2.0));
double t_3 = 2.0 - (4.0 * (-1.0 / x));
double t_4 = pow(l_m, 2.0) / x;
double tmp;
if (t_m <= 1.55e-225) {
tmp = (t_m / pow(x, -0.5)) / l_m;
} else if (t_m <= 1.6e-188) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * sqrt((1.0 / t_3)))) + (t_m * sqrt(t_3))));
} else if (t_m <= 5.2e-164) {
tmp = t_m * (sqrt(2.0) * sqrt(((-1.0 / t_2) + (x / t_2))));
} else if (t_m <= 4.2e+47) {
tmp = sqrt(2.0) * (t_m / sqrt((t_4 + ((2.0 * (pow(t_m, 2.0) / x)) + ((2.0 * pow(t_m, 2.0)) + t_4)))));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = fma(l_m, l_m, (l_m ^ 2.0)) t_3 = Float64(2.0 - Float64(4.0 * Float64(-1.0 / x))) t_4 = Float64((l_m ^ 2.0) / x) tmp = 0.0 if (t_m <= 1.55e-225) tmp = Float64(Float64(t_m / (x ^ -0.5)) / l_m); elseif (t_m <= 1.6e-188) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(t_4 + t_4) / t_m) * sqrt(Float64(1.0 / t_3)))) + Float64(t_m * sqrt(t_3))))); elseif (t_m <= 5.2e-164) tmp = Float64(t_m * Float64(sqrt(2.0) * sqrt(Float64(Float64(-1.0 / t_2) + Float64(x / t_2))))); elseif (t_m <= 4.2e+47) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(t_4 + Float64(Float64(2.0 * Float64((t_m ^ 2.0) / x)) + Float64(Float64(2.0 * (t_m ^ 2.0)) + t_4)))))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(l$95$m * l$95$m + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 - N[(4.0 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.55e-225], N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], If[LessEqual[t$95$m, 1.6e-188], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(t$95$4 + t$95$4), $MachinePrecision] / t$95$m), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.2e-164], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / t$95$2), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e+47], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(t$95$4 + N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \mathsf{fma}\left(l\_m, l\_m, {l\_m}^{2}\right)\\
t_3 := 2 - 4 \cdot \frac{-1}{x}\\
t_4 := \frac{{l\_m}^{2}}{x}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-225}:\\
\;\;\;\;\frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
\mathbf{elif}\;t\_m \leq 1.6 \cdot 10^{-188}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \left(\frac{t\_4 + t\_4}{t\_m} \cdot \sqrt{\frac{1}{t\_3}}\right) + t\_m \cdot \sqrt{t\_3}}\\
\mathbf{elif}\;t\_m \leq 5.2 \cdot 10^{-164}:\\
\;\;\;\;t\_m \cdot \left(\sqrt{2} \cdot \sqrt{\frac{-1}{t\_2} + \frac{x}{t\_2}}\right)\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{t\_4 + \left(2 \cdot \frac{{t\_m}^{2}}{x} + \left(2 \cdot {t\_m}^{2} + t\_4\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 1.54999999999999998e-225Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 1.54999999999999998e-225 < t < 1.60000000000000011e-188Initial program 2.8%
Simplified2.8%
Taylor expanded in x around inf 35.2%
Taylor expanded in t around inf 68.3%
if 1.60000000000000011e-188 < t < 5.2000000000000003e-164Initial program 2.4%
Simplified3.4%
clear-num5.4%
inv-pow5.4%
pow25.4%
pow25.4%
Applied egg-rr5.4%
unpow-15.4%
+-commutative5.4%
Simplified5.4%
Taylor expanded in t around 0 6.6%
associate-*l*6.6%
associate-/l*2.4%
+-commutative2.4%
sub-neg2.4%
metadata-eval2.4%
fma-neg2.4%
Simplified2.4%
Taylor expanded in x around 0 99.0%
+-commutative99.0%
sub-neg99.0%
neg-mul-199.0%
distribute-neg-out99.0%
*-lft-identity99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
distribute-neg-frac299.0%
distribute-neg-frac99.0%
metadata-eval99.0%
unpow299.0%
fma-neg99.0%
neg-mul-199.0%
remove-double-neg99.0%
mul-1-neg99.0%
distribute-neg-frac299.0%
Simplified99.0%
if 5.2000000000000003e-164 < t < 4.2e47Initial program 51.7%
Simplified51.5%
Taylor expanded in x around inf 84.1%
Taylor expanded in t around 0 83.1%
if 4.2e47 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification53.8%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (- 2.0 (* 4.0 (/ -1.0 x))))
(t_3 (/ (/ t_m (pow x -0.5)) l_m))
(t_4 (/ (pow l_m 2.0) x)))
(*
t_s
(if (<= t_m 1.2e-226)
t_3
(if (<= t_m 1.35e-122)
(*
(sqrt 2.0)
(/
t_m
(+
(* 0.5 (* (/ (+ t_4 t_4) t_m) (sqrt (/ 1.0 t_2))))
(* t_m (sqrt t_2)))))
(if (<= t_m 2.4e-98)
(pow (sqrt t_3) 2.0)
(if (<= t_m 7.5e+46)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
(/ (+ (* 2.0 (pow t_m 2.0)) (pow l_m 2.0)) x)
(* (pow t_m 2.0) (+ 2.0 (/ 2.0 x)))))))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x)))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 2.0 - (4.0 * (-1.0 / x));
double t_3 = (t_m / pow(x, -0.5)) / l_m;
double t_4 = pow(l_m, 2.0) / x;
double tmp;
if (t_m <= 1.2e-226) {
tmp = t_3;
} else if (t_m <= 1.35e-122) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * sqrt((1.0 / t_2)))) + (t_m * sqrt(t_2))));
} else if (t_m <= 2.4e-98) {
tmp = pow(sqrt(t_3), 2.0);
} else if (t_m <= 7.5e+46) {
tmp = sqrt(2.0) * (t_m / sqrt(((((2.0 * pow(t_m, 2.0)) + pow(l_m, 2.0)) / x) + (pow(t_m, 2.0) * (2.0 + (2.0 / x))))));
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = 2.0d0 - (4.0d0 * ((-1.0d0) / x))
t_3 = (t_m / (x ** (-0.5d0))) / l_m
t_4 = (l_m ** 2.0d0) / x
if (t_m <= 1.2d-226) then
tmp = t_3
else if (t_m <= 1.35d-122) then
tmp = sqrt(2.0d0) * (t_m / ((0.5d0 * (((t_4 + t_4) / t_m) * sqrt((1.0d0 / t_2)))) + (t_m * sqrt(t_2))))
else if (t_m <= 2.4d-98) then
tmp = sqrt(t_3) ** 2.0d0
else if (t_m <= 7.5d+46) then
tmp = sqrt(2.0d0) * (t_m / sqrt(((((2.0d0 * (t_m ** 2.0d0)) + (l_m ** 2.0d0)) / x) + ((t_m ** 2.0d0) * (2.0d0 + (2.0d0 / x))))))
else
tmp = 1.0d0 + ((0.5d0 / (x ** 2.0d0)) + (((-0.5d0) / (x ** 3.0d0)) + ((-1.0d0) / x)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 2.0 - (4.0 * (-1.0 / x));
double t_3 = (t_m / Math.pow(x, -0.5)) / l_m;
double t_4 = Math.pow(l_m, 2.0) / x;
double tmp;
if (t_m <= 1.2e-226) {
tmp = t_3;
} else if (t_m <= 1.35e-122) {
tmp = Math.sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * Math.sqrt((1.0 / t_2)))) + (t_m * Math.sqrt(t_2))));
} else if (t_m <= 2.4e-98) {
tmp = Math.pow(Math.sqrt(t_3), 2.0);
} else if (t_m <= 7.5e+46) {
tmp = Math.sqrt(2.0) * (t_m / Math.sqrt(((((2.0 * Math.pow(t_m, 2.0)) + Math.pow(l_m, 2.0)) / x) + (Math.pow(t_m, 2.0) * (2.0 + (2.0 / x))))));
} else {
tmp = 1.0 + ((0.5 / Math.pow(x, 2.0)) + ((-0.5 / Math.pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = 2.0 - (4.0 * (-1.0 / x)) t_3 = (t_m / math.pow(x, -0.5)) / l_m t_4 = math.pow(l_m, 2.0) / x tmp = 0 if t_m <= 1.2e-226: tmp = t_3 elif t_m <= 1.35e-122: tmp = math.sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * math.sqrt((1.0 / t_2)))) + (t_m * math.sqrt(t_2)))) elif t_m <= 2.4e-98: tmp = math.pow(math.sqrt(t_3), 2.0) elif t_m <= 7.5e+46: tmp = math.sqrt(2.0) * (t_m / math.sqrt(((((2.0 * math.pow(t_m, 2.0)) + math.pow(l_m, 2.0)) / x) + (math.pow(t_m, 2.0) * (2.0 + (2.0 / x)))))) else: tmp = 1.0 + ((0.5 / math.pow(x, 2.0)) + ((-0.5 / math.pow(x, 3.0)) + (-1.0 / x))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(2.0 - Float64(4.0 * Float64(-1.0 / x))) t_3 = Float64(Float64(t_m / (x ^ -0.5)) / l_m) t_4 = Float64((l_m ^ 2.0) / x) tmp = 0.0 if (t_m <= 1.2e-226) tmp = t_3; elseif (t_m <= 1.35e-122) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(t_4 + t_4) / t_m) * sqrt(Float64(1.0 / t_2)))) + Float64(t_m * sqrt(t_2))))); elseif (t_m <= 2.4e-98) tmp = sqrt(t_3) ^ 2.0; elseif (t_m <= 7.5e+46) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(Float64(2.0 * (t_m ^ 2.0)) + (l_m ^ 2.0)) / x) + Float64((t_m ^ 2.0) * Float64(2.0 + Float64(2.0 / x))))))); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = 2.0 - (4.0 * (-1.0 / x)); t_3 = (t_m / (x ^ -0.5)) / l_m; t_4 = (l_m ^ 2.0) / x; tmp = 0.0; if (t_m <= 1.2e-226) tmp = t_3; elseif (t_m <= 1.35e-122) tmp = sqrt(2.0) * (t_m / ((0.5 * (((t_4 + t_4) / t_m) * sqrt((1.0 / t_2)))) + (t_m * sqrt(t_2)))); elseif (t_m <= 2.4e-98) tmp = sqrt(t_3) ^ 2.0; elseif (t_m <= 7.5e+46) tmp = sqrt(2.0) * (t_m / sqrt(((((2.0 * (t_m ^ 2.0)) + (l_m ^ 2.0)) / x) + ((t_m ^ 2.0) * (2.0 + (2.0 / x)))))); else tmp = 1.0 + ((0.5 / (x ^ 2.0)) + ((-0.5 / (x ^ 3.0)) + (-1.0 / x))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(2.0 - N[(4.0 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.2e-226], t$95$3, If[LessEqual[t$95$m, 1.35e-122], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(t$95$4 + t$95$4), $MachinePrecision] / t$95$m), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.4e-98], N[Power[N[Sqrt[t$95$3], $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 7.5e+46], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 - 4 \cdot \frac{-1}{x}\\
t_3 := \frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
t_4 := \frac{{l\_m}^{2}}{x}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-226}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 1.35 \cdot 10^{-122}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \left(\frac{t\_4 + t\_4}{t\_m} \cdot \sqrt{\frac{1}{t\_2}}\right) + t\_m \cdot \sqrt{t\_2}}\\
\mathbf{elif}\;t\_m \leq 2.4 \cdot 10^{-98}:\\
\;\;\;\;{\left(\sqrt{t\_3}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\frac{2 \cdot {t\_m}^{2} + {l\_m}^{2}}{x} + {t\_m}^{2} \cdot \left(2 + \frac{2}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 1.2e-226Initial program 31.3%
Simplified31.3%
Taylor expanded in x around inf 58.2%
Taylor expanded in l around inf 20.8%
*-commutative20.8%
Simplified20.8%
*-un-lft-identity20.8%
pow1/220.8%
inv-pow20.8%
pow-pow20.8%
metadata-eval20.8%
Applied egg-rr20.8%
*-lft-identity20.8%
Simplified20.8%
associate-*r*20.8%
associate-*r/20.8%
times-frac20.9%
sqrt-undiv20.9%
metadata-eval20.9%
metadata-eval20.9%
metadata-eval20.9%
times-frac20.9%
*-un-lft-identity20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
*-lft-identity20.9%
associate-*r/20.9%
times-frac20.9%
associate-*l/20.9%
*-lft-identity20.9%
Simplified20.9%
if 1.2e-226 < t < 1.35000000000000005e-122Initial program 27.9%
Simplified27.9%
Taylor expanded in x around inf 75.3%
Taylor expanded in t around inf 61.1%
if 1.35000000000000005e-122 < t < 2.40000000000000005e-98Initial program 32.5%
Simplified32.5%
Taylor expanded in x around inf 80.0%
Taylor expanded in l around inf 3.1%
*-commutative3.1%
Simplified3.1%
add-sqr-sqrt0.0%
pow20.0%
associate-*r/0.0%
associate-*l*0.0%
pow1/20.0%
inv-pow0.0%
pow-pow0.0%
metadata-eval0.0%
Applied egg-rr0.0%
pow10.0%
pow10.0%
times-frac0.0%
sqrt-undiv0.0%
metadata-eval0.0%
metadata-eval0.0%
sqrt-prod0.0%
metadata-eval0.0%
Applied egg-rr0.0%
*-lft-identity0.0%
*-lft-identity0.0%
associate-*r/0.0%
times-frac0.0%
associate-*l/0.0%
*-lft-identity0.0%
Simplified0.0%
if 2.40000000000000005e-98 < t < 7.5000000000000003e46Initial program 55.4%
Simplified55.3%
Taylor expanded in x around inf 82.7%
Taylor expanded in t around inf 68.8%
associate-*r/68.8%
metadata-eval68.8%
Simplified68.8%
if 7.5000000000000003e46 < t Initial program 30.6%
Simplified30.6%
Taylor expanded in t around inf 97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in x around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x around 0 97.7%
associate--l+97.7%
sub-neg97.7%
associate-*r/97.7%
metadata-eval97.7%
+-commutative97.7%
distribute-neg-in97.7%
associate-*r/97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
distribute-neg-frac97.7%
metadata-eval97.7%
Simplified97.7%
Final simplification49.7%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (/ (/ t_m (pow x -0.5)) l_m)))
(*
t_s
(if (<= t_m 1.4e-225)
t_2
(if (<= t_m 1.65e-199)
1.0
(if (<= t_m 2e-146)
t_2
(if (<= t_m 1.1e-121)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(+
(/ (+ (* 2.0 (pow t_m 2.0)) (pow l_m 2.0)) x)
(* (pow t_m 2.0) (+ 2.0 (/ 2.0 x)))))))
(if (<= t_m 4.1e-98)
(pow (sqrt t_2) 2.0)
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x))))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 1.4e-225) {
tmp = t_2;
} else if (t_m <= 1.65e-199) {
tmp = 1.0;
} else if (t_m <= 2e-146) {
tmp = t_2;
} else if (t_m <= 1.1e-121) {
tmp = sqrt(2.0) * (t_m / sqrt(((((2.0 * pow(t_m, 2.0)) + pow(l_m, 2.0)) / x) + (pow(t_m, 2.0) * (2.0 + (2.0 / x))))));
} else if (t_m <= 4.1e-98) {
tmp = pow(sqrt(t_2), 2.0);
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m / (x ** (-0.5d0))) / l_m
if (t_m <= 1.4d-225) then
tmp = t_2
else if (t_m <= 1.65d-199) then
tmp = 1.0d0
else if (t_m <= 2d-146) then
tmp = t_2
else if (t_m <= 1.1d-121) then
tmp = sqrt(2.0d0) * (t_m / sqrt(((((2.0d0 * (t_m ** 2.0d0)) + (l_m ** 2.0d0)) / x) + ((t_m ** 2.0d0) * (2.0d0 + (2.0d0 / x))))))
else if (t_m <= 4.1d-98) then
tmp = sqrt(t_2) ** 2.0d0
else
tmp = 1.0d0 + ((0.5d0 / (x ** 2.0d0)) + (((-0.5d0) / (x ** 3.0d0)) + ((-1.0d0) / x)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / Math.pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 1.4e-225) {
tmp = t_2;
} else if (t_m <= 1.65e-199) {
tmp = 1.0;
} else if (t_m <= 2e-146) {
tmp = t_2;
} else if (t_m <= 1.1e-121) {
tmp = Math.sqrt(2.0) * (t_m / Math.sqrt(((((2.0 * Math.pow(t_m, 2.0)) + Math.pow(l_m, 2.0)) / x) + (Math.pow(t_m, 2.0) * (2.0 + (2.0 / x))))));
} else if (t_m <= 4.1e-98) {
tmp = Math.pow(Math.sqrt(t_2), 2.0);
} else {
tmp = 1.0 + ((0.5 / Math.pow(x, 2.0)) + ((-0.5 / Math.pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = (t_m / math.pow(x, -0.5)) / l_m tmp = 0 if t_m <= 1.4e-225: tmp = t_2 elif t_m <= 1.65e-199: tmp = 1.0 elif t_m <= 2e-146: tmp = t_2 elif t_m <= 1.1e-121: tmp = math.sqrt(2.0) * (t_m / math.sqrt(((((2.0 * math.pow(t_m, 2.0)) + math.pow(l_m, 2.0)) / x) + (math.pow(t_m, 2.0) * (2.0 + (2.0 / x)))))) elif t_m <= 4.1e-98: tmp = math.pow(math.sqrt(t_2), 2.0) else: tmp = 1.0 + ((0.5 / math.pow(x, 2.0)) + ((-0.5 / math.pow(x, 3.0)) + (-1.0 / x))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(Float64(t_m / (x ^ -0.5)) / l_m) tmp = 0.0 if (t_m <= 1.4e-225) tmp = t_2; elseif (t_m <= 1.65e-199) tmp = 1.0; elseif (t_m <= 2e-146) tmp = t_2; elseif (t_m <= 1.1e-121) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(Float64(Float64(Float64(Float64(2.0 * (t_m ^ 2.0)) + (l_m ^ 2.0)) / x) + Float64((t_m ^ 2.0) * Float64(2.0 + Float64(2.0 / x))))))); elseif (t_m <= 4.1e-98) tmp = sqrt(t_2) ^ 2.0; else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = (t_m / (x ^ -0.5)) / l_m; tmp = 0.0; if (t_m <= 1.4e-225) tmp = t_2; elseif (t_m <= 1.65e-199) tmp = 1.0; elseif (t_m <= 2e-146) tmp = t_2; elseif (t_m <= 1.1e-121) tmp = sqrt(2.0) * (t_m / sqrt(((((2.0 * (t_m ^ 2.0)) + (l_m ^ 2.0)) / x) + ((t_m ^ 2.0) * (2.0 + (2.0 / x)))))); elseif (t_m <= 4.1e-98) tmp = sqrt(t_2) ^ 2.0; else tmp = 1.0 + ((0.5 / (x ^ 2.0)) + ((-0.5 / (x ^ 3.0)) + (-1.0 / x))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.4e-225], t$95$2, If[LessEqual[t$95$m, 1.65e-199], 1.0, If[LessEqual[t$95$m, 2e-146], t$95$2, If[LessEqual[t$95$m, 1.1e-121], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(N[(N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.1e-98], N[Power[N[Sqrt[t$95$2], $MachinePrecision], 2.0], $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 1.65 \cdot 10^{-199}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-146}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 1.1 \cdot 10^{-121}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\frac{2 \cdot {t\_m}^{2} + {l\_m}^{2}}{x} + {t\_m}^{2} \cdot \left(2 + \frac{2}{x}\right)}}\\
\mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{-98}:\\
\;\;\;\;{\left(\sqrt{t\_2}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 1.4e-225 or 1.6500000000000001e-199 < t < 2.00000000000000005e-146Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 60.3%
Taylor expanded in l around inf 22.0%
*-commutative22.0%
Simplified22.0%
*-un-lft-identity22.0%
pow1/222.0%
inv-pow22.0%
pow-pow22.1%
metadata-eval22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
Simplified22.1%
associate-*r*22.1%
associate-*r/22.1%
times-frac22.1%
sqrt-undiv22.1%
metadata-eval22.1%
metadata-eval22.1%
metadata-eval22.1%
times-frac22.1%
*-un-lft-identity22.1%
*-un-lft-identity22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
associate-*r/22.1%
times-frac22.1%
associate-*l/22.1%
*-lft-identity22.1%
Simplified22.1%
if 1.4e-225 < t < 1.6500000000000001e-199Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 2.00000000000000005e-146 < t < 1.10000000000000011e-121Initial program 54.2%
Simplified54.2%
Taylor expanded in x around inf 87.4%
Taylor expanded in t around inf 72.4%
associate-*r/72.4%
metadata-eval72.4%
Simplified72.4%
if 1.10000000000000011e-121 < t < 4.0999999999999998e-98Initial program 32.5%
Simplified32.5%
Taylor expanded in x around inf 80.0%
Taylor expanded in l around inf 3.1%
*-commutative3.1%
Simplified3.1%
add-sqr-sqrt0.0%
pow20.0%
associate-*r/0.0%
associate-*l*0.0%
pow1/20.0%
inv-pow0.0%
pow-pow0.0%
metadata-eval0.0%
Applied egg-rr0.0%
pow10.0%
pow10.0%
times-frac0.0%
sqrt-undiv0.0%
metadata-eval0.0%
metadata-eval0.0%
sqrt-prod0.0%
metadata-eval0.0%
Applied egg-rr0.0%
*-lft-identity0.0%
*-lft-identity0.0%
associate-*r/0.0%
times-frac0.0%
associate-*l/0.0%
*-lft-identity0.0%
Simplified0.0%
if 4.0999999999999998e-98 < t Initial program 38.8%
Simplified38.8%
Taylor expanded in t around inf 87.4%
+-commutative87.4%
sub-neg87.4%
metadata-eval87.4%
+-commutative87.4%
Simplified87.4%
Taylor expanded in x around inf 87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
associate-*r/87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in x around 0 87.6%
associate--l+87.6%
sub-neg87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
distribute-neg-in87.6%
associate-*r/87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
Simplified87.6%
Final simplification49.2%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (/ (/ t_m (pow x -0.5)) l_m)))
(*
t_s
(if (<= t_m 4.9e-226)
t_2
(if (<= t_m 6.4e-196)
1.0
(if (<= t_m 2.1e-171)
t_2
(if (<= t_m 3.8e-122)
(+ 1.0 (/ -1.0 x))
(if (<= t_m 2.4e-98)
(pow (sqrt t_2) 2.0)
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x))))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 4.9e-226) {
tmp = t_2;
} else if (t_m <= 6.4e-196) {
tmp = 1.0;
} else if (t_m <= 2.1e-171) {
tmp = t_2;
} else if (t_m <= 3.8e-122) {
tmp = 1.0 + (-1.0 / x);
} else if (t_m <= 2.4e-98) {
tmp = pow(sqrt(t_2), 2.0);
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m / (x ** (-0.5d0))) / l_m
if (t_m <= 4.9d-226) then
tmp = t_2
else if (t_m <= 6.4d-196) then
tmp = 1.0d0
else if (t_m <= 2.1d-171) then
tmp = t_2
else if (t_m <= 3.8d-122) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t_m <= 2.4d-98) then
tmp = sqrt(t_2) ** 2.0d0
else
tmp = 1.0d0 + ((0.5d0 / (x ** 2.0d0)) + (((-0.5d0) / (x ** 3.0d0)) + ((-1.0d0) / x)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / Math.pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 4.9e-226) {
tmp = t_2;
} else if (t_m <= 6.4e-196) {
tmp = 1.0;
} else if (t_m <= 2.1e-171) {
tmp = t_2;
} else if (t_m <= 3.8e-122) {
tmp = 1.0 + (-1.0 / x);
} else if (t_m <= 2.4e-98) {
tmp = Math.pow(Math.sqrt(t_2), 2.0);
} else {
tmp = 1.0 + ((0.5 / Math.pow(x, 2.0)) + ((-0.5 / Math.pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = (t_m / math.pow(x, -0.5)) / l_m tmp = 0 if t_m <= 4.9e-226: tmp = t_2 elif t_m <= 6.4e-196: tmp = 1.0 elif t_m <= 2.1e-171: tmp = t_2 elif t_m <= 3.8e-122: tmp = 1.0 + (-1.0 / x) elif t_m <= 2.4e-98: tmp = math.pow(math.sqrt(t_2), 2.0) else: tmp = 1.0 + ((0.5 / math.pow(x, 2.0)) + ((-0.5 / math.pow(x, 3.0)) + (-1.0 / x))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(Float64(t_m / (x ^ -0.5)) / l_m) tmp = 0.0 if (t_m <= 4.9e-226) tmp = t_2; elseif (t_m <= 6.4e-196) tmp = 1.0; elseif (t_m <= 2.1e-171) tmp = t_2; elseif (t_m <= 3.8e-122) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t_m <= 2.4e-98) tmp = sqrt(t_2) ^ 2.0; else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = (t_m / (x ^ -0.5)) / l_m; tmp = 0.0; if (t_m <= 4.9e-226) tmp = t_2; elseif (t_m <= 6.4e-196) tmp = 1.0; elseif (t_m <= 2.1e-171) tmp = t_2; elseif (t_m <= 3.8e-122) tmp = 1.0 + (-1.0 / x); elseif (t_m <= 2.4e-98) tmp = sqrt(t_2) ^ 2.0; else tmp = 1.0 + ((0.5 / (x ^ 2.0)) + ((-0.5 / (x ^ 3.0)) + (-1.0 / x))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.9e-226], t$95$2, If[LessEqual[t$95$m, 6.4e-196], 1.0, If[LessEqual[t$95$m, 2.1e-171], t$95$2, If[LessEqual[t$95$m, 3.8e-122], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.4e-98], N[Power[N[Sqrt[t$95$2], $MachinePrecision], 2.0], $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.9 \cdot 10^{-226}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 6.4 \cdot 10^{-196}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{-171}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 3.8 \cdot 10^{-122}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t\_m \leq 2.4 \cdot 10^{-98}:\\
\;\;\;\;{\left(\sqrt{t\_2}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.89999999999999986e-226 or 6.3999999999999999e-196 < t < 2.1e-171Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 59.3%
Taylor expanded in l around inf 22.1%
*-commutative22.1%
Simplified22.1%
*-un-lft-identity22.1%
pow1/222.1%
inv-pow22.1%
pow-pow22.1%
metadata-eval22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
Simplified22.1%
associate-*r*22.1%
associate-*r/22.1%
times-frac22.1%
sqrt-undiv22.1%
metadata-eval22.1%
metadata-eval22.1%
metadata-eval22.1%
times-frac22.1%
*-un-lft-identity22.1%
*-un-lft-identity22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
associate-*r/22.1%
times-frac22.1%
associate-*l/22.1%
*-lft-identity22.1%
Simplified22.1%
if 4.89999999999999986e-226 < t < 6.3999999999999999e-196Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 2.1e-171 < t < 3.8000000000000001e-122Initial program 45.4%
Simplified45.4%
Taylor expanded in t around inf 59.7%
+-commutative59.7%
sub-neg59.7%
metadata-eval59.7%
+-commutative59.7%
Simplified59.7%
Taylor expanded in x around inf 59.9%
if 3.8000000000000001e-122 < t < 2.40000000000000005e-98Initial program 32.5%
Simplified32.5%
Taylor expanded in x around inf 80.0%
Taylor expanded in l around inf 3.1%
*-commutative3.1%
Simplified3.1%
add-sqr-sqrt0.0%
pow20.0%
associate-*r/0.0%
associate-*l*0.0%
pow1/20.0%
inv-pow0.0%
pow-pow0.0%
metadata-eval0.0%
Applied egg-rr0.0%
pow10.0%
pow10.0%
times-frac0.0%
sqrt-undiv0.0%
metadata-eval0.0%
metadata-eval0.0%
sqrt-prod0.0%
metadata-eval0.0%
Applied egg-rr0.0%
*-lft-identity0.0%
*-lft-identity0.0%
associate-*r/0.0%
times-frac0.0%
associate-*l/0.0%
*-lft-identity0.0%
Simplified0.0%
if 2.40000000000000005e-98 < t Initial program 38.8%
Simplified38.8%
Taylor expanded in t around inf 87.4%
+-commutative87.4%
sub-neg87.4%
metadata-eval87.4%
+-commutative87.4%
Simplified87.4%
Taylor expanded in x around inf 87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
associate-*r/87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in x around 0 87.6%
associate--l+87.6%
sub-neg87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
distribute-neg-in87.6%
associate-*r/87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
Simplified87.6%
Final simplification49.6%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (/ (/ t_m (pow x -0.5)) l_m)))
(*
t_s
(if (<= t_m 2.05e-225)
t_2
(if (<= t_m 5.4e-205)
1.0
(if (<= t_m 2e-171)
t_2
(if (<= t_m 1.5e-124)
(+ 1.0 (/ -1.0 x))
(if (<= t_m 4.1e-97)
(/ t_m (* (pow x -0.5) l_m))
(+
1.0
(+
(/ 0.5 (pow x 2.0))
(+ (/ -0.5 (pow x 3.0)) (/ -1.0 x))))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 5.4e-205) {
tmp = 1.0;
} else if (t_m <= 2e-171) {
tmp = t_2;
} else if (t_m <= 1.5e-124) {
tmp = 1.0 + (-1.0 / x);
} else if (t_m <= 4.1e-97) {
tmp = t_m / (pow(x, -0.5) * l_m);
} else {
tmp = 1.0 + ((0.5 / pow(x, 2.0)) + ((-0.5 / pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m / (x ** (-0.5d0))) / l_m
if (t_m <= 2.05d-225) then
tmp = t_2
else if (t_m <= 5.4d-205) then
tmp = 1.0d0
else if (t_m <= 2d-171) then
tmp = t_2
else if (t_m <= 1.5d-124) then
tmp = 1.0d0 + ((-1.0d0) / x)
else if (t_m <= 4.1d-97) then
tmp = t_m / ((x ** (-0.5d0)) * l_m)
else
tmp = 1.0d0 + ((0.5d0 / (x ** 2.0d0)) + (((-0.5d0) / (x ** 3.0d0)) + ((-1.0d0) / x)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / Math.pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 5.4e-205) {
tmp = 1.0;
} else if (t_m <= 2e-171) {
tmp = t_2;
} else if (t_m <= 1.5e-124) {
tmp = 1.0 + (-1.0 / x);
} else if (t_m <= 4.1e-97) {
tmp = t_m / (Math.pow(x, -0.5) * l_m);
} else {
tmp = 1.0 + ((0.5 / Math.pow(x, 2.0)) + ((-0.5 / Math.pow(x, 3.0)) + (-1.0 / x)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = (t_m / math.pow(x, -0.5)) / l_m tmp = 0 if t_m <= 2.05e-225: tmp = t_2 elif t_m <= 5.4e-205: tmp = 1.0 elif t_m <= 2e-171: tmp = t_2 elif t_m <= 1.5e-124: tmp = 1.0 + (-1.0 / x) elif t_m <= 4.1e-97: tmp = t_m / (math.pow(x, -0.5) * l_m) else: tmp = 1.0 + ((0.5 / math.pow(x, 2.0)) + ((-0.5 / math.pow(x, 3.0)) + (-1.0 / x))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(Float64(t_m / (x ^ -0.5)) / l_m) tmp = 0.0 if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 5.4e-205) tmp = 1.0; elseif (t_m <= 2e-171) tmp = t_2; elseif (t_m <= 1.5e-124) tmp = Float64(1.0 + Float64(-1.0 / x)); elseif (t_m <= 4.1e-97) tmp = Float64(t_m / Float64((x ^ -0.5) * l_m)); else tmp = Float64(1.0 + Float64(Float64(0.5 / (x ^ 2.0)) + Float64(Float64(-0.5 / (x ^ 3.0)) + Float64(-1.0 / x)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = (t_m / (x ^ -0.5)) / l_m; tmp = 0.0; if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 5.4e-205) tmp = 1.0; elseif (t_m <= 2e-171) tmp = t_2; elseif (t_m <= 1.5e-124) tmp = 1.0 + (-1.0 / x); elseif (t_m <= 4.1e-97) tmp = t_m / ((x ^ -0.5) * l_m); else tmp = 1.0 + ((0.5 / (x ^ 2.0)) + ((-0.5 / (x ^ 3.0)) + (-1.0 / x))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.05e-225], t$95$2, If[LessEqual[t$95$m, 5.4e-205], 1.0, If[LessEqual[t$95$m, 2e-171], t$95$2, If[LessEqual[t$95$m, 1.5e-124], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.1e-97], N[(t$95$m / N[(N[Power[x, -0.5], $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.5 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.05 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 5.4 \cdot 10^{-205}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-171}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{-124}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{t\_m}{{x}^{-0.5} \cdot l\_m}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{{x}^{2}} + \left(\frac{-0.5}{{x}^{3}} + \frac{-1}{x}\right)\right)\\
\end{array}
\end{array}
\end{array}
if t < 2.05000000000000011e-225 or 5.4000000000000002e-205 < t < 2e-171Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 59.3%
Taylor expanded in l around inf 22.1%
*-commutative22.1%
Simplified22.1%
*-un-lft-identity22.1%
pow1/222.1%
inv-pow22.1%
pow-pow22.1%
metadata-eval22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
Simplified22.1%
associate-*r*22.1%
associate-*r/22.1%
times-frac22.1%
sqrt-undiv22.1%
metadata-eval22.1%
metadata-eval22.1%
metadata-eval22.1%
times-frac22.1%
*-un-lft-identity22.1%
*-un-lft-identity22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
associate-*r/22.1%
times-frac22.1%
associate-*l/22.1%
*-lft-identity22.1%
Simplified22.1%
if 2.05000000000000011e-225 < t < 5.4000000000000002e-205Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 2e-171 < t < 1.5e-124Initial program 45.4%
Simplified45.4%
Taylor expanded in t around inf 59.7%
+-commutative59.7%
sub-neg59.7%
metadata-eval59.7%
+-commutative59.7%
Simplified59.7%
Taylor expanded in x around inf 59.9%
if 1.5e-124 < t < 4.09999999999999993e-97Initial program 32.5%
Simplified32.5%
Taylor expanded in x around inf 80.0%
Taylor expanded in l around inf 3.1%
*-commutative3.1%
Simplified3.1%
*-un-lft-identity3.1%
pow1/23.1%
inv-pow3.1%
pow-pow3.1%
metadata-eval3.1%
Applied egg-rr3.1%
*-lft-identity3.1%
Simplified3.1%
associate-*r*3.1%
associate-*r/3.1%
times-frac3.1%
sqrt-undiv3.1%
metadata-eval3.1%
metadata-eval3.1%
metadata-eval3.1%
times-frac3.1%
*-un-lft-identity3.1%
*-un-lft-identity3.1%
Applied egg-rr3.1%
if 4.09999999999999993e-97 < t Initial program 38.8%
Simplified38.8%
Taylor expanded in t around inf 87.4%
+-commutative87.4%
sub-neg87.4%
metadata-eval87.4%
+-commutative87.4%
Simplified87.4%
Taylor expanded in x around inf 87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
associate-*r/87.6%
metadata-eval87.6%
Simplified87.6%
Taylor expanded in x around 0 87.6%
associate--l+87.6%
sub-neg87.6%
associate-*r/87.6%
metadata-eval87.6%
+-commutative87.6%
distribute-neg-in87.6%
associate-*r/87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
distribute-neg-frac87.6%
metadata-eval87.6%
Simplified87.6%
Final simplification49.6%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (/ t_m (* (pow x -0.5) l_m))))
(*
t_s
(if (<= t_m 2.05e-225)
t_2
(if (<= t_m 7.4e-205)
1.0
(if (or (<= t_m 3.9e-171)
(and (not (<= t_m 1.1e-121)) (<= t_m 3.5e-98)))
t_2
(+ 1.0 (/ -1.0 x))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = t_m / (pow(x, -0.5) * l_m);
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 7.4e-205) {
tmp = 1.0;
} else if ((t_m <= 3.9e-171) || (!(t_m <= 1.1e-121) && (t_m <= 3.5e-98))) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = t_m / ((x ** (-0.5d0)) * l_m)
if (t_m <= 2.05d-225) then
tmp = t_2
else if (t_m <= 7.4d-205) then
tmp = 1.0d0
else if ((t_m <= 3.9d-171) .or. (.not. (t_m <= 1.1d-121)) .and. (t_m <= 3.5d-98)) then
tmp = t_2
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = t_m / (Math.pow(x, -0.5) * l_m);
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 7.4e-205) {
tmp = 1.0;
} else if ((t_m <= 3.9e-171) || (!(t_m <= 1.1e-121) && (t_m <= 3.5e-98))) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = t_m / (math.pow(x, -0.5) * l_m) tmp = 0 if t_m <= 2.05e-225: tmp = t_2 elif t_m <= 7.4e-205: tmp = 1.0 elif (t_m <= 3.9e-171) or (not (t_m <= 1.1e-121) and (t_m <= 3.5e-98)): tmp = t_2 else: tmp = 1.0 + (-1.0 / x) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(t_m / Float64((x ^ -0.5) * l_m)) tmp = 0.0 if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 7.4e-205) tmp = 1.0; elseif ((t_m <= 3.9e-171) || (!(t_m <= 1.1e-121) && (t_m <= 3.5e-98))) tmp = t_2; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = t_m / ((x ^ -0.5) * l_m); tmp = 0.0; if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 7.4e-205) tmp = 1.0; elseif ((t_m <= 3.9e-171) || (~((t_m <= 1.1e-121)) && (t_m <= 3.5e-98))) tmp = t_2; else tmp = 1.0 + (-1.0 / x); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(t$95$m / N[(N[Power[x, -0.5], $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.05e-225], t$95$2, If[LessEqual[t$95$m, 7.4e-205], 1.0, If[Or[LessEqual[t$95$m, 3.9e-171], And[N[Not[LessEqual[t$95$m, 1.1e-121]], $MachinePrecision], LessEqual[t$95$m, 3.5e-98]]], t$95$2, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m}{{x}^{-0.5} \cdot l\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.05 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 7.4 \cdot 10^{-205}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 3.9 \cdot 10^{-171} \lor \neg \left(t\_m \leq 1.1 \cdot 10^{-121}\right) \land t\_m \leq 3.5 \cdot 10^{-98}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
\end{array}
if t < 2.05000000000000011e-225 or 7.4000000000000002e-205 < t < 3.8999999999999998e-171 or 1.10000000000000011e-121 < t < 3.5000000000000002e-98Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 59.6%
Taylor expanded in l around inf 21.8%
*-commutative21.8%
Simplified21.8%
*-un-lft-identity21.8%
pow1/221.8%
inv-pow21.8%
pow-pow21.8%
metadata-eval21.8%
Applied egg-rr21.8%
*-lft-identity21.8%
Simplified21.8%
associate-*r*21.8%
associate-*r/21.8%
times-frac21.9%
sqrt-undiv21.9%
metadata-eval21.9%
metadata-eval21.9%
metadata-eval21.9%
times-frac21.9%
*-un-lft-identity21.9%
*-un-lft-identity21.9%
Applied egg-rr21.9%
if 2.05000000000000011e-225 < t < 7.4000000000000002e-205Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 3.8999999999999998e-171 < t < 1.10000000000000011e-121 or 3.5000000000000002e-98 < t Initial program 39.6%
Simplified39.5%
Taylor expanded in t around inf 84.1%
+-commutative84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 84.3%
Final simplification49.6%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (/ (/ t_m (pow x -0.5)) l_m)))
(*
t_s
(if (<= t_m 2.05e-225)
t_2
(if (<= t_m 3.25e-202)
1.0
(if (<= t_m 4.1e-171)
t_2
(if (or (<= t_m 6.5e-122) (not (<= t_m 4e-97)))
(+ 1.0 (/ -1.0 x))
(/ t_m (* (pow x -0.5) l_m)))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 3.25e-202) {
tmp = 1.0;
} else if (t_m <= 4.1e-171) {
tmp = t_2;
} else if ((t_m <= 6.5e-122) || !(t_m <= 4e-97)) {
tmp = 1.0 + (-1.0 / x);
} else {
tmp = t_m / (pow(x, -0.5) * l_m);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m / (x ** (-0.5d0))) / l_m
if (t_m <= 2.05d-225) then
tmp = t_2
else if (t_m <= 3.25d-202) then
tmp = 1.0d0
else if (t_m <= 4.1d-171) then
tmp = t_2
else if ((t_m <= 6.5d-122) .or. (.not. (t_m <= 4d-97))) then
tmp = 1.0d0 + ((-1.0d0) / x)
else
tmp = t_m / ((x ** (-0.5d0)) * l_m)
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / Math.pow(x, -0.5)) / l_m;
double tmp;
if (t_m <= 2.05e-225) {
tmp = t_2;
} else if (t_m <= 3.25e-202) {
tmp = 1.0;
} else if (t_m <= 4.1e-171) {
tmp = t_2;
} else if ((t_m <= 6.5e-122) || !(t_m <= 4e-97)) {
tmp = 1.0 + (-1.0 / x);
} else {
tmp = t_m / (Math.pow(x, -0.5) * l_m);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = (t_m / math.pow(x, -0.5)) / l_m tmp = 0 if t_m <= 2.05e-225: tmp = t_2 elif t_m <= 3.25e-202: tmp = 1.0 elif t_m <= 4.1e-171: tmp = t_2 elif (t_m <= 6.5e-122) or not (t_m <= 4e-97): tmp = 1.0 + (-1.0 / x) else: tmp = t_m / (math.pow(x, -0.5) * l_m) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(Float64(t_m / (x ^ -0.5)) / l_m) tmp = 0.0 if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 3.25e-202) tmp = 1.0; elseif (t_m <= 4.1e-171) tmp = t_2; elseif ((t_m <= 6.5e-122) || !(t_m <= 4e-97)) tmp = Float64(1.0 + Float64(-1.0 / x)); else tmp = Float64(t_m / Float64((x ^ -0.5) * l_m)); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = (t_m / (x ^ -0.5)) / l_m; tmp = 0.0; if (t_m <= 2.05e-225) tmp = t_2; elseif (t_m <= 3.25e-202) tmp = 1.0; elseif (t_m <= 4.1e-171) tmp = t_2; elseif ((t_m <= 6.5e-122) || ~((t_m <= 4e-97))) tmp = 1.0 + (-1.0 / x); else tmp = t_m / ((x ^ -0.5) * l_m); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(t$95$m / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.05e-225], t$95$2, If[LessEqual[t$95$m, 3.25e-202], 1.0, If[LessEqual[t$95$m, 4.1e-171], t$95$2, If[Or[LessEqual[t$95$m, 6.5e-122], N[Not[LessEqual[t$95$m, 4e-97]], $MachinePrecision]], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m / N[(N[Power[x, -0.5], $MachinePrecision] * l$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\frac{t\_m}{{x}^{-0.5}}}{l\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.05 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 3.25 \cdot 10^{-202}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{-171}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{-122} \lor \neg \left(t\_m \leq 4 \cdot 10^{-97}\right):\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m}{{x}^{-0.5} \cdot l\_m}\\
\end{array}
\end{array}
\end{array}
if t < 2.05000000000000011e-225 or 3.24999999999999978e-202 < t < 4.1e-171Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 59.3%
Taylor expanded in l around inf 22.1%
*-commutative22.1%
Simplified22.1%
*-un-lft-identity22.1%
pow1/222.1%
inv-pow22.1%
pow-pow22.1%
metadata-eval22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
Simplified22.1%
associate-*r*22.1%
associate-*r/22.1%
times-frac22.1%
sqrt-undiv22.1%
metadata-eval22.1%
metadata-eval22.1%
metadata-eval22.1%
times-frac22.1%
*-un-lft-identity22.1%
*-un-lft-identity22.1%
Applied egg-rr22.1%
*-lft-identity22.1%
associate-*r/22.1%
times-frac22.1%
associate-*l/22.1%
*-lft-identity22.1%
Simplified22.1%
if 2.05000000000000011e-225 < t < 3.24999999999999978e-202Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 4.1e-171 < t < 6.49999999999999965e-122 or 4.00000000000000014e-97 < t Initial program 39.6%
Simplified39.5%
Taylor expanded in t around inf 84.1%
+-commutative84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 84.3%
if 6.49999999999999965e-122 < t < 4.00000000000000014e-97Initial program 32.5%
Simplified32.5%
Taylor expanded in x around inf 80.0%
Taylor expanded in l around inf 3.1%
*-commutative3.1%
Simplified3.1%
*-un-lft-identity3.1%
pow1/23.1%
inv-pow3.1%
pow-pow3.1%
metadata-eval3.1%
Applied egg-rr3.1%
*-lft-identity3.1%
Simplified3.1%
associate-*r*3.1%
associate-*r/3.1%
times-frac3.1%
sqrt-undiv3.1%
metadata-eval3.1%
metadata-eval3.1%
metadata-eval3.1%
times-frac3.1%
*-un-lft-identity3.1%
*-un-lft-identity3.1%
Applied egg-rr3.1%
Final simplification49.6%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (* (/ t_m l_m) (sqrt x))))
(*
t_s
(if (<= t_m 1.55e-225)
t_2
(if (<= t_m 4.7e-197)
1.0
(if (or (<= t_m 6e-172)
(and (not (<= t_m 1.06e-121)) (<= t_m 2.4e-98)))
t_2
(+ 1.0 (/ -1.0 x))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / l_m) * sqrt(x);
double tmp;
if (t_m <= 1.55e-225) {
tmp = t_2;
} else if (t_m <= 4.7e-197) {
tmp = 1.0;
} else if ((t_m <= 6e-172) || (!(t_m <= 1.06e-121) && (t_m <= 2.4e-98))) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m / l_m) * sqrt(x)
if (t_m <= 1.55d-225) then
tmp = t_2
else if (t_m <= 4.7d-197) then
tmp = 1.0d0
else if ((t_m <= 6d-172) .or. (.not. (t_m <= 1.06d-121)) .and. (t_m <= 2.4d-98)) then
tmp = t_2
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
double t_2 = (t_m / l_m) * Math.sqrt(x);
double tmp;
if (t_m <= 1.55e-225) {
tmp = t_2;
} else if (t_m <= 4.7e-197) {
tmp = 1.0;
} else if ((t_m <= 6e-172) || (!(t_m <= 1.06e-121) && (t_m <= 2.4e-98))) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): t_2 = (t_m / l_m) * math.sqrt(x) tmp = 0 if t_m <= 1.55e-225: tmp = t_2 elif t_m <= 4.7e-197: tmp = 1.0 elif (t_m <= 6e-172) or (not (t_m <= 1.06e-121) and (t_m <= 2.4e-98)): tmp = t_2 else: tmp = 1.0 + (-1.0 / x) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(Float64(t_m / l_m) * sqrt(x)) tmp = 0.0 if (t_m <= 1.55e-225) tmp = t_2; elseif (t_m <= 4.7e-197) tmp = 1.0; elseif ((t_m <= 6e-172) || (!(t_m <= 1.06e-121) && (t_m <= 2.4e-98))) tmp = t_2; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l_m, t_m) t_2 = (t_m / l_m) * sqrt(x); tmp = 0.0; if (t_m <= 1.55e-225) tmp = t_2; elseif (t_m <= 4.7e-197) tmp = 1.0; elseif ((t_m <= 6e-172) || (~((t_m <= 1.06e-121)) && (t_m <= 2.4e-98))) tmp = t_2; else tmp = 1.0 + (-1.0 / x); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.55e-225], t$95$2, If[LessEqual[t$95$m, 4.7e-197], 1.0, If[Or[LessEqual[t$95$m, 6e-172], And[N[Not[LessEqual[t$95$m, 1.06e-121]], $MachinePrecision], LessEqual[t$95$m, 2.4e-98]]], t$95$2, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m}{l\_m} \cdot \sqrt{x}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 4.7 \cdot 10^{-197}:\\
\;\;\;\;1\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{-172} \lor \neg \left(t\_m \leq 1.06 \cdot 10^{-121}\right) \land t\_m \leq 2.4 \cdot 10^{-98}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
\end{array}
if t < 1.54999999999999998e-225 or 4.7000000000000001e-197 < t < 5.99999999999999967e-172 or 1.05999999999999997e-121 < t < 2.40000000000000005e-98Initial program 30.1%
Simplified30.1%
Taylor expanded in x around inf 59.6%
Taylor expanded in l around inf 21.8%
*-commutative21.8%
Simplified21.8%
Taylor expanded in t around 0 18.9%
if 1.54999999999999998e-225 < t < 4.7000000000000001e-197Initial program 3.1%
Simplified3.1%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 5.99999999999999967e-172 < t < 1.05999999999999997e-121 or 2.40000000000000005e-98 < t Initial program 39.6%
Simplified39.5%
Taylor expanded in t around inf 84.1%
+-commutative84.1%
sub-neg84.1%
metadata-eval84.1%
+-commutative84.1%
Simplified84.1%
Taylor expanded in x around inf 84.3%
Final simplification47.9%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l_m t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
code = t_s * (1.0d0 + ((-1.0d0) / x))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): return t_s * (1.0 + (-1.0 / x))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) return Float64(t_s * Float64(1.0 + Float64(-1.0 / x))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l_m, t_m) tmp = t_s * (1.0 + (-1.0 / x)); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(1 + \frac{-1}{x}\right)
\end{array}
Initial program 33.9%
Simplified33.9%
Taylor expanded in t around inf 39.9%
+-commutative39.9%
sub-neg39.9%
metadata-eval39.9%
+-commutative39.9%
Simplified39.9%
Taylor expanded in x around inf 39.9%
Final simplification39.9%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l_m t_m) :precision binary64 (* t_s 1.0))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
return t_s * 1.0;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
code = t_s * 1.0d0
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l_m, double t_m) {
return t_s * 1.0;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): return t_s * 1.0
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) return Float64(t_s * 1.0) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l_m, t_m) tmp = t_s * 1.0; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, x_, l$95$m_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot 1
\end{array}
Initial program 33.9%
Simplified33.9%
Taylor expanded in t around inf 39.9%
+-commutative39.9%
sub-neg39.9%
metadata-eval39.9%
+-commutative39.9%
Simplified39.9%
Taylor expanded in x around inf 39.5%
Final simplification39.5%
herbie shell --seed 2024052
(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)))))