
(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 12 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}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= t_m 9.5e-164)
(*
(sqrt 2.0)
(/
t_m
(+
(*
0.5
(/
(+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l 2.0)))
(* t_m (* (sqrt 2.0) x))))
(* t_m (sqrt 2.0)))))
(if (<= t_m 1.15e+33)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(fma
2.0
(* (pow t_m 2.0) (/ (+ x 1.0) (+ -1.0 x)))
(*
(pow l 2.0)
(+
(/ 1.0 (+ -1.0 x))
(/ (+ 1.0 (/ (+ 1.0 (+ (/ 1.0 x) (/ 1.0 (pow x 2.0)))) x)) x)))))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (t_m <= 9.5e-164) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
} else if (t_m <= 1.15e+33) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) * ((x + 1.0) / (-1.0 + x))), (pow(l, 2.0) * ((1.0 / (-1.0 + x)) + ((1.0 + ((1.0 + ((1.0 / x) + (1.0 / pow(x, 2.0)))) / x)) / x))))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (t_m <= 9.5e-164) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 1.15e+33) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) * Float64(Float64(x + 1.0) / Float64(-1.0 + x))), Float64((l ^ 2.0) * Float64(Float64(1.0 / Float64(-1.0 + x)) + Float64(Float64(1.0 + Float64(Float64(1.0 + Float64(Float64(1.0 / x) + Float64(1.0 / (x ^ 2.0)))) / x)) / x))))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 9.5e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.15e+33], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(1.0 / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 + N[(N[(1.0 + N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.5 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{2 \cdot \left({t\_m}^{2} + {t\_m}^{2}\right) + 2 \cdot {\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)} + t\_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t\_m \leq 1.15 \cdot 10^{+33}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot \frac{x + 1}{-1 + x}, {\ell}^{2} \cdot \left(\frac{1}{-1 + x} + \frac{1 + \frac{1 + \left(\frac{1}{x} + \frac{1}{{x}^{2}}\right)}{x}}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
if t < 9.5000000000000001e-164Initial program 26.6%
Simplified26.6%
Taylor expanded in l around 0 26.5%
fma-define26.5%
sub-neg26.5%
metadata-eval26.5%
associate-/l*34.9%
+-commutative34.9%
+-commutative34.9%
associate--l+43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
Simplified43.9%
Taylor expanded in x around inf 14.5%
if 9.5000000000000001e-164 < t < 1.15000000000000005e33Initial program 56.9%
Simplified56.8%
Taylor expanded in l around 0 60.3%
fma-define60.3%
sub-neg60.3%
metadata-eval60.3%
associate-/l*70.4%
+-commutative70.4%
+-commutative70.4%
associate--l+73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around -inf 86.7%
if 1.15000000000000005e33 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification47.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= t_m 6.8e-164)
(*
(sqrt 2.0)
(/
t_m
(+
(*
0.5
(/
(+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l 2.0)))
(* t_m (* (sqrt 2.0) x))))
(* t_m (sqrt 2.0)))))
(if (<= t_m 5.5e+32)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(fma
2.0
(* (pow t_m 2.0) (/ (+ x 1.0) (+ -1.0 x)))
(*
(pow l 2.0)
(/
(+ 2.0 (/ (+ 2.0 (+ (* 2.0 (/ 1.0 x)) (/ 2.0 (pow x 2.0)))) x))
x))))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (t_m <= 6.8e-164) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
} else if (t_m <= 5.5e+32) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) * ((x + 1.0) / (-1.0 + x))), (pow(l, 2.0) * ((2.0 + ((2.0 + ((2.0 * (1.0 / x)) + (2.0 / pow(x, 2.0)))) / x)) / x)))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (t_m <= 6.8e-164) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 5.5e+32) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) * Float64(Float64(x + 1.0) / Float64(-1.0 + x))), Float64((l ^ 2.0) * Float64(Float64(2.0 + Float64(Float64(2.0 + Float64(Float64(2.0 * Float64(1.0 / x)) + Float64(2.0 / (x ^ 2.0)))) / x)) / x)))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-164], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+32], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(2.0 + N[(N[(2.0 + N[(N[(2.0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{2 \cdot \left({t\_m}^{2} + {t\_m}^{2}\right) + 2 \cdot {\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)} + t\_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot \frac{x + 1}{-1 + x}, {\ell}^{2} \cdot \frac{2 + \frac{2 + \left(2 \cdot \frac{1}{x} + \frac{2}{{x}^{2}}\right)}{x}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
if t < 6.8e-164Initial program 26.6%
Simplified26.6%
Taylor expanded in l around 0 26.5%
fma-define26.5%
sub-neg26.5%
metadata-eval26.5%
associate-/l*34.9%
+-commutative34.9%
+-commutative34.9%
associate--l+43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
Simplified43.9%
Taylor expanded in x around inf 14.5%
if 6.8e-164 < t < 5.49999999999999984e32Initial program 56.9%
Simplified56.8%
Taylor expanded in l around 0 60.3%
fma-define60.3%
sub-neg60.3%
metadata-eval60.3%
associate-/l*70.4%
+-commutative70.4%
+-commutative70.4%
associate--l+73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around -inf 86.7%
if 5.49999999999999984e32 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification47.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= t_m 1.02e-163)
(*
(sqrt 2.0)
(/
t_m
(+
(*
0.5
(/
(+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l 2.0)))
(* t_m (* (sqrt 2.0) x))))
(* t_m (sqrt 2.0)))))
(if (<= t_m 2.7e+32)
(*
t_m
(/
(sqrt 2.0)
(sqrt
(fma
2.0
(* (pow t_m 2.0) (/ (+ x 1.0) (+ -1.0 x)))
(* (pow l 2.0) (/ (+ 2.0 (/ 2.0 x)) x))))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (t_m <= 1.02e-163) {
tmp = sqrt(2.0) * (t_m / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
} else if (t_m <= 2.7e+32) {
tmp = t_m * (sqrt(2.0) / sqrt(fma(2.0, (pow(t_m, 2.0) * ((x + 1.0) / (-1.0 + x))), (pow(l, 2.0) * ((2.0 + (2.0 / x)) / x)))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (t_m <= 1.02e-163) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 2.7e+32) tmp = Float64(t_m * Float64(sqrt(2.0) / sqrt(fma(2.0, Float64((t_m ^ 2.0) * Float64(Float64(x + 1.0) / Float64(-1.0 + x))), Float64((l ^ 2.0) * Float64(Float64(2.0 + Float64(2.0 / x)) / x)))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-163], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.7e+32], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{0.5 \cdot \frac{2 \cdot \left({t\_m}^{2} + {t\_m}^{2}\right) + 2 \cdot {\ell}^{2}}{t\_m \cdot \left(\sqrt{2} \cdot x\right)} + t\_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t\_m \leq 2.7 \cdot 10^{+32}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot \frac{x + 1}{-1 + x}, {\ell}^{2} \cdot \frac{2 + \frac{2}{x}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
if t < 1.02000000000000007e-163Initial program 26.6%
Simplified26.6%
Taylor expanded in l around 0 26.5%
fma-define26.5%
sub-neg26.5%
metadata-eval26.5%
associate-/l*34.9%
+-commutative34.9%
+-commutative34.9%
associate--l+43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
sub-neg43.9%
metadata-eval43.9%
+-commutative43.9%
Simplified43.9%
Taylor expanded in x around inf 14.5%
if 1.02000000000000007e-163 < t < 2.70000000000000013e32Initial program 56.9%
Simplified56.8%
Taylor expanded in l around 0 60.3%
fma-define60.3%
sub-neg60.3%
metadata-eval60.3%
associate-/l*70.4%
+-commutative70.4%
+-commutative70.4%
associate--l+73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 85.7%
associate-*r/85.7%
metadata-eval85.7%
Simplified85.7%
clear-num85.8%
un-div-inv85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-/r/85.8%
+-commutative85.8%
Simplified85.8%
if 2.70000000000000013e32 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification47.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (/ (+ x 1.0) (+ -1.0 x))) (t_3 (* t_m (sqrt 2.0))))
(*
t_s
(if (<= t_m 1e-163)
(/ t_3 (hypot (* (hypot l t_3) (sqrt t_2)) l))
(if (<= t_m 1.8e+32)
(*
t_m
(/
(sqrt 2.0)
(sqrt
(fma
2.0
(* (pow t_m 2.0) t_2)
(* (pow l 2.0) (/ (+ 2.0 (/ 2.0 x)) x))))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (x + 1.0) / (-1.0 + x);
double t_3 = t_m * sqrt(2.0);
double tmp;
if (t_m <= 1e-163) {
tmp = t_3 / hypot((hypot(l, t_3) * sqrt(t_2)), l);
} else if (t_m <= 1.8e+32) {
tmp = t_m * (sqrt(2.0) / sqrt(fma(2.0, (pow(t_m, 2.0) * t_2), (pow(l, 2.0) * ((2.0 + (2.0 / x)) / x)))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) t_3 = Float64(t_m * sqrt(2.0)) tmp = 0.0 if (t_m <= 1e-163) tmp = Float64(t_3 / hypot(Float64(hypot(l, t_3) * sqrt(t_2)), l)); elseif (t_m <= 1.8e+32) tmp = Float64(t_m * Float64(sqrt(2.0) / sqrt(fma(2.0, Float64((t_m ^ 2.0) * t_2), Float64((l ^ 2.0) * Float64(Float64(2.0 + Float64(2.0 / x)) / x)))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-163], N[(t$95$3 / N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$3 ^ 2], $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.8e+32], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{x + 1}{-1 + x}\\
t_3 := t\_m \cdot \sqrt{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-163}:\\
\;\;\;\;\frac{t\_3}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t\_3\right) \cdot \sqrt{t\_2}, \ell\right)}\\
\mathbf{elif}\;t\_m \leq 1.8 \cdot 10^{+32}:\\
\;\;\;\;t\_m \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, {t\_m}^{2} \cdot t\_2, {\ell}^{2} \cdot \frac{2 + \frac{2}{x}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
\end{array}
if t < 9.99999999999999923e-164Initial program 26.6%
Simplified22.5%
Applied egg-rr67.6%
if 9.99999999999999923e-164 < t < 1.7999999999999998e32Initial program 56.9%
Simplified56.8%
Taylor expanded in l around 0 60.3%
fma-define60.3%
sub-neg60.3%
metadata-eval60.3%
associate-/l*70.4%
+-commutative70.4%
+-commutative70.4%
associate--l+73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 85.7%
associate-*r/85.7%
metadata-eval85.7%
Simplified85.7%
clear-num85.8%
un-div-inv85.8%
+-commutative85.8%
Applied egg-rr85.8%
associate-/r/85.8%
+-commutative85.8%
Simplified85.8%
if 1.7999999999999998e32 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification78.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (/ (+ x 1.0) (+ -1.0 x))) (t_3 (* t_m (sqrt 2.0))))
(*
t_s
(if (<= t_m 9.6e-164)
(/ t_3 (hypot (* (hypot l t_3) (sqrt t_2)) l))
(if (<= t_m 8.8e+32)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(fma
2.0
(* t_2 (* t_m t_m))
(* (pow l 2.0) (/ (+ 2.0 (/ 2.0 x)) x))))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (x + 1.0) / (-1.0 + x);
double t_3 = t_m * sqrt(2.0);
double tmp;
if (t_m <= 9.6e-164) {
tmp = t_3 / hypot((hypot(l, t_3) * sqrt(t_2)), l);
} else if (t_m <= 8.8e+32) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (t_2 * (t_m * t_m)), (pow(l, 2.0) * ((2.0 + (2.0 / x)) / x)))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) t_3 = Float64(t_m * sqrt(2.0)) tmp = 0.0 if (t_m <= 9.6e-164) tmp = Float64(t_3 / hypot(Float64(hypot(l, t_3) * sqrt(t_2)), l)); elseif (t_m <= 8.8e+32) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64(t_2 * Float64(t_m * t_m)), Float64((l ^ 2.0) * Float64(Float64(2.0 + Float64(2.0 / x)) / x)))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 9.6e-164], N[(t$95$3 / N[Sqrt[N[(N[Sqrt[l ^ 2 + t$95$3 ^ 2], $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] ^ 2 + l ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.8e+32], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(t$95$2 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{x + 1}{-1 + x}\\
t_3 := t\_m \cdot \sqrt{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.6 \cdot 10^{-164}:\\
\;\;\;\;\frac{t\_3}{\mathsf{hypot}\left(\mathsf{hypot}\left(\ell, t\_3\right) \cdot \sqrt{t\_2}, \ell\right)}\\
\mathbf{elif}\;t\_m \leq 8.8 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, t\_2 \cdot \left(t\_m \cdot t\_m\right), {\ell}^{2} \cdot \frac{2 + \frac{2}{x}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
\end{array}
if t < 9.59999999999999932e-164Initial program 26.6%
Simplified22.5%
Applied egg-rr67.6%
if 9.59999999999999932e-164 < t < 8.80000000000000004e32Initial program 56.9%
Simplified56.8%
Taylor expanded in l around 0 60.3%
fma-define60.3%
sub-neg60.3%
metadata-eval60.3%
associate-/l*70.4%
+-commutative70.4%
+-commutative70.4%
associate--l+73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
sub-neg73.3%
metadata-eval73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 85.7%
associate-*r/85.7%
metadata-eval85.7%
Simplified85.7%
unpow285.7%
Applied egg-rr85.7%
if 8.80000000000000004e32 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification78.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (/ (+ 2.0 (/ 2.0 x)) x)))
(*
t_s
(if (<= t_m 3.9e-161)
(* (sqrt 2.0) (/ t_m (* l (sqrt t_2))))
(if (<= t_m 1.06e+32)
(*
(sqrt 2.0)
(/
t_m
(sqrt
(fma
2.0
(* (/ (+ x 1.0) (+ -1.0 x)) (* t_m t_m))
(* (pow l 2.0) t_2)))))
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (2.0 + (2.0 / x)) / x;
double tmp;
if (t_m <= 3.9e-161) {
tmp = sqrt(2.0) * (t_m / (l * sqrt(t_2)));
} else if (t_m <= 1.06e+32) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (((x + 1.0) / (-1.0 + x)) * (t_m * t_m)), (pow(l, 2.0) * t_2))));
} else {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(2.0 + Float64(2.0 / x)) / x) tmp = 0.0 if (t_m <= 3.9e-161) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(l * sqrt(t_2)))); elseif (t_m <= 1.06e+32) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64(Float64(Float64(x + 1.0) / Float64(-1.0 + x)) * Float64(t_m * t_m)), Float64((l ^ 2.0) * t_2))))); else tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); end return Float64(t_s * tmp) end
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_, t$95$m_] := Block[{t$95$2 = N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.9e-161], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(l * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.06e+32], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2 + \frac{2}{x}}{x}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.9 \cdot 10^{-161}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\ell \cdot \sqrt{t\_2}}\\
\mathbf{elif}\;t\_m \leq 1.06 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\sqrt{\mathsf{fma}\left(2, \frac{x + 1}{-1 + x} \cdot \left(t\_m \cdot t\_m\right), {\ell}^{2} \cdot t\_2\right)}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\end{array}
\end{array}
\end{array}
if t < 3.89999999999999973e-161Initial program 26.4%
Simplified26.4%
Taylor expanded in l around 0 26.4%
fma-define26.4%
sub-neg26.4%
metadata-eval26.4%
associate-/l*34.6%
+-commutative34.6%
+-commutative34.6%
associate--l+43.8%
sub-neg43.8%
metadata-eval43.8%
+-commutative43.8%
sub-neg43.8%
metadata-eval43.8%
+-commutative43.8%
Simplified43.8%
Taylor expanded in x around inf 50.6%
associate-*r/50.6%
metadata-eval50.6%
Simplified50.6%
Taylor expanded in t around 0 21.0%
associate-*r/21.0%
metadata-eval21.0%
Simplified21.0%
if 3.89999999999999973e-161 < t < 1.0600000000000001e32Initial program 58.4%
Simplified58.3%
Taylor expanded in l around 0 61.9%
fma-define61.9%
sub-neg61.9%
metadata-eval61.9%
associate-/l*72.2%
+-commutative72.2%
+-commutative72.2%
associate--l+74.7%
sub-neg74.7%
metadata-eval74.7%
+-commutative74.7%
sub-neg74.7%
metadata-eval74.7%
+-commutative74.7%
Simplified74.7%
Taylor expanded in x around inf 85.3%
associate-*r/85.3%
metadata-eval85.3%
Simplified85.3%
unpow285.3%
Applied egg-rr85.3%
if 1.0600000000000001e32 < t Initial program 29.6%
Simplified29.6%
Taylor expanded in t around inf 95.7%
associate-*l*95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
metadata-eval97.3%
sub-neg97.3%
flip--50.3%
metadata-eval50.3%
fmm-def50.3%
metadata-eval50.3%
Applied egg-rr50.3%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification50.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= l 2.1e+175)
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))
(* (sqrt 2.0) (/ t_m (* l (sqrt (/ (+ 2.0 (/ 2.0 x)) x))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (l <= 2.1e+175) {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
} else {
tmp = sqrt(2.0) * (t_m / (l * sqrt(((2.0 + (2.0 / x)) / x))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: tmp
if (l <= 2.1d+175) then
tmp = 1.0d0 + (((-1.0d0) + ((0.5d0 - (0.5d0 / x)) / x)) / x)
else
tmp = sqrt(2.0d0) * (t_m / (l * sqrt(((2.0d0 + (2.0d0 / x)) / x))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
double tmp;
if (l <= 2.1e+175) {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
} else {
tmp = Math.sqrt(2.0) * (t_m / (l * Math.sqrt(((2.0 + (2.0 / x)) / x))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): tmp = 0 if l <= 2.1e+175: tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x) else: tmp = math.sqrt(2.0) * (t_m / (l * math.sqrt(((2.0 + (2.0 / x)) / x)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (l <= 2.1e+175) tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); else tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(l * sqrt(Float64(Float64(2.0 + Float64(2.0 / x)) / x))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l, t_m) tmp = 0.0; if (l <= 2.1e+175) tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x); else tmp = sqrt(2.0) * (t_m / (l * sqrt(((2.0 + (2.0 / x)) / x)))); end tmp_2 = t_s * tmp; end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[l, 2.1e+175], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(l * N[Sqrt[N[(N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{+175}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t\_m}{\ell \cdot \sqrt{\frac{2 + \frac{2}{x}}{x}}}\\
\end{array}
\end{array}
if l < 2.0999999999999999e175Initial program 35.0%
Simplified29.8%
Taylor expanded in t around inf 40.7%
associate-*l*40.7%
+-commutative40.7%
sub-neg40.7%
metadata-eval40.7%
+-commutative40.7%
Simplified40.7%
Taylor expanded in t around 0 41.2%
+-commutative41.2%
metadata-eval41.2%
sub-neg41.2%
flip--20.8%
metadata-eval20.8%
fmm-def20.8%
metadata-eval20.8%
Applied egg-rr20.8%
Taylor expanded in x around -inf 41.2%
mul-1-neg41.2%
unsub-neg41.2%
mul-1-neg41.2%
unsub-neg41.2%
associate-*r/41.2%
metadata-eval41.2%
Simplified41.2%
if 2.0999999999999999e175 < l Initial program 0.0%
Simplified0.0%
Taylor expanded in l around 0 0.7%
fma-define0.7%
sub-neg0.7%
metadata-eval0.7%
associate-/l*0.7%
+-commutative0.7%
+-commutative0.7%
associate--l+29.7%
sub-neg29.7%
metadata-eval29.7%
+-commutative29.7%
sub-neg29.7%
metadata-eval29.7%
+-commutative29.7%
Simplified29.7%
Taylor expanded in x around inf 29.7%
associate-*r/29.7%
metadata-eval29.7%
Simplified29.7%
Taylor expanded in t around 0 55.1%
associate-*r/55.1%
metadata-eval55.1%
Simplified55.1%
Final simplification42.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= l 2.9e+186)
(+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))
(* (sqrt (* 0.5 x)) (* t_m (/ (sqrt 2.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (l <= 2.9e+186) {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
} else {
tmp = sqrt((0.5 * x)) * (t_m * (sqrt(2.0) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: tmp
if (l <= 2.9d+186) then
tmp = 1.0d0 + (((-1.0d0) + ((0.5d0 - (0.5d0 / x)) / x)) / x)
else
tmp = sqrt((0.5d0 * x)) * (t_m * (sqrt(2.0d0) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
double tmp;
if (l <= 2.9e+186) {
tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x);
} else {
tmp = Math.sqrt((0.5 * x)) * (t_m * (Math.sqrt(2.0) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): tmp = 0 if l <= 2.9e+186: tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x) else: tmp = math.sqrt((0.5 * x)) * (t_m * (math.sqrt(2.0) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (l <= 2.9e+186) tmp = Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x)); else tmp = Float64(sqrt(Float64(0.5 * x)) * Float64(t_m * Float64(sqrt(2.0) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l, t_m) tmp = 0.0; if (l <= 2.9e+186) tmp = 1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x); else tmp = sqrt((0.5 * x)) * (t_m * (sqrt(2.0) / l)); end tmp_2 = t_s * tmp; end
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_, t$95$m_] := N[(t$95$s * If[LessEqual[l, 2.9e+186], N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(0.5 * x), $MachinePrecision]], $MachinePrecision] * N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+186}:\\
\;\;\;\;1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{0.5 \cdot x} \cdot \left(t\_m \cdot \frac{\sqrt{2}}{\ell}\right)\\
\end{array}
\end{array}
if l < 2.9e186Initial program 34.3%
Simplified29.2%
Taylor expanded in t around inf 40.7%
associate-*l*40.7%
+-commutative40.7%
sub-neg40.7%
metadata-eval40.7%
+-commutative40.7%
Simplified40.7%
Taylor expanded in t around 0 41.2%
+-commutative41.2%
metadata-eval41.2%
sub-neg41.2%
flip--21.3%
metadata-eval21.3%
fmm-def21.3%
metadata-eval21.3%
Applied egg-rr21.3%
Taylor expanded in x around -inf 41.2%
mul-1-neg41.2%
unsub-neg41.2%
mul-1-neg41.2%
unsub-neg41.2%
associate-*r/41.2%
metadata-eval41.2%
Simplified41.2%
if 2.9e186 < l Initial program 0.0%
Simplified0.0%
Taylor expanded in l around 0 0.0%
fma-define0.0%
sub-neg0.0%
metadata-eval0.0%
associate-/l*0.0%
+-commutative0.0%
+-commutative0.0%
associate--l+36.5%
sub-neg36.5%
metadata-eval36.5%
+-commutative36.5%
sub-neg36.5%
metadata-eval36.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around inf 36.5%
associate-*r/36.5%
metadata-eval36.5%
Simplified36.5%
Taylor expanded in l around inf 52.6%
*-commutative52.6%
associate-*r/52.6%
metadata-eval52.6%
associate-*r/52.6%
metadata-eval52.6%
associate-/l*52.6%
Simplified52.6%
Taylor expanded in x around inf 52.6%
*-commutative52.6%
Simplified52.6%
Final simplification42.0%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x l t_m) :precision binary64 (* t_s (+ 1.0 (/ (+ -1.0 (/ (- 0.5 (/ 0.5 x)) x)) x))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * (1.0d0 + (((-1.0d0) + ((0.5d0 - (0.5d0 / x)) / x)) / x))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * (1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * Float64(1.0 + Float64(Float64(-1.0 + Float64(Float64(0.5 - Float64(0.5 / x)) / x)) / x))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * (1.0 + ((-1.0 + ((0.5 - (0.5 / x)) / x)) / x)); end
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_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(N[(-1.0 + N[(N[(0.5 - N[(0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(1 + \frac{-1 + \frac{0.5 - \frac{0.5}{x}}{x}}{x}\right)
\end{array}
Initial program 31.9%
Simplified27.1%
Taylor expanded in t around inf 39.2%
associate-*l*39.2%
+-commutative39.2%
sub-neg39.2%
metadata-eval39.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in t around 0 39.7%
+-commutative39.7%
metadata-eval39.7%
sub-neg39.7%
flip--22.5%
metadata-eval22.5%
fmm-def22.5%
metadata-eval22.5%
Applied egg-rr22.5%
Taylor expanded in x around -inf 39.7%
mul-1-neg39.7%
unsub-neg39.7%
mul-1-neg39.7%
unsub-neg39.7%
associate-*r/39.7%
metadata-eval39.7%
Simplified39.7%
Final simplification39.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x l t_m) :precision binary64 (* t_s (+ 1.0 (/ (- -1.0 (/ -0.5 x)) x))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * (1.0d0 + (((-1.0d0) - ((-0.5d0) / x)) / x))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * Float64(1.0 + Float64(Float64(-1.0 - Float64(-0.5 / x)) / x))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * (1.0 + ((-1.0 - (-0.5 / x)) / x)); end
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_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(N[(-1.0 - N[(-0.5 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(1 + \frac{-1 - \frac{-0.5}{x}}{x}\right)
\end{array}
Initial program 31.9%
Simplified27.1%
Taylor expanded in t around inf 39.2%
associate-*l*39.2%
+-commutative39.2%
sub-neg39.2%
metadata-eval39.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in t around 0 39.7%
+-commutative39.7%
metadata-eval39.7%
sub-neg39.7%
flip--22.5%
metadata-eval22.5%
fmm-def22.5%
metadata-eval22.5%
Applied egg-rr22.5%
Taylor expanded in x around -inf 39.6%
mul-1-neg39.6%
unsub-neg39.6%
sub-neg39.6%
associate-*r/39.6%
metadata-eval39.6%
distribute-neg-frac39.6%
metadata-eval39.6%
Simplified39.6%
Final simplification39.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x l t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * (1.0d0 + ((-1.0d0) / x))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * (1.0 + (-1.0 / x))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * Float64(1.0 + Float64(-1.0 / x))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * (1.0 + (-1.0 / x)); end
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_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
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 31.9%
Simplified27.1%
Taylor expanded in t around inf 39.2%
associate-*l*39.2%
+-commutative39.2%
sub-neg39.2%
metadata-eval39.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in x around inf 39.5%
Final simplification39.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s x l t_m) :precision binary64 (* t_s 1.0))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * 1.0;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * 1.0d0
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * 1.0;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * 1.0
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * 1.0) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * 1.0; end
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_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot 1
\end{array}
Initial program 31.9%
Simplified27.1%
Taylor expanded in t around inf 39.2%
associate-*l*39.2%
+-commutative39.2%
sub-neg39.2%
metadata-eval39.2%
+-commutative39.2%
Simplified39.2%
Taylor expanded in x around inf 39.3%
herbie shell --seed 2024182
(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)))))