
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (pow t 2.0) x)))
(t_2 (* 2.0 (pow t 2.0)))
(t_3 (+ t_2 (pow l 2.0)))
(t_4 (/ t_3 x)))
(if (<= t -1.4e+36)
(/ (- (- -1.0) x) (+ x -1.0))
(if (<= t -1.26e-179)
(/ (sqrt 2.0) (/ (sqrt (+ (+ t_1 (+ t_2 (* l (/ l x)))) t_4)) t))
(if (<= t -6e-275)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 2.2e-305)
(* (sqrt 2.0) (* (sqrt (- (* x 0.5) 0.5)) (/ t l)))
(if (<= t 2.3e-164)
1.0
(if (<= t 950000.0)
(/
(sqrt 2.0)
(/
(sqrt
(+
(+
(/ (+ t_3 t_3) (pow x 2.0))
(+
t_1
(+
(* 2.0 (/ (pow t 2.0) (pow x 3.0)))
(+
t_2
(+ (/ (pow l 2.0) x) (/ (pow l 2.0) (pow x 3.0)))))))
(+ (/ t_3 (pow x 3.0)) t_4)))
t))
(+ 1.0 (/ -1.0 x))))))))))
double code(double x, double l, double t) {
double t_1 = 2.0 * (pow(t, 2.0) / x);
double t_2 = 2.0 * pow(t, 2.0);
double t_3 = t_2 + pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -1.4e+36) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -1.26e-179) {
tmp = sqrt(2.0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t);
} else if (t <= -6e-275) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.2e-305) {
tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 2.3e-164) {
tmp = 1.0;
} else if (t <= 950000.0) {
tmp = sqrt(2.0) / (sqrt(((((t_3 + t_3) / pow(x, 2.0)) + (t_1 + ((2.0 * (pow(t, 2.0) / pow(x, 3.0))) + (t_2 + ((pow(l, 2.0) / x) + (pow(l, 2.0) / pow(x, 3.0))))))) + ((t_3 / pow(x, 3.0)) + t_4))) / t);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 2.0d0 * ((t ** 2.0d0) / x)
t_2 = 2.0d0 * (t ** 2.0d0)
t_3 = t_2 + (l ** 2.0d0)
t_4 = t_3 / x
if (t <= (-1.4d+36)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else if (t <= (-1.26d-179)) then
tmp = sqrt(2.0d0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t)
else if (t <= (-6d-275)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 2.2d-305) then
tmp = sqrt(2.0d0) * (sqrt(((x * 0.5d0) - 0.5d0)) * (t / l))
else if (t <= 2.3d-164) then
tmp = 1.0d0
else if (t <= 950000.0d0) then
tmp = sqrt(2.0d0) / (sqrt(((((t_3 + t_3) / (x ** 2.0d0)) + (t_1 + ((2.0d0 * ((t ** 2.0d0) / (x ** 3.0d0))) + (t_2 + (((l ** 2.0d0) / x) + ((l ** 2.0d0) / (x ** 3.0d0))))))) + ((t_3 / (x ** 3.0d0)) + t_4))) / t)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = 2.0 * (Math.pow(t, 2.0) / x);
double t_2 = 2.0 * Math.pow(t, 2.0);
double t_3 = t_2 + Math.pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -1.4e+36) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -1.26e-179) {
tmp = Math.sqrt(2.0) / (Math.sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t);
} else if (t <= -6e-275) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.2e-305) {
tmp = Math.sqrt(2.0) * (Math.sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 2.3e-164) {
tmp = 1.0;
} else if (t <= 950000.0) {
tmp = Math.sqrt(2.0) / (Math.sqrt(((((t_3 + t_3) / Math.pow(x, 2.0)) + (t_1 + ((2.0 * (Math.pow(t, 2.0) / Math.pow(x, 3.0))) + (t_2 + ((Math.pow(l, 2.0) / x) + (Math.pow(l, 2.0) / Math.pow(x, 3.0))))))) + ((t_3 / Math.pow(x, 3.0)) + t_4))) / t);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): t_1 = 2.0 * (math.pow(t, 2.0) / x) t_2 = 2.0 * math.pow(t, 2.0) t_3 = t_2 + math.pow(l, 2.0) t_4 = t_3 / x tmp = 0 if t <= -1.4e+36: tmp = (-(-1.0) - x) / (x + -1.0) elif t <= -1.26e-179: tmp = math.sqrt(2.0) / (math.sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t) elif t <= -6e-275: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 2.2e-305: tmp = math.sqrt(2.0) * (math.sqrt(((x * 0.5) - 0.5)) * (t / l)) elif t <= 2.3e-164: tmp = 1.0 elif t <= 950000.0: tmp = math.sqrt(2.0) / (math.sqrt(((((t_3 + t_3) / math.pow(x, 2.0)) + (t_1 + ((2.0 * (math.pow(t, 2.0) / math.pow(x, 3.0))) + (t_2 + ((math.pow(l, 2.0) / x) + (math.pow(l, 2.0) / math.pow(x, 3.0))))))) + ((t_3 / math.pow(x, 3.0)) + t_4))) / t) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) t_1 = Float64(2.0 * Float64((t ^ 2.0) / x)) t_2 = Float64(2.0 * (t ^ 2.0)) t_3 = Float64(t_2 + (l ^ 2.0)) t_4 = Float64(t_3 / x) tmp = 0.0 if (t <= -1.4e+36) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); elseif (t <= -1.26e-179) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(t_1 + Float64(t_2 + Float64(l * Float64(l / x)))) + t_4)) / t)); elseif (t <= -6e-275) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 2.2e-305) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(Float64(x * 0.5) - 0.5)) * Float64(t / l))); elseif (t <= 2.3e-164) tmp = 1.0; elseif (t <= 950000.0) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(Float64(t_3 + t_3) / (x ^ 2.0)) + Float64(t_1 + Float64(Float64(2.0 * Float64((t ^ 2.0) / (x ^ 3.0))) + Float64(t_2 + Float64(Float64((l ^ 2.0) / x) + Float64((l ^ 2.0) / (x ^ 3.0))))))) + Float64(Float64(t_3 / (x ^ 3.0)) + t_4))) / t)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 2.0 * ((t ^ 2.0) / x); t_2 = 2.0 * (t ^ 2.0); t_3 = t_2 + (l ^ 2.0); t_4 = t_3 / x; tmp = 0.0; if (t <= -1.4e+36) tmp = (-(-1.0) - x) / (x + -1.0); elseif (t <= -1.26e-179) tmp = sqrt(2.0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t); elseif (t <= -6e-275) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 2.2e-305) tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l)); elseif (t <= 2.3e-164) tmp = 1.0; elseif (t <= 950000.0) tmp = sqrt(2.0) / (sqrt(((((t_3 + t_3) / (x ^ 2.0)) + (t_1 + ((2.0 * ((t ^ 2.0) / (x ^ 3.0))) + (t_2 + (((l ^ 2.0) / x) + ((l ^ 2.0) / (x ^ 3.0))))))) + ((t_3 / (x ^ 3.0)) + t_4))) / t); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / x), $MachinePrecision]}, If[LessEqual[t, -1.4e+36], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.26e-179], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(t$95$1 + N[(t$95$2 + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-275], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.2e-305], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(N[(x * 0.5), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-164], 1.0, If[LessEqual[t, 950000.0], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 + N[(N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision] + N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{{t}^{2}}{x}\\
t_2 := 2 \cdot {t}^{2}\\
t_3 := t_2 + {\ell}^{2}\\
t_4 := \frac{t_3}{x}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+36}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{elif}\;t \leq -1.26 \cdot 10^{-179}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(t_1 + \left(t_2 + \ell \cdot \frac{\ell}{x}\right)\right) + t_4}}{t}}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-275}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5 - 0.5} \cdot \frac{t}{\ell}\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-164}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 950000:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(\frac{t_3 + t_3}{{x}^{2}} + \left(t_1 + \left(2 \cdot \frac{{t}^{2}}{{x}^{3}} + \left(t_2 + \left(\frac{{\ell}^{2}}{x} + \frac{{\ell}^{2}}{{x}^{3}}\right)\right)\right)\right)\right) + \left(\frac{t_3}{{x}^{3}} + t_4\right)}}{t}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.4e36Initial program 24.9%
*-commutative24.9%
associate-*l/24.8%
fma-neg24.8%
sub-neg24.8%
metadata-eval24.8%
+-commutative24.8%
fma-def24.8%
distribute-rgt-neg-in24.8%
Simplified24.8%
Taylor expanded in t around -inf 91.4%
mul-1-neg91.4%
*-commutative91.4%
sub-neg91.4%
metadata-eval91.4%
+-commutative91.4%
+-commutative91.4%
Simplified91.4%
add-sqr-sqrt0.0%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod1.6%
add-sqr-sqrt1.6%
associate-*l*1.6%
*-commutative1.6%
sqrt-unprod1.6%
metadata-eval1.6%
metadata-eval1.6%
*-commutative1.6%
pow1/21.6%
Applied egg-rr1.6%
unpow1/21.6%
Simplified1.6%
Applied egg-rr92.9%
if -1.4e36 < t < -1.2599999999999999e-179Initial program 59.3%
Simplified59.4%
Taylor expanded in x around inf 90.6%
unpow290.6%
*-un-lft-identity90.6%
times-frac90.7%
Applied egg-rr90.7%
if -1.2599999999999999e-179 < t < -6.000000000000001e-275Initial program 2.6%
*-commutative2.6%
associate-*l/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Taylor expanded in t around -inf 58.5%
mul-1-neg58.5%
*-commutative58.5%
sub-neg58.5%
metadata-eval58.5%
+-commutative58.5%
+-commutative58.5%
Simplified58.5%
distribute-lft-neg-out58.5%
associate-*l*58.5%
*-commutative58.5%
sqrt-unprod59.4%
metadata-eval59.4%
metadata-eval59.4%
*-commutative59.4%
*-un-lft-identity59.4%
neg-sub059.4%
+-commutative59.4%
Applied egg-rr59.4%
sub0-neg59.4%
Simplified59.4%
if -6.000000000000001e-275 < t < 2.19999999999999997e-305Initial program 6.5%
*-commutative6.5%
associate-*l/6.5%
fma-neg5.9%
sub-neg5.9%
metadata-eval5.9%
+-commutative5.9%
fma-def5.9%
distribute-rgt-neg-in5.9%
Simplified5.9%
Taylor expanded in l around inf 25.9%
*-commutative25.9%
associate--l+69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
Simplified69.8%
Taylor expanded in x around 0 99.7%
if 2.19999999999999997e-305 < t < 2.29999999999999985e-164Initial program 2.4%
*-commutative2.4%
associate-*l/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Taylor expanded in t around -inf 1.9%
mul-1-neg1.9%
*-commutative1.9%
sub-neg1.9%
metadata-eval1.9%
+-commutative1.9%
+-commutative1.9%
Simplified1.9%
add-sqr-sqrt0.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod64.1%
add-sqr-sqrt64.1%
associate-*l*64.1%
*-commutative64.1%
sqrt-unprod65.0%
metadata-eval65.0%
metadata-eval65.0%
*-commutative65.0%
pow1/265.0%
Applied egg-rr65.0%
unpow1/265.0%
Simplified65.0%
Taylor expanded in x around inf 65.0%
if 2.29999999999999985e-164 < t < 9.5e5Initial program 60.9%
Simplified61.0%
Taylor expanded in x around -inf 88.8%
if 9.5e5 < t Initial program 27.6%
*-commutative27.6%
associate-*l/27.6%
fma-neg27.6%
sub-neg27.6%
metadata-eval27.6%
+-commutative27.6%
fma-def27.6%
distribute-rgt-neg-in27.6%
Simplified27.6%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
*-commutative1.6%
sub-neg1.6%
metadata-eval1.6%
+-commutative1.6%
+-commutative1.6%
Simplified1.6%
add-sqr-sqrt0.0%
sqrt-unprod93.4%
sqr-neg93.4%
sqrt-unprod93.5%
add-sqr-sqrt93.4%
associate-*l*93.4%
*-commutative93.4%
sqrt-unprod94.9%
metadata-eval94.9%
metadata-eval94.9%
*-commutative94.9%
pow1/294.9%
Applied egg-rr94.9%
unpow1/294.9%
Simplified94.9%
Taylor expanded in x around inf 94.9%
Final simplification87.5%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (/ (pow t 2.0) x)))
(t_2 (* 2.0 (pow t 2.0)))
(t_3 (+ t_2 (pow l 2.0)))
(t_4 (/ t_3 x)))
(if (<= t -8.6e+34)
(/ (- (- -1.0) x) (+ x -1.0))
(if (<= t -5.5e-177)
(/ (sqrt 2.0) (/ (sqrt (+ (+ t_1 (+ t_2 (* l (/ l x)))) t_4)) t))
(if (<= t -1.02e-274)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 2.3e-305)
(* (sqrt 2.0) (* (sqrt (- (* x 0.5) 0.5)) (/ t l)))
(if (<= t 7.5e-163)
1.0
(if (<= t 480000.0)
(/
(sqrt 2.0)
(/
(sqrt
(+
(+
(/ (+ t_3 t_3) (pow x 2.0))
(+ t_1 (+ t_2 (/ (pow l 2.0) x))))
t_4))
t))
(+ 1.0 (/ -1.0 x))))))))))
double code(double x, double l, double t) {
double t_1 = 2.0 * (pow(t, 2.0) / x);
double t_2 = 2.0 * pow(t, 2.0);
double t_3 = t_2 + pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -8.6e+34) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -5.5e-177) {
tmp = sqrt(2.0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t);
} else if (t <= -1.02e-274) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 7.5e-163) {
tmp = 1.0;
} else if (t <= 480000.0) {
tmp = sqrt(2.0) / (sqrt(((((t_3 + t_3) / pow(x, 2.0)) + (t_1 + (t_2 + (pow(l, 2.0) / x)))) + t_4)) / t);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 2.0d0 * ((t ** 2.0d0) / x)
t_2 = 2.0d0 * (t ** 2.0d0)
t_3 = t_2 + (l ** 2.0d0)
t_4 = t_3 / x
if (t <= (-8.6d+34)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else if (t <= (-5.5d-177)) then
tmp = sqrt(2.0d0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t)
else if (t <= (-1.02d-274)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 2.3d-305) then
tmp = sqrt(2.0d0) * (sqrt(((x * 0.5d0) - 0.5d0)) * (t / l))
else if (t <= 7.5d-163) then
tmp = 1.0d0
else if (t <= 480000.0d0) then
tmp = sqrt(2.0d0) / (sqrt(((((t_3 + t_3) / (x ** 2.0d0)) + (t_1 + (t_2 + ((l ** 2.0d0) / x)))) + t_4)) / t)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = 2.0 * (Math.pow(t, 2.0) / x);
double t_2 = 2.0 * Math.pow(t, 2.0);
double t_3 = t_2 + Math.pow(l, 2.0);
double t_4 = t_3 / x;
double tmp;
if (t <= -8.6e+34) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -5.5e-177) {
tmp = Math.sqrt(2.0) / (Math.sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t);
} else if (t <= -1.02e-274) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = Math.sqrt(2.0) * (Math.sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 7.5e-163) {
tmp = 1.0;
} else if (t <= 480000.0) {
tmp = Math.sqrt(2.0) / (Math.sqrt(((((t_3 + t_3) / Math.pow(x, 2.0)) + (t_1 + (t_2 + (Math.pow(l, 2.0) / x)))) + t_4)) / t);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): t_1 = 2.0 * (math.pow(t, 2.0) / x) t_2 = 2.0 * math.pow(t, 2.0) t_3 = t_2 + math.pow(l, 2.0) t_4 = t_3 / x tmp = 0 if t <= -8.6e+34: tmp = (-(-1.0) - x) / (x + -1.0) elif t <= -5.5e-177: tmp = math.sqrt(2.0) / (math.sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t) elif t <= -1.02e-274: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 2.3e-305: tmp = math.sqrt(2.0) * (math.sqrt(((x * 0.5) - 0.5)) * (t / l)) elif t <= 7.5e-163: tmp = 1.0 elif t <= 480000.0: tmp = math.sqrt(2.0) / (math.sqrt(((((t_3 + t_3) / math.pow(x, 2.0)) + (t_1 + (t_2 + (math.pow(l, 2.0) / x)))) + t_4)) / t) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) t_1 = Float64(2.0 * Float64((t ^ 2.0) / x)) t_2 = Float64(2.0 * (t ^ 2.0)) t_3 = Float64(t_2 + (l ^ 2.0)) t_4 = Float64(t_3 / x) tmp = 0.0 if (t <= -8.6e+34) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); elseif (t <= -5.5e-177) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(t_1 + Float64(t_2 + Float64(l * Float64(l / x)))) + t_4)) / t)); elseif (t <= -1.02e-274) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 2.3e-305) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(Float64(x * 0.5) - 0.5)) * Float64(t / l))); elseif (t <= 7.5e-163) tmp = 1.0; elseif (t <= 480000.0) tmp = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(Float64(t_3 + t_3) / (x ^ 2.0)) + Float64(t_1 + Float64(t_2 + Float64((l ^ 2.0) / x)))) + t_4)) / t)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 2.0 * ((t ^ 2.0) / x); t_2 = 2.0 * (t ^ 2.0); t_3 = t_2 + (l ^ 2.0); t_4 = t_3 / x; tmp = 0.0; if (t <= -8.6e+34) tmp = (-(-1.0) - x) / (x + -1.0); elseif (t <= -5.5e-177) tmp = sqrt(2.0) / (sqrt(((t_1 + (t_2 + (l * (l / x)))) + t_4)) / t); elseif (t <= -1.02e-274) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 2.3e-305) tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l)); elseif (t <= 7.5e-163) tmp = 1.0; elseif (t <= 480000.0) tmp = sqrt(2.0) / (sqrt(((((t_3 + t_3) / (x ^ 2.0)) + (t_1 + (t_2 + ((l ^ 2.0) / x)))) + t_4)) / t); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / x), $MachinePrecision]}, If[LessEqual[t, -8.6e+34], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-177], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(t$95$1 + N[(t$95$2 + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.02e-274], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.3e-305], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(N[(x * 0.5), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-163], 1.0, If[LessEqual[t, 480000.0], N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(N[(t$95$3 + t$95$3), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(t$95$2 + N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{{t}^{2}}{x}\\
t_2 := 2 \cdot {t}^{2}\\
t_3 := t_2 + {\ell}^{2}\\
t_4 := \frac{t_3}{x}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+34}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-177}:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(t_1 + \left(t_2 + \ell \cdot \frac{\ell}{x}\right)\right) + t_4}}{t}}\\
\mathbf{elif}\;t \leq -1.02 \cdot 10^{-274}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5 - 0.5} \cdot \frac{t}{\ell}\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-163}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 480000:\\
\;\;\;\;\frac{\sqrt{2}}{\frac{\sqrt{\left(\frac{t_3 + t_3}{{x}^{2}} + \left(t_1 + \left(t_2 + \frac{{\ell}^{2}}{x}\right)\right)\right) + t_4}}{t}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -8.59999999999999988e34Initial program 24.9%
*-commutative24.9%
associate-*l/24.8%
fma-neg24.8%
sub-neg24.8%
metadata-eval24.8%
+-commutative24.8%
fma-def24.8%
distribute-rgt-neg-in24.8%
Simplified24.8%
Taylor expanded in t around -inf 91.4%
mul-1-neg91.4%
*-commutative91.4%
sub-neg91.4%
metadata-eval91.4%
+-commutative91.4%
+-commutative91.4%
Simplified91.4%
add-sqr-sqrt0.0%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod1.6%
add-sqr-sqrt1.6%
associate-*l*1.6%
*-commutative1.6%
sqrt-unprod1.6%
metadata-eval1.6%
metadata-eval1.6%
*-commutative1.6%
pow1/21.6%
Applied egg-rr1.6%
unpow1/21.6%
Simplified1.6%
Applied egg-rr92.9%
if -8.59999999999999988e34 < t < -5.4999999999999996e-177Initial program 59.3%
Simplified59.4%
Taylor expanded in x around inf 90.6%
unpow290.6%
*-un-lft-identity90.6%
times-frac90.7%
Applied egg-rr90.7%
if -5.4999999999999996e-177 < t < -1.01999999999999997e-274Initial program 2.6%
*-commutative2.6%
associate-*l/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Taylor expanded in t around -inf 58.5%
mul-1-neg58.5%
*-commutative58.5%
sub-neg58.5%
metadata-eval58.5%
+-commutative58.5%
+-commutative58.5%
Simplified58.5%
distribute-lft-neg-out58.5%
associate-*l*58.5%
*-commutative58.5%
sqrt-unprod59.4%
metadata-eval59.4%
metadata-eval59.4%
*-commutative59.4%
*-un-lft-identity59.4%
neg-sub059.4%
+-commutative59.4%
Applied egg-rr59.4%
sub0-neg59.4%
Simplified59.4%
if -1.01999999999999997e-274 < t < 2.3e-305Initial program 6.5%
*-commutative6.5%
associate-*l/6.5%
fma-neg5.9%
sub-neg5.9%
metadata-eval5.9%
+-commutative5.9%
fma-def5.9%
distribute-rgt-neg-in5.9%
Simplified5.9%
Taylor expanded in l around inf 25.9%
*-commutative25.9%
associate--l+69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
Simplified69.8%
Taylor expanded in x around 0 99.7%
if 2.3e-305 < t < 7.49999999999999996e-163Initial program 2.4%
*-commutative2.4%
associate-*l/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Taylor expanded in t around -inf 1.9%
mul-1-neg1.9%
*-commutative1.9%
sub-neg1.9%
metadata-eval1.9%
+-commutative1.9%
+-commutative1.9%
Simplified1.9%
add-sqr-sqrt0.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod64.1%
add-sqr-sqrt64.1%
associate-*l*64.1%
*-commutative64.1%
sqrt-unprod65.0%
metadata-eval65.0%
metadata-eval65.0%
*-commutative65.0%
pow1/265.0%
Applied egg-rr65.0%
unpow1/265.0%
Simplified65.0%
Taylor expanded in x around inf 65.0%
if 7.49999999999999996e-163 < t < 4.8e5Initial program 60.9%
Simplified61.0%
Taylor expanded in x around -inf 88.6%
if 4.8e5 < t Initial program 27.6%
*-commutative27.6%
associate-*l/27.6%
fma-neg27.6%
sub-neg27.6%
metadata-eval27.6%
+-commutative27.6%
fma-def27.6%
distribute-rgt-neg-in27.6%
Simplified27.6%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
*-commutative1.6%
sub-neg1.6%
metadata-eval1.6%
+-commutative1.6%
+-commutative1.6%
Simplified1.6%
add-sqr-sqrt0.0%
sqrt-unprod93.4%
sqr-neg93.4%
sqrt-unprod93.5%
add-sqr-sqrt93.4%
associate-*l*93.4%
*-commutative93.4%
sqrt-unprod94.9%
metadata-eval94.9%
metadata-eval94.9%
*-commutative94.9%
pow1/294.9%
Applied egg-rr94.9%
unpow1/294.9%
Simplified94.9%
Taylor expanded in x around inf 94.9%
Final simplification87.5%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* 2.0 (pow t 2.0)))
(t_2
(/
(sqrt 2.0)
(/
(sqrt
(+
(+ (* 2.0 (/ (pow t 2.0) x)) (+ t_1 (* l (/ l x))))
(/ (+ t_1 (pow l 2.0)) x)))
t))))
(if (<= t -5.2e+35)
(/ (- (- -1.0) x) (+ x -1.0))
(if (<= t -1.2e-176)
t_2
(if (<= t -4.3e-274)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 2.3e-305)
(* (sqrt 2.0) (* (sqrt (- (* x 0.5) 0.5)) (/ t l)))
(if (<= t 1e-164)
1.0
(if (<= t 950000.0) t_2 (+ 1.0 (/ -1.0 x))))))))))
double code(double x, double l, double t) {
double t_1 = 2.0 * pow(t, 2.0);
double t_2 = sqrt(2.0) / (sqrt((((2.0 * (pow(t, 2.0) / x)) + (t_1 + (l * (l / x)))) + ((t_1 + pow(l, 2.0)) / x))) / t);
double tmp;
if (t <= -5.2e+35) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -1.2e-176) {
tmp = t_2;
} else if (t <= -4.3e-274) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 1e-164) {
tmp = 1.0;
} else if (t <= 950000.0) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (t ** 2.0d0)
t_2 = sqrt(2.0d0) / (sqrt((((2.0d0 * ((t ** 2.0d0) / x)) + (t_1 + (l * (l / x)))) + ((t_1 + (l ** 2.0d0)) / x))) / t)
if (t <= (-5.2d+35)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else if (t <= (-1.2d-176)) then
tmp = t_2
else if (t <= (-4.3d-274)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 2.3d-305) then
tmp = sqrt(2.0d0) * (sqrt(((x * 0.5d0) - 0.5d0)) * (t / l))
else if (t <= 1d-164) then
tmp = 1.0d0
else if (t <= 950000.0d0) then
tmp = t_2
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = 2.0 * Math.pow(t, 2.0);
double t_2 = Math.sqrt(2.0) / (Math.sqrt((((2.0 * (Math.pow(t, 2.0) / x)) + (t_1 + (l * (l / x)))) + ((t_1 + Math.pow(l, 2.0)) / x))) / t);
double tmp;
if (t <= -5.2e+35) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= -1.2e-176) {
tmp = t_2;
} else if (t <= -4.3e-274) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = Math.sqrt(2.0) * (Math.sqrt(((x * 0.5) - 0.5)) * (t / l));
} else if (t <= 1e-164) {
tmp = 1.0;
} else if (t <= 950000.0) {
tmp = t_2;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): t_1 = 2.0 * math.pow(t, 2.0) t_2 = math.sqrt(2.0) / (math.sqrt((((2.0 * (math.pow(t, 2.0) / x)) + (t_1 + (l * (l / x)))) + ((t_1 + math.pow(l, 2.0)) / x))) / t) tmp = 0 if t <= -5.2e+35: tmp = (-(-1.0) - x) / (x + -1.0) elif t <= -1.2e-176: tmp = t_2 elif t <= -4.3e-274: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 2.3e-305: tmp = math.sqrt(2.0) * (math.sqrt(((x * 0.5) - 0.5)) * (t / l)) elif t <= 1e-164: tmp = 1.0 elif t <= 950000.0: tmp = t_2 else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) t_1 = Float64(2.0 * (t ^ 2.0)) t_2 = Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(Float64(2.0 * Float64((t ^ 2.0) / x)) + Float64(t_1 + Float64(l * Float64(l / x)))) + Float64(Float64(t_1 + (l ^ 2.0)) / x))) / t)) tmp = 0.0 if (t <= -5.2e+35) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); elseif (t <= -1.2e-176) tmp = t_2; elseif (t <= -4.3e-274) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 2.3e-305) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(Float64(x * 0.5) - 0.5)) * Float64(t / l))); elseif (t <= 1e-164) tmp = 1.0; elseif (t <= 950000.0) tmp = t_2; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = 2.0 * (t ^ 2.0); t_2 = sqrt(2.0) / (sqrt((((2.0 * ((t ^ 2.0) / x)) + (t_1 + (l * (l / x)))) + ((t_1 + (l ^ 2.0)) / x))) / t); tmp = 0.0; if (t <= -5.2e+35) tmp = (-(-1.0) - x) / (x + -1.0); elseif (t <= -1.2e-176) tmp = t_2; elseif (t <= -4.3e-274) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 2.3e-305) tmp = sqrt(2.0) * (sqrt(((x * 0.5) - 0.5)) * (t / l)); elseif (t <= 1e-164) tmp = 1.0; elseif (t <= 950000.0) tmp = t_2; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(2.0 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[(2.0 * N[(N[Power[t, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+35], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.2e-176], t$95$2, If[LessEqual[t, -4.3e-274], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.3e-305], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(N[(x * 0.5), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-164], 1.0, If[LessEqual[t, 950000.0], t$95$2, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot {t}^{2}\\
t_2 := \frac{\sqrt{2}}{\frac{\sqrt{\left(2 \cdot \frac{{t}^{2}}{x} + \left(t_1 + \ell \cdot \frac{\ell}{x}\right)\right) + \frac{t_1 + {\ell}^{2}}{x}}}{t}}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-176}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{-274}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{x \cdot 0.5 - 0.5} \cdot \frac{t}{\ell}\right)\\
\mathbf{elif}\;t \leq 10^{-164}:\\
\;\;\;\;1\\
\mathbf{elif}\;t \leq 950000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -5.20000000000000013e35Initial program 24.9%
*-commutative24.9%
associate-*l/24.8%
fma-neg24.8%
sub-neg24.8%
metadata-eval24.8%
+-commutative24.8%
fma-def24.8%
distribute-rgt-neg-in24.8%
Simplified24.8%
Taylor expanded in t around -inf 91.4%
mul-1-neg91.4%
*-commutative91.4%
sub-neg91.4%
metadata-eval91.4%
+-commutative91.4%
+-commutative91.4%
Simplified91.4%
add-sqr-sqrt0.0%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod1.6%
add-sqr-sqrt1.6%
associate-*l*1.6%
*-commutative1.6%
sqrt-unprod1.6%
metadata-eval1.6%
metadata-eval1.6%
*-commutative1.6%
pow1/21.6%
Applied egg-rr1.6%
unpow1/21.6%
Simplified1.6%
Applied egg-rr92.9%
if -5.20000000000000013e35 < t < -1.20000000000000003e-176 or 9.99999999999999962e-165 < t < 9.5e5Initial program 60.0%
Simplified60.0%
Taylor expanded in x around inf 89.5%
unpow289.5%
*-un-lft-identity89.5%
times-frac89.5%
Applied egg-rr89.5%
if -1.20000000000000003e-176 < t < -4.29999999999999989e-274Initial program 2.6%
*-commutative2.6%
associate-*l/2.6%
fma-neg2.6%
sub-neg2.6%
metadata-eval2.6%
+-commutative2.6%
fma-def2.6%
distribute-rgt-neg-in2.6%
Simplified2.6%
Taylor expanded in t around -inf 58.5%
mul-1-neg58.5%
*-commutative58.5%
sub-neg58.5%
metadata-eval58.5%
+-commutative58.5%
+-commutative58.5%
Simplified58.5%
distribute-lft-neg-out58.5%
associate-*l*58.5%
*-commutative58.5%
sqrt-unprod59.4%
metadata-eval59.4%
metadata-eval59.4%
*-commutative59.4%
*-un-lft-identity59.4%
neg-sub059.4%
+-commutative59.4%
Applied egg-rr59.4%
sub0-neg59.4%
Simplified59.4%
if -4.29999999999999989e-274 < t < 2.3e-305Initial program 6.5%
*-commutative6.5%
associate-*l/6.5%
fma-neg5.9%
sub-neg5.9%
metadata-eval5.9%
+-commutative5.9%
fma-def5.9%
distribute-rgt-neg-in5.9%
Simplified5.9%
Taylor expanded in l around inf 25.9%
*-commutative25.9%
associate--l+69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
sub-neg69.8%
metadata-eval69.8%
+-commutative69.8%
Simplified69.8%
Taylor expanded in x around 0 99.7%
if 2.3e-305 < t < 9.99999999999999962e-165Initial program 2.4%
*-commutative2.4%
associate-*l/2.4%
fma-neg2.4%
sub-neg2.4%
metadata-eval2.4%
+-commutative2.4%
fma-def2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Taylor expanded in t around -inf 1.9%
mul-1-neg1.9%
*-commutative1.9%
sub-neg1.9%
metadata-eval1.9%
+-commutative1.9%
+-commutative1.9%
Simplified1.9%
add-sqr-sqrt0.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod64.1%
add-sqr-sqrt64.1%
associate-*l*64.1%
*-commutative64.1%
sqrt-unprod65.0%
metadata-eval65.0%
metadata-eval65.0%
*-commutative65.0%
pow1/265.0%
Applied egg-rr65.0%
unpow1/265.0%
Simplified65.0%
Taylor expanded in x around inf 65.0%
if 9.5e5 < t Initial program 27.6%
*-commutative27.6%
associate-*l/27.6%
fma-neg27.6%
sub-neg27.6%
metadata-eval27.6%
+-commutative27.6%
fma-def27.6%
distribute-rgt-neg-in27.6%
Simplified27.6%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
*-commutative1.6%
sub-neg1.6%
metadata-eval1.6%
+-commutative1.6%
+-commutative1.6%
Simplified1.6%
add-sqr-sqrt0.0%
sqrt-unprod93.4%
sqr-neg93.4%
sqrt-unprod93.5%
add-sqr-sqrt93.4%
associate-*l*93.4%
*-commutative93.4%
sqrt-unprod94.9%
metadata-eval94.9%
metadata-eval94.9%
*-commutative94.9%
pow1/294.9%
Applied egg-rr94.9%
unpow1/294.9%
Simplified94.9%
Taylor expanded in x around inf 94.9%
Final simplification87.4%
(FPCore (x l t) :precision binary64 (if (<= t -1.15e-157) (- (sqrt (/ (+ x -1.0) (+ x 1.0)))) (if (<= t 2.3e-305) (/ t (/ l (sqrt x))) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.15e-157) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = t / (l / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.15d-157)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 2.3d-305) then
tmp = t / (l / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.15e-157) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 2.3e-305) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.15e-157: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 2.3e-305: tmp = t / (l / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.15e-157) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 2.3e-305) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.15e-157) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 2.3e-305) tmp = t / (l / sqrt(x)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.15e-157], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 2.3e-305], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-157}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-305}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.14999999999999994e-157Initial program 39.3%
*-commutative39.3%
associate-*l/39.1%
fma-neg39.1%
sub-neg39.1%
metadata-eval39.1%
+-commutative39.1%
fma-def39.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
*-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
+-commutative85.7%
Simplified85.7%
distribute-lft-neg-out85.7%
associate-*l*85.7%
*-commutative85.7%
sqrt-unprod87.0%
metadata-eval87.0%
metadata-eval87.0%
*-commutative87.0%
*-un-lft-identity87.0%
neg-sub087.0%
+-commutative87.0%
Applied egg-rr87.0%
sub0-neg87.0%
Simplified87.0%
if -1.14999999999999994e-157 < t < 2.3e-305Initial program 3.2%
*-commutative3.2%
associate-*l/3.2%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
+-commutative3.1%
fma-def3.1%
distribute-rgt-neg-in3.1%
Simplified3.1%
Taylor expanded in l around inf 10.2%
sub-neg10.2%
+-commutative10.2%
metadata-eval10.2%
associate-+l+10.2%
sub-neg10.2%
metadata-eval10.2%
+-commutative10.2%
sub-neg10.2%
metadata-eval10.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in x around inf 49.4%
Taylor expanded in t around 0 48.4%
associate-*l/49.7%
associate-/l*49.7%
Applied egg-rr49.7%
if 2.3e-305 < t Initial program 29.8%
*-commutative29.8%
associate-*l/29.8%
fma-neg29.8%
sub-neg29.8%
metadata-eval29.8%
+-commutative29.8%
fma-def29.8%
distribute-rgt-neg-in29.8%
Simplified29.8%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
+-commutative1.7%
Simplified1.7%
add-sqr-sqrt0.0%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod81.8%
add-sqr-sqrt81.8%
associate-*l*81.7%
*-commutative81.7%
sqrt-unprod83.0%
metadata-eval83.0%
metadata-eval83.0%
*-commutative83.0%
pow1/283.0%
Applied egg-rr83.0%
unpow1/283.0%
Simplified83.0%
Taylor expanded in x around inf 83.0%
Final simplification81.1%
(FPCore (x l t) :precision binary64 (if (<= t -4.2e-274) (/ (- (- -1.0) x) (+ x -1.0)) (if (<= t 2.15e-305) (* (/ t l) (sqrt x)) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -4.2e-274) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= 2.15e-305) {
tmp = (t / l) * sqrt(x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.2d-274)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else if (t <= 2.15d-305) then
tmp = (t / l) * sqrt(x)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -4.2e-274) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= 2.15e-305) {
tmp = (t / l) * Math.sqrt(x);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -4.2e-274: tmp = (-(-1.0) - x) / (x + -1.0) elif t <= 2.15e-305: tmp = (t / l) * math.sqrt(x) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -4.2e-274) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); elseif (t <= 2.15e-305) tmp = Float64(Float64(t / l) * sqrt(x)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -4.2e-274) tmp = (-(-1.0) - x) / (x + -1.0); elseif (t <= 2.15e-305) tmp = (t / l) * sqrt(x); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -4.2e-274], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e-305], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-274}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-305}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.19999999999999988e-274Initial program 32.8%
*-commutative32.8%
associate-*l/32.6%
fma-neg32.6%
sub-neg32.6%
metadata-eval32.6%
+-commutative32.6%
fma-def32.6%
distribute-rgt-neg-in32.6%
Simplified32.6%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
+-commutative79.2%
Simplified79.2%
add-sqr-sqrt0.0%
sqrt-unprod1.7%
sqr-neg1.7%
sqrt-unprod1.7%
add-sqr-sqrt1.7%
associate-*l*1.7%
*-commutative1.7%
sqrt-unprod1.7%
metadata-eval1.7%
metadata-eval1.7%
*-commutative1.7%
pow1/21.7%
Applied egg-rr1.7%
unpow1/21.7%
Simplified1.7%
Applied egg-rr80.1%
if -4.19999999999999988e-274 < t < 2.1500000000000001e-305Initial program 6.5%
*-commutative6.5%
associate-*l/6.5%
fma-neg5.9%
sub-neg5.9%
metadata-eval5.9%
+-commutative5.9%
fma-def5.9%
distribute-rgt-neg-in5.9%
Simplified5.9%
Taylor expanded in l around inf 26.5%
sub-neg26.5%
+-commutative26.5%
metadata-eval26.5%
associate-+l+26.5%
sub-neg26.5%
metadata-eval26.5%
+-commutative26.5%
sub-neg26.5%
metadata-eval26.5%
+-commutative26.5%
Simplified26.5%
Taylor expanded in x around inf 98.9%
Taylor expanded in t around 0 99.0%
if 2.1500000000000001e-305 < t Initial program 29.8%
*-commutative29.8%
associate-*l/29.8%
fma-neg29.8%
sub-neg29.8%
metadata-eval29.8%
+-commutative29.8%
fma-def29.8%
distribute-rgt-neg-in29.8%
Simplified29.8%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
+-commutative1.7%
Simplified1.7%
add-sqr-sqrt0.0%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod81.8%
add-sqr-sqrt81.8%
associate-*l*81.7%
*-commutative81.7%
sqrt-unprod83.0%
metadata-eval83.0%
metadata-eval83.0%
*-commutative83.0%
pow1/283.0%
Applied egg-rr83.0%
unpow1/283.0%
Simplified83.0%
Taylor expanded in x around inf 83.0%
Final simplification81.9%
(FPCore (x l t) :precision binary64 (if (<= t -2.8e-158) (/ (- (- -1.0) x) (+ x -1.0)) (if (<= t 2.3e-305) (/ t (/ l (sqrt x))) (+ 1.0 (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2.8e-158) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= 2.3e-305) {
tmp = t / (l / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.8d-158)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else if (t <= 2.3d-305) then
tmp = t / (l / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2.8e-158) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else if (t <= 2.3e-305) {
tmp = t / (l / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2.8e-158: tmp = (-(-1.0) - x) / (x + -1.0) elif t <= 2.3e-305: tmp = t / (l / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2.8e-158) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); elseif (t <= 2.3e-305) tmp = Float64(t / Float64(l / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2.8e-158) tmp = (-(-1.0) - x) / (x + -1.0); elseif (t <= 2.3e-305) tmp = t / (l / sqrt(x)); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2.8e-158], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-305], N[(t / N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-158}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-305}:\\
\;\;\;\;\frac{t}{\frac{\ell}{\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -2.80000000000000002e-158Initial program 39.3%
*-commutative39.3%
associate-*l/39.1%
fma-neg39.1%
sub-neg39.1%
metadata-eval39.1%
+-commutative39.1%
fma-def39.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
*-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
+-commutative85.7%
Simplified85.7%
add-sqr-sqrt0.0%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod1.6%
add-sqr-sqrt1.6%
associate-*l*1.6%
*-commutative1.6%
sqrt-unprod1.6%
metadata-eval1.6%
metadata-eval1.6%
*-commutative1.6%
pow1/21.6%
Applied egg-rr1.6%
unpow1/21.6%
Simplified1.6%
Applied egg-rr86.7%
if -2.80000000000000002e-158 < t < 2.3e-305Initial program 3.2%
*-commutative3.2%
associate-*l/3.2%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
+-commutative3.1%
fma-def3.1%
distribute-rgt-neg-in3.1%
Simplified3.1%
Taylor expanded in l around inf 10.2%
sub-neg10.2%
+-commutative10.2%
metadata-eval10.2%
associate-+l+10.2%
sub-neg10.2%
metadata-eval10.2%
+-commutative10.2%
sub-neg10.2%
metadata-eval10.2%
+-commutative10.2%
Simplified10.2%
Taylor expanded in x around inf 49.4%
Taylor expanded in t around 0 48.4%
associate-*l/49.7%
associate-/l*49.7%
Applied egg-rr49.7%
if 2.3e-305 < t Initial program 29.8%
*-commutative29.8%
associate-*l/29.8%
fma-neg29.8%
sub-neg29.8%
metadata-eval29.8%
+-commutative29.8%
fma-def29.8%
distribute-rgt-neg-in29.8%
Simplified29.8%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
+-commutative1.7%
Simplified1.7%
add-sqr-sqrt0.0%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod81.8%
add-sqr-sqrt81.8%
associate-*l*81.7%
*-commutative81.7%
sqrt-unprod83.0%
metadata-eval83.0%
metadata-eval83.0%
*-commutative83.0%
pow1/283.0%
Applied egg-rr83.0%
unpow1/283.0%
Simplified83.0%
Taylor expanded in x around inf 83.0%
Final simplification81.0%
(FPCore (x l t) :precision binary64 (if (<= t -2e-310) (/ (- (- -1.0) x) (+ x -1.0)) (+ 1.0 (/ -1.0 x))))
double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2d-310)) then
tmp = (-(-1.0d0) - x) / (x + (-1.0d0))
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -2e-310) {
tmp = (-(-1.0) - x) / (x + -1.0);
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -2e-310: tmp = (-(-1.0) - x) / (x + -1.0) else: tmp = 1.0 + (-1.0 / x) return tmp
function code(x, l, t) tmp = 0.0 if (t <= -2e-310) tmp = Float64(Float64(Float64(-(-1.0)) - x) / Float64(x + -1.0)); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -2e-310) tmp = (-(-1.0) - x) / (x + -1.0); else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -2e-310], N[(N[((--1.0) - x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{\left(--1\right) - x}{x + -1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -1.999999999999994e-310Initial program 32.0%
*-commutative32.0%
associate-*l/31.9%
fma-neg31.8%
sub-neg31.8%
metadata-eval31.8%
+-commutative31.8%
fma-def31.8%
distribute-rgt-neg-in31.8%
Simplified31.8%
Taylor expanded in t around -inf 76.8%
mul-1-neg76.8%
*-commutative76.8%
sub-neg76.8%
metadata-eval76.8%
+-commutative76.8%
+-commutative76.8%
Simplified76.8%
add-sqr-sqrt0.0%
sqrt-unprod1.7%
sqr-neg1.7%
sqrt-unprod1.7%
add-sqr-sqrt1.7%
associate-*l*1.7%
*-commutative1.7%
sqrt-unprod1.7%
metadata-eval1.7%
metadata-eval1.7%
*-commutative1.7%
pow1/21.7%
Applied egg-rr1.7%
unpow1/21.7%
Simplified1.7%
Applied egg-rr77.7%
if -1.999999999999994e-310 < t Initial program 29.6%
*-commutative29.6%
associate-*l/29.6%
fma-neg29.6%
sub-neg29.6%
metadata-eval29.6%
+-commutative29.6%
fma-def29.6%
distribute-rgt-neg-in29.6%
Simplified29.6%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
+-commutative1.7%
Simplified1.7%
add-sqr-sqrt0.0%
sqrt-unprod81.1%
sqr-neg81.1%
sqrt-unprod81.1%
add-sqr-sqrt81.1%
associate-*l*81.1%
*-commutative81.1%
sqrt-unprod82.4%
metadata-eval82.4%
metadata-eval82.4%
*-commutative82.4%
pow1/282.4%
Applied egg-rr82.4%
unpow1/282.4%
Simplified82.4%
Taylor expanded in x around inf 82.4%
Final simplification80.0%
(FPCore (x l t) :precision binary64 (+ 1.0 (/ -1.0 x)))
double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0 + ((-1.0d0) / x)
end function
public static double code(double x, double l, double t) {
return 1.0 + (-1.0 / x);
}
def code(x, l, t): return 1.0 + (-1.0 / x)
function code(x, l, t) return Float64(1.0 + Float64(-1.0 / x)) end
function tmp = code(x, l, t) tmp = 1.0 + (-1.0 / x); end
code[x_, l_, t_] := N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x}
\end{array}
Initial program 30.8%
*-commutative30.8%
associate-*l/30.7%
fma-neg30.7%
sub-neg30.7%
metadata-eval30.7%
+-commutative30.7%
fma-def30.7%
distribute-rgt-neg-in30.7%
Simplified30.7%
Taylor expanded in t around -inf 39.3%
mul-1-neg39.3%
*-commutative39.3%
sub-neg39.3%
metadata-eval39.3%
+-commutative39.3%
+-commutative39.3%
Simplified39.3%
add-sqr-sqrt0.0%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod41.4%
add-sqr-sqrt41.4%
associate-*l*41.4%
*-commutative41.4%
sqrt-unprod42.1%
metadata-eval42.1%
metadata-eval42.1%
*-commutative42.1%
pow1/242.1%
Applied egg-rr42.1%
unpow1/242.1%
Simplified42.1%
Taylor expanded in x around inf 42.1%
Final simplification42.1%
(FPCore (x l t) :precision binary64 1.0)
double code(double x, double l, double t) {
return 1.0;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double l, double t) {
return 1.0;
}
def code(x, l, t): return 1.0
function code(x, l, t) return 1.0 end
function tmp = code(x, l, t) tmp = 1.0; end
code[x_, l_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 30.8%
*-commutative30.8%
associate-*l/30.7%
fma-neg30.7%
sub-neg30.7%
metadata-eval30.7%
+-commutative30.7%
fma-def30.7%
distribute-rgt-neg-in30.7%
Simplified30.7%
Taylor expanded in t around -inf 39.3%
mul-1-neg39.3%
*-commutative39.3%
sub-neg39.3%
metadata-eval39.3%
+-commutative39.3%
+-commutative39.3%
Simplified39.3%
add-sqr-sqrt0.0%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod41.4%
add-sqr-sqrt41.4%
associate-*l*41.4%
*-commutative41.4%
sqrt-unprod42.1%
metadata-eval42.1%
metadata-eval42.1%
*-commutative42.1%
pow1/242.1%
Applied egg-rr42.1%
unpow1/242.1%
Simplified42.1%
Taylor expanded in x around inf 42.0%
Final simplification42.0%
herbie shell --seed 2023301
(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)))))