
(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 16 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 (* t (sqrt 2.0)))
(t_2
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -2.8e+135)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 7.4e-233)
t_2
(if (<= t 3.4e-161)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (* 2.0 (fma 2.0 (* t t) (* l l))) (* (sqrt 2.0) (* t x)))
t_1)))
(if (<= t 1.32e+73)
t_2
(* t (/ (sqrt 2.0) (* t_1 (sqrt (/ (+ x 1.0) (+ x -1.0))))))))))))
double code(double x, double l, double t) {
double t_1 = t * sqrt(2.0);
double t_2 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.8e+135) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 7.4e-233) {
tmp = t_2;
} else if (t <= 3.4e-161) {
tmp = t * (sqrt(2.0) / fma(0.5, ((2.0 * fma(2.0, (t * t), (l * l))) / (sqrt(2.0) * (t * x))), t_1));
} else if (t <= 1.32e+73) {
tmp = t_2;
} else {
tmp = t * (sqrt(2.0) / (t_1 * sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
function code(x, l, t) t_1 = Float64(t * sqrt(2.0)) t_2 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -2.8e+135) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 7.4e-233) tmp = t_2; elseif (t <= 3.4e-161) tmp = Float64(t * Float64(sqrt(2.0) / fma(0.5, Float64(Float64(2.0 * fma(2.0, Float64(t * t), Float64(l * l))) / Float64(sqrt(2.0) * Float64(t * x))), t_1))); elseif (t <= 1.32e+73) tmp = t_2; else tmp = Float64(t * Float64(sqrt(2.0) / Float64(t_1 * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+135], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 7.4e-233], t$95$2, If[LessEqual[t, 3.4e-161], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.5 * N[(N[(2.0 * N[(2.0 * N[(t * t), $MachinePrecision] + N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e+73], t$95$2, N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$1 * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \sqrt{2}\\
t_2 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+135}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-233}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-161}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(0.5, \frac{2 \cdot \mathsf{fma}\left(2, t \cdot t, \ell \cdot \ell\right)}{\sqrt{2} \cdot \left(t \cdot x\right)}, t_1\right)}\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{t_1 \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.80000000000000002e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.80000000000000002e135 < t < 7.3999999999999996e-233 or 3.39999999999999982e-161 < t < 1.32e73Initial program 52.6%
associate-*l/52.7%
Simplified52.7%
Taylor expanded in x around inf 78.8%
associate--l+78.8%
unpow278.8%
distribute-lft-out78.8%
unpow278.8%
unpow278.8%
associate-*r/78.8%
mul-1-neg78.8%
+-commutative78.8%
unpow278.8%
unpow278.8%
fma-udef78.8%
Simplified78.8%
Taylor expanded in t around 0 77.8%
associate-*r/77.8%
neg-mul-177.8%
unpow277.8%
distribute-rgt-neg-in77.8%
Simplified77.8%
pow1/277.9%
associate-/l*77.8%
+-commutative77.8%
associate-/l*85.9%
Applied egg-rr85.9%
if 7.3999999999999996e-233 < t < 3.39999999999999982e-161Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 79.7%
fma-def79.7%
cancel-sign-sub-inv79.7%
metadata-eval79.7%
distribute-rgt1-in79.7%
metadata-eval79.7%
+-commutative79.7%
unpow279.7%
unpow279.7%
fma-udef79.7%
*-commutative79.7%
Simplified79.7%
if 1.32e73 < t Initial program 17.2%
associate-*l/17.2%
Simplified17.2%
Taylor expanded in t around inf 98.0%
Final simplification90.0%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -2.85e+135)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.75e-239)
t_1
(if (<= t 7e-188)
(*
t
(/
(sqrt 2.0)
(* l (sqrt (+ (/ 2.0 x) (+ (/ 2.0 (* x x)) (/ 2.0 (pow x 3.0))))))))
(if (<= t 3.1e+73)
t_1
(*
t
(/
(sqrt 2.0)
(* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))))))))
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.85e+135) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-239) {
tmp = t_1;
} else if (t <= 7e-188) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / pow(x, 3.0)))))));
} else if (t <= 3.1e+73) {
tmp = t_1;
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
}
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) :: tmp
t_1 = t * (sqrt(2.0d0) / (((l / (x / l)) + ((2.0d0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ** 0.5d0))
if (t <= (-2.85d+135)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= (-1.75d-239)) then
tmp = t_1
else if (t <= 7d-188) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + ((2.0d0 / (x * x)) + (2.0d0 / (x ** 3.0d0)))))))
else if (t <= 3.1d+73) then
tmp = t_1
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.85e+135) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.75e-239) {
tmp = t_1;
} else if (t <= 7e-188) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / Math.pow(x, 3.0)))))));
} else if (t <= 3.1e+73) {
tmp = t_1;
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5)) tmp = 0 if t <= -2.85e+135: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= -1.75e-239: tmp = t_1 elif t <= 7e-188: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / math.pow(x, 3.0))))))) elif t <= 3.1e+73: tmp = t_1 else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0))))) return tmp
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -2.85e+135) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.75e-239) tmp = t_1; elseif (t <= 7e-188) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(Float64(2.0 / Float64(x * x)) + Float64(2.0 / (x ^ 3.0)))))))); elseif (t <= 3.1e+73) tmp = t_1; else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / (((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ^ 0.5)); tmp = 0.0; if (t <= -2.85e+135) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= -1.75e-239) tmp = t_1; elseif (t <= 7e-188) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + ((2.0 / (x * x)) + (2.0 / (x ^ 3.0))))))); elseif (t <= 3.1e+73) tmp = t_1; else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0))))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.85e+135], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.75e-239], t$95$1, If[LessEqual[t, 7e-188], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(2.0 / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+73], t$95$1, N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -2.85 \cdot 10^{+135}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-188}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \left(\frac{2}{x \cdot x} + \frac{2}{{x}^{3}}\right)}}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.8500000000000001e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.8500000000000001e135 < t < -1.75000000000000003e-239 or 7.000000000000001e-188 < t < 3.1e73Initial program 58.2%
associate-*l/58.3%
Simplified58.3%
Taylor expanded in x around inf 78.1%
associate--l+78.1%
unpow278.1%
distribute-lft-out78.1%
unpow278.1%
unpow278.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
fma-udef78.1%
Simplified78.1%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
unpow277.0%
distribute-rgt-neg-in77.0%
Simplified77.0%
pow1/277.1%
associate-/l*77.1%
+-commutative77.1%
associate-/l*86.1%
Applied egg-rr86.1%
if -1.75000000000000003e-239 < t < 7.000000000000001e-188Initial program 3.7%
associate-*l/3.7%
Simplified3.7%
Taylor expanded in l around inf 3.4%
Taylor expanded in x around inf 59.5%
associate-*r/59.5%
metadata-eval59.5%
+-commutative59.5%
associate-*r/59.5%
metadata-eval59.5%
unpow259.5%
associate-*r/59.5%
metadata-eval59.5%
Simplified59.5%
if 3.1e73 < t Initial program 17.2%
associate-*l/17.2%
Simplified17.2%
Taylor expanded in t around inf 98.0%
Final simplification87.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.85e+135)
(- t_2)
(if (<= t -1.78e-239)
t_1
(if (<= t 2.05e-188)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 7.5e+151)
t_1
(* t (* t_2 (/ (* (sqrt 2.0) (sqrt 0.5)) t)))))))))
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.85e+135) {
tmp = -t_2;
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 2.05e-188) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 7.5e+151) {
tmp = t_1;
} else {
tmp = t * (t_2 * ((sqrt(2.0) * sqrt(0.5)) / t));
}
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 = t * (sqrt(2.0d0) / (((l / (x / l)) + ((2.0d0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ** 0.5d0))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.85d+135)) then
tmp = -t_2
else if (t <= (-1.78d-239)) then
tmp = t_1
else if (t <= 2.05d-188) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else if (t <= 7.5d+151) then
tmp = t_1
else
tmp = t * (t_2 * ((sqrt(2.0d0) * sqrt(0.5d0)) / t))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.85e+135) {
tmp = -t_2;
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 2.05e-188) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 7.5e+151) {
tmp = t_1;
} else {
tmp = t * (t_2 * ((Math.sqrt(2.0) * Math.sqrt(0.5)) / t));
}
return tmp;
}
def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5)) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.85e+135: tmp = -t_2 elif t <= -1.78e-239: tmp = t_1 elif t <= 2.05e-188: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) elif t <= 7.5e+151: tmp = t_1 else: tmp = t * (t_2 * ((math.sqrt(2.0) * math.sqrt(0.5)) / t)) return tmp
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.85e+135) tmp = Float64(-t_2); elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 2.05e-188) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 7.5e+151) tmp = t_1; else tmp = Float64(t * Float64(t_2 * Float64(Float64(sqrt(2.0) * sqrt(0.5)) / t))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / (((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ^ 0.5)); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.85e+135) tmp = -t_2; elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 2.05e-188) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); elseif (t <= 7.5e+151) tmp = t_1; else tmp = t * (t_2 * ((sqrt(2.0) * sqrt(0.5)) / t)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.85e+135], (-t$95$2), If[LessEqual[t, -1.78e-239], t$95$1, If[LessEqual[t, 2.05e-188], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+151], t$95$1, N[(t * N[(t$95$2 * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.85 \cdot 10^{+135}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -1.78 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-188}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t_2 \cdot \frac{\sqrt{2} \cdot \sqrt{0.5}}{t}\right)\\
\end{array}
\end{array}
if t < -2.8500000000000001e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.8500000000000001e135 < t < -1.78e-239 or 2.04999999999999991e-188 < t < 7.49999999999999977e151Initial program 58.9%
associate-*l/59.0%
Simplified59.0%
Taylor expanded in x around inf 78.0%
associate--l+78.0%
unpow278.0%
distribute-lft-out78.0%
unpow278.0%
unpow278.0%
associate-*r/78.0%
mul-1-neg78.0%
+-commutative78.0%
unpow278.0%
unpow278.0%
fma-udef78.0%
Simplified78.0%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
unpow277.0%
distribute-rgt-neg-in77.0%
Simplified77.0%
pow1/277.1%
associate-/l*77.1%
+-commutative77.1%
associate-/l*87.2%
Applied egg-rr87.2%
if -1.78e-239 < t < 2.04999999999999991e-188Initial program 3.7%
associate-*l/3.7%
Simplified3.7%
Taylor expanded in l around inf 3.4%
Taylor expanded in x around inf 59.5%
+-commutative59.5%
associate-*r/59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
unpow259.5%
Simplified59.5%
if 7.49999999999999977e151 < t Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in t around inf 96.3%
Final simplification87.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -2.8e+135)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.78e-239)
t_1
(if (<= t 7e-189)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 2.9e+73)
t_1
(*
t
(/
(sqrt 2.0)
(* (* t (sqrt 2.0)) (sqrt (/ (+ x 1.0) (+ x -1.0))))))))))))
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.8e+135) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 7e-189) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 2.9e+73) {
tmp = t_1;
} else {
tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0)))));
}
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) :: tmp
t_1 = t * (sqrt(2.0d0) / (((l / (x / l)) + ((2.0d0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ** 0.5d0))
if (t <= (-2.8d+135)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= (-1.78d-239)) then
tmp = t_1
else if (t <= 7d-189) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else if (t <= 2.9d+73) then
tmp = t_1
else
tmp = t * (sqrt(2.0d0) / ((t * sqrt(2.0d0)) * sqrt(((x + 1.0d0) / (x + (-1.0d0))))))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.8e+135) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 7e-189) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 2.9e+73) {
tmp = t_1;
} else {
tmp = t * (Math.sqrt(2.0) / ((t * Math.sqrt(2.0)) * Math.sqrt(((x + 1.0) / (x + -1.0)))));
}
return tmp;
}
def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5)) tmp = 0 if t <= -2.8e+135: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= -1.78e-239: tmp = t_1 elif t <= 7e-189: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) elif t <= 2.9e+73: tmp = t_1 else: tmp = t * (math.sqrt(2.0) / ((t * math.sqrt(2.0)) * math.sqrt(((x + 1.0) / (x + -1.0))))) return tmp
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -2.8e+135) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 7e-189) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 2.9e+73) tmp = t_1; else tmp = Float64(t * Float64(sqrt(2.0) / Float64(Float64(t * sqrt(2.0)) * sqrt(Float64(Float64(x + 1.0) / Float64(x + -1.0)))))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / (((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ^ 0.5)); tmp = 0.0; if (t <= -2.8e+135) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 7e-189) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); elseif (t <= 2.9e+73) tmp = t_1; else tmp = t * (sqrt(2.0) / ((t * sqrt(2.0)) * sqrt(((x + 1.0) / (x + -1.0))))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+135], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.78e-239], t$95$1, If[LessEqual[t, 7e-189], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+73], t$95$1, N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(x + 1.0), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+135}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.78 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-189}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\left(t \cdot \sqrt{2}\right) \cdot \sqrt{\frac{x + 1}{x + -1}}}\\
\end{array}
\end{array}
if t < -2.80000000000000002e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.80000000000000002e135 < t < -1.78e-239 or 7.0000000000000003e-189 < t < 2.9000000000000002e73Initial program 58.2%
associate-*l/58.3%
Simplified58.3%
Taylor expanded in x around inf 78.1%
associate--l+78.1%
unpow278.1%
distribute-lft-out78.1%
unpow278.1%
unpow278.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
fma-udef78.1%
Simplified78.1%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
unpow277.0%
distribute-rgt-neg-in77.0%
Simplified77.0%
pow1/277.1%
associate-/l*77.1%
+-commutative77.1%
associate-/l*86.1%
Applied egg-rr86.1%
if -1.78e-239 < t < 7.0000000000000003e-189Initial program 3.7%
associate-*l/3.7%
Simplified3.7%
Taylor expanded in l around inf 3.4%
Taylor expanded in x around inf 59.5%
+-commutative59.5%
associate-*r/59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
unpow259.5%
Simplified59.5%
if 2.9000000000000002e73 < t Initial program 17.2%
associate-*l/17.2%
Simplified17.2%
Taylor expanded in t around inf 98.0%
Final simplification87.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5))))
(t_2 (sqrt (/ (+ x -1.0) (+ x 1.0)))))
(if (<= t -2.8e+135)
(- t_2)
(if (<= t -1.34e-244)
t_1
(if (<= t 7e-188)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 1.45e+146) t_1 (* (sqrt 2.0) (* t_2 (sqrt 0.5)))))))))
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double t_2 = sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.8e+135) {
tmp = -t_2;
} else if (t <= -1.34e-244) {
tmp = t_1;
} else if (t <= 7e-188) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 1.45e+146) {
tmp = t_1;
} else {
tmp = sqrt(2.0) * (t_2 * sqrt(0.5));
}
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 = t * (sqrt(2.0d0) / (((l / (x / l)) + ((2.0d0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ** 0.5d0))
t_2 = sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
if (t <= (-2.8d+135)) then
tmp = -t_2
else if (t <= (-1.34d-244)) then
tmp = t_1
else if (t <= 7d-188) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else if (t <= 1.45d+146) then
tmp = t_1
else
tmp = sqrt(2.0d0) * (t_2 * sqrt(0.5d0))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double t_2 = Math.sqrt(((x + -1.0) / (x + 1.0)));
double tmp;
if (t <= -2.8e+135) {
tmp = -t_2;
} else if (t <= -1.34e-244) {
tmp = t_1;
} else if (t <= 7e-188) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 1.45e+146) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) * (t_2 * Math.sqrt(0.5));
}
return tmp;
}
def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5)) t_2 = math.sqrt(((x + -1.0) / (x + 1.0))) tmp = 0 if t <= -2.8e+135: tmp = -t_2 elif t <= -1.34e-244: tmp = t_1 elif t <= 7e-188: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) elif t <= 1.45e+146: tmp = t_1 else: tmp = math.sqrt(2.0) * (t_2 * math.sqrt(0.5)) return tmp
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) t_2 = sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0))) tmp = 0.0 if (t <= -2.8e+135) tmp = Float64(-t_2); elseif (t <= -1.34e-244) tmp = t_1; elseif (t <= 7e-188) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 1.45e+146) tmp = t_1; else tmp = Float64(sqrt(2.0) * Float64(t_2 * sqrt(0.5))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / (((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ^ 0.5)); t_2 = sqrt(((x + -1.0) / (x + 1.0))); tmp = 0.0; if (t <= -2.8e+135) tmp = -t_2; elseif (t <= -1.34e-244) tmp = t_1; elseif (t <= 7e-188) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); elseif (t <= 1.45e+146) tmp = t_1; else tmp = sqrt(2.0) * (t_2 * sqrt(0.5)); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.8e+135], (-t$95$2), If[LessEqual[t, -1.34e-244], t$95$1, If[LessEqual[t, 7e-188], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+146], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$2 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
t_2 := \sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+135}:\\
\;\;\;\;-t_2\\
\mathbf{elif}\;t \leq -1.34 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-188}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_2 \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
if t < -2.80000000000000002e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.80000000000000002e135 < t < -1.34e-244 or 7.000000000000001e-188 < t < 1.4499999999999999e146Initial program 58.9%
associate-*l/59.0%
Simplified59.0%
Taylor expanded in x around inf 78.0%
associate--l+78.0%
unpow278.0%
distribute-lft-out78.0%
unpow278.0%
unpow278.0%
associate-*r/78.0%
mul-1-neg78.0%
+-commutative78.0%
unpow278.0%
unpow278.0%
fma-udef78.0%
Simplified78.0%
Taylor expanded in t around 0 77.0%
associate-*r/77.0%
neg-mul-177.0%
unpow277.0%
distribute-rgt-neg-in77.0%
Simplified77.0%
pow1/277.1%
associate-/l*77.1%
+-commutative77.1%
associate-/l*87.2%
Applied egg-rr87.2%
if -1.34e-244 < t < 7.000000000000001e-188Initial program 3.7%
associate-*l/3.7%
Simplified3.7%
Taylor expanded in l around inf 3.4%
Taylor expanded in x around inf 59.5%
+-commutative59.5%
associate-*r/59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
unpow259.5%
Simplified59.5%
if 1.4499999999999999e146 < t Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in t around inf 96.3%
associate-*l*96.3%
sub-neg96.3%
metadata-eval96.3%
+-commutative96.3%
+-commutative96.3%
Simplified96.3%
Final simplification87.1%
(FPCore (x l t)
:precision binary64
(let* ((t_1
(*
t
(/
(sqrt 2.0)
(pow
(+
(/ l (/ x l))
(- (* 2.0 (+ (* t t) (/ (* t t) x))) (/ l (/ x (- l)))))
0.5)))))
(if (<= t -2.8e+135)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t -1.78e-239)
t_1
(if (<= t 4.2e-189)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(if (<= t 2.25e+70) t_1 (- (/ -1.0 x) -1.0)))))))
double code(double x, double l, double t) {
double t_1 = t * (sqrt(2.0) / pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.8e+135) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 4.2e-189) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 2.25e+70) {
tmp = t_1;
} else {
tmp = (-1.0 / x) - -1.0;
}
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) :: tmp
t_1 = t * (sqrt(2.0d0) / (((l / (x / l)) + ((2.0d0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ** 0.5d0))
if (t <= (-2.8d+135)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= (-1.78d-239)) then
tmp = t_1
else if (t <= 4.2d-189) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else if (t <= 2.25d+70) then
tmp = t_1
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = t * (Math.sqrt(2.0) / Math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5));
double tmp;
if (t <= -2.8e+135) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= -1.78e-239) {
tmp = t_1;
} else if (t <= 4.2e-189) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else if (t <= 2.25e+70) {
tmp = t_1;
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): t_1 = t * (math.sqrt(2.0) / math.pow(((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))), 0.5)) tmp = 0 if t <= -2.8e+135: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= -1.78e-239: tmp = t_1 elif t <= 4.2e-189: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) elif t <= 2.25e+70: tmp = t_1 else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) t_1 = Float64(t * Float64(sqrt(2.0) / (Float64(Float64(l / Float64(x / l)) + Float64(Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))) - Float64(l / Float64(x / Float64(-l))))) ^ 0.5))) tmp = 0.0 if (t <= -2.8e+135) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 4.2e-189) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); elseif (t <= 2.25e+70) tmp = t_1; else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) t_1 = t * (sqrt(2.0) / (((l / (x / l)) + ((2.0 * ((t * t) + ((t * t) / x))) - (l / (x / -l)))) ^ 0.5)); tmp = 0.0; if (t <= -2.8e+135) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= -1.78e-239) tmp = t_1; elseif (t <= 4.2e-189) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); elseif (t <= 2.25e+70) tmp = t_1; else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l / N[(x / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+135], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, -1.78e-239], t$95$1, If[LessEqual[t, 4.2e-189], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+70], t$95$1, N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{\sqrt{2}}{{\left(\frac{\ell}{\frac{x}{\ell}} + \left(2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right) - \frac{\ell}{\frac{x}{-\ell}}\right)\right)}^{0.5}}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+135}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq -1.78 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-189}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -2.80000000000000002e135Initial program 5.4%
associate-*l/5.4%
Simplified5.4%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
distribute-rgt-neg-out99.6%
Simplified99.6%
Taylor expanded in t around 0 100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
if -2.80000000000000002e135 < t < -1.78e-239 or 4.20000000000000033e-189 < t < 2.25e70Initial program 58.0%
associate-*l/58.1%
Simplified58.1%
Taylor expanded in x around inf 77.7%
associate--l+77.7%
unpow277.7%
distribute-lft-out77.7%
unpow277.7%
unpow277.7%
associate-*r/77.7%
mul-1-neg77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
fma-udef77.7%
Simplified77.7%
Taylor expanded in t around 0 76.5%
associate-*r/76.5%
neg-mul-176.5%
unpow276.5%
distribute-rgt-neg-in76.5%
Simplified76.5%
pow1/276.6%
associate-/l*76.6%
+-commutative76.6%
associate-/l*85.8%
Applied egg-rr85.8%
if -1.78e-239 < t < 4.20000000000000033e-189Initial program 3.7%
associate-*l/3.7%
Simplified3.7%
Taylor expanded in l around inf 3.4%
Taylor expanded in x around inf 59.5%
+-commutative59.5%
associate-*r/59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
unpow259.5%
Simplified59.5%
if 2.25e70 < t Initial program 19.7%
associate-*l/19.7%
Simplified19.7%
Taylor expanded in t around -inf 1.6%
mul-1-neg1.6%
*-commutative1.6%
distribute-rgt-neg-in1.6%
+-commutative1.6%
sub-neg1.6%
metadata-eval1.6%
+-commutative1.6%
distribute-rgt-neg-out1.6%
Simplified1.6%
Taylor expanded in t around 0 1.6%
mul-1-neg1.6%
sub-neg1.6%
metadata-eval1.6%
+-commutative1.6%
Simplified1.6%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt97.0%
Simplified97.0%
Final simplification87.1%
(FPCore (x l t)
:precision binary64
(if (<= t -7.5e-140)
(- (sqrt (/ (+ x -1.0) (+ x 1.0))))
(if (<= t 4.4e-223)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x)))))))
(- (/ -1.0 x) -1.0))))
double code(double x, double l, double t) {
double tmp;
if (t <= -7.5e-140) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4.4e-223) {
tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = (-1.0 / x) - -1.0;
}
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 <= (-7.5d-140)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 4.4d-223) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((2.0d0 / x) + (2.0d0 / (x * x))))))
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -7.5e-140) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 4.4e-223) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((2.0 / x) + (2.0 / (x * x))))));
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -7.5e-140: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 4.4e-223: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((2.0 / x) + (2.0 / (x * x)))))) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -7.5e-140) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 4.4e-223) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x))))))); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -7.5e-140) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 4.4e-223) tmp = t * (sqrt(2.0) / (l * sqrt(((2.0 / x) + (2.0 / (x * x)))))); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -7.5e-140], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 4.4e-223], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-223}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -7.4999999999999998e-140Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-out91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
+-commutative91.6%
Simplified91.6%
if -7.4999999999999998e-140 < t < 4.40000000000000018e-223Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in l around inf 3.0%
Taylor expanded in x around inf 55.2%
+-commutative55.2%
associate-*r/55.2%
metadata-eval55.2%
associate-*r/55.2%
metadata-eval55.2%
unpow255.2%
Simplified55.2%
if 4.40000000000000018e-223 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
distribute-rgt-neg-out1.7%
Simplified1.7%
Taylor expanded in t around 0 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification81.3%
(FPCore (x l t) :precision binary64 (if (<= t -1.06e-141) (- (sqrt (/ (+ x -1.0) (+ x 1.0)))) (if (<= t 1.9e-222) (* t (/ (sqrt x) l)) (- (/ -1.0 x) -1.0))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.06e-141) {
tmp = -sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.9e-222) {
tmp = t * (sqrt(x) / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
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.06d-141)) then
tmp = -sqrt(((x + (-1.0d0)) / (x + 1.0d0)))
else if (t <= 1.9d-222) then
tmp = t * (sqrt(x) / l)
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.06e-141) {
tmp = -Math.sqrt(((x + -1.0) / (x + 1.0)));
} else if (t <= 1.9e-222) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.06e-141: tmp = -math.sqrt(((x + -1.0) / (x + 1.0))) elif t <= 1.9e-222: tmp = t * (math.sqrt(x) / l) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.06e-141) tmp = Float64(-sqrt(Float64(Float64(x + -1.0) / Float64(x + 1.0)))); elseif (t <= 1.9e-222) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.06e-141) tmp = -sqrt(((x + -1.0) / (x + 1.0))); elseif (t <= 1.9e-222) tmp = t * (sqrt(x) / l); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.06e-141], (-N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[t, 1.9e-222], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{-141}:\\
\;\;\;\;-\sqrt{\frac{x + -1}{x + 1}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -1.06e-141Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-out91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
+-commutative91.6%
Simplified91.6%
if -1.06e-141 < t < 1.89999999999999998e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in x around inf 69.6%
associate--l+69.6%
unpow269.6%
distribute-lft-out69.6%
unpow269.6%
unpow269.6%
associate-*r/69.6%
mul-1-neg69.6%
+-commutative69.6%
unpow269.6%
unpow269.6%
fma-udef69.6%
Simplified69.6%
Taylor expanded in l around inf 54.4%
associate-*l*54.4%
Simplified54.4%
Taylor expanded in l around 0 54.5%
associate-*l/54.4%
*-lft-identity54.4%
Simplified54.4%
if 1.89999999999999998e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
distribute-rgt-neg-out1.7%
Simplified1.7%
Taylor expanded in t around 0 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification81.2%
(FPCore (x l t) :precision binary64 (if (<= t -3.6e-213) (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x)))) (if (<= t 3.2e-223) (* (sqrt x) (/ t l)) (- (/ -1.0 x) -1.0))))
double code(double x, double l, double t) {
double tmp;
if (t <= -3.6e-213) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 3.2e-223) {
tmp = sqrt(x) * (t / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
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 <= (-3.6d-213)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 3.2d-223) then
tmp = sqrt(x) * (t / l)
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -3.6e-213) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 3.2e-223) {
tmp = Math.sqrt(x) * (t / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -3.6e-213: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 3.2e-223: tmp = math.sqrt(x) * (t / l) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -3.6e-213) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 3.2e-223) tmp = Float64(sqrt(x) * Float64(t / l)); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -3.6e-213) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 3.2e-223) tmp = sqrt(x) * (t / l); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -3.6e-213], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-223], N[(N[Sqrt[x], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-213}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-223}:\\
\;\;\;\;\sqrt{x} \cdot \frac{t}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -3.6000000000000001e-213Initial program 44.9%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around -inf 86.4%
mul-1-neg86.4%
*-commutative86.4%
distribute-rgt-neg-in86.4%
+-commutative86.4%
sub-neg86.4%
metadata-eval86.4%
+-commutative86.4%
distribute-rgt-neg-out86.4%
Simplified86.4%
Taylor expanded in t around 0 86.8%
mul-1-neg86.8%
sub-neg86.8%
metadata-eval86.8%
+-commutative86.8%
Simplified86.8%
Taylor expanded in x around inf 86.1%
associate--l+86.1%
associate-*r/86.1%
metadata-eval86.1%
unpow286.1%
Simplified86.1%
if -3.6000000000000001e-213 < t < 3.2000000000000001e-223Initial program 3.6%
associate-*l/3.6%
Simplified3.6%
Taylor expanded in x around inf 74.4%
associate--l+74.4%
unpow274.4%
distribute-lft-out74.4%
unpow274.4%
unpow274.4%
associate-*r/74.4%
mul-1-neg74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
fma-udef74.4%
Simplified74.4%
Taylor expanded in l around inf 62.8%
associate-*l*62.8%
Simplified62.8%
Taylor expanded in l around 0 53.2%
if 3.2000000000000001e-223 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
distribute-rgt-neg-out1.7%
Simplified1.7%
Taylor expanded in t around 0 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification80.3%
(FPCore (x l t) :precision binary64 (if (<= t -1.1e-137) (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x)))) (if (<= t 1.9e-222) (* t (/ (sqrt x) l)) (- (/ -1.0 x) -1.0))))
double code(double x, double l, double t) {
double tmp;
if (t <= -1.1e-137) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 1.9e-222) {
tmp = t * (sqrt(x) / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
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.1d-137)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else if (t <= 1.9d-222) then
tmp = t * (sqrt(x) / l)
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1.1e-137) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else if (t <= 1.9e-222) {
tmp = t * (Math.sqrt(x) / l);
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1.1e-137: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) elif t <= 1.9e-222: tmp = t * (math.sqrt(x) / l) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1.1e-137) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); elseif (t <= 1.9e-222) tmp = Float64(t * Float64(sqrt(x) / l)); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1.1e-137) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); elseif (t <= 1.9e-222) tmp = t * (sqrt(x) / l); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1.1e-137], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-222], N[(t * N[(N[Sqrt[x], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-137}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{\sqrt{x}}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -1.1000000000000001e-137Initial program 49.1%
associate-*l/49.1%
Simplified49.1%
Taylor expanded in t around -inf 91.3%
mul-1-neg91.3%
*-commutative91.3%
distribute-rgt-neg-in91.3%
+-commutative91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
distribute-rgt-neg-out91.3%
Simplified91.3%
Taylor expanded in t around 0 91.6%
mul-1-neg91.6%
sub-neg91.6%
metadata-eval91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in x around inf 90.8%
associate--l+90.9%
associate-*r/90.9%
metadata-eval90.9%
unpow290.9%
Simplified90.9%
if -1.1000000000000001e-137 < t < 1.89999999999999998e-222Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in x around inf 69.6%
associate--l+69.6%
unpow269.6%
distribute-lft-out69.6%
unpow269.6%
unpow269.6%
associate-*r/69.6%
mul-1-neg69.6%
+-commutative69.6%
unpow269.6%
unpow269.6%
fma-udef69.6%
Simplified69.6%
Taylor expanded in l around inf 54.4%
associate-*l*54.4%
Simplified54.4%
Taylor expanded in l around 0 54.5%
associate-*l/54.4%
*-lft-identity54.4%
Simplified54.4%
if 1.89999999999999998e-222 < t Initial program 36.1%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
*-commutative1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
distribute-rgt-neg-out1.7%
Simplified1.7%
Taylor expanded in t around 0 1.7%
mul-1-neg1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt81.7%
Simplified81.7%
Final simplification80.9%
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (- (/ -1.0 x) -1.0)))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = (-1.0 / x) - -1.0;
}
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 <= (-1d-310)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-out79.2%
Simplified79.2%
Taylor expanded in x around inf 78.9%
associate-*r/78.9%
metadata-eval78.9%
unpow278.9%
Simplified78.9%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around -inf 1.8%
mul-1-neg1.8%
*-commutative1.8%
distribute-rgt-neg-in1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
distribute-rgt-neg-out1.8%
Simplified1.8%
Taylor expanded in t around 0 1.8%
mul-1-neg1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.0%
Simplified74.0%
Final simplification76.1%
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (+ -1.0 (- (/ 1.0 x) (/ 0.5 (* x x)))) (- (/ -1.0 x) -1.0)))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else {
tmp = (-1.0 / x) - -1.0;
}
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 <= (-1d-310)) then
tmp = (-1.0d0) + ((1.0d0 / x) - (0.5d0 / (x * x)))
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x)));
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(-1.0 + Float64(Float64(1.0 / x) - Float64(0.5 / Float64(x * x)))); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = -1.0 + ((1.0 / x) - (0.5 / (x * x))); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(-1.0 + N[(N[(1.0 / x), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 + \left(\frac{1}{x} - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-out79.2%
Simplified79.2%
Taylor expanded in t around 0 79.5%
mul-1-neg79.5%
sub-neg79.5%
metadata-eval79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 78.9%
associate--l+78.9%
associate-*r/78.9%
metadata-eval78.9%
unpow278.9%
Simplified78.9%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around -inf 1.8%
mul-1-neg1.8%
*-commutative1.8%
distribute-rgt-neg-in1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
distribute-rgt-neg-out1.8%
Simplified1.8%
Taylor expanded in t around 0 1.8%
mul-1-neg1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.0%
Simplified74.0%
Final simplification76.1%
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (- -1.0 (/ -1.0 x)) 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 - (-1.0 / x);
} else {
tmp = 1.0;
}
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 <= (-1d-310)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 - (-1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = -1.0 - (-1.0 / x) else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(-1.0 - Float64(-1.0 / x)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = -1.0 - (-1.0 / x); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-out79.2%
Simplified79.2%
Taylor expanded in x around inf 78.5%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in x around inf 71.5%
sqrt-unprod72.6%
metadata-eval72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Final simplification75.2%
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) (- -1.0 (/ -1.0 x)) (- (/ -1.0 x) -1.0)))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 - (-1.0 / x);
} else {
tmp = (-1.0 / x) - -1.0;
}
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 <= (-1d-310)) then
tmp = (-1.0d0) - ((-1.0d0) / x)
else
tmp = ((-1.0d0) / x) - (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0 - (-1.0 / x);
} else {
tmp = (-1.0 / x) - -1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = -1.0 - (-1.0 / x) else: tmp = (-1.0 / x) - -1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = Float64(-1.0 - Float64(-1.0 / x)); else tmp = Float64(Float64(-1.0 / x) - -1.0); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = -1.0 - (-1.0 / x); else tmp = (-1.0 / x) - -1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-310], N[(-1.0 - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / x), $MachinePrecision] - -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1 - \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} - -1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-out79.2%
Simplified79.2%
Taylor expanded in x around inf 78.5%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in t around -inf 1.8%
mul-1-neg1.8%
*-commutative1.8%
distribute-rgt-neg-in1.8%
+-commutative1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
distribute-rgt-neg-out1.8%
Simplified1.8%
Taylor expanded in t around 0 1.8%
mul-1-neg1.8%
sub-neg1.8%
metadata-eval1.8%
+-commutative1.8%
Simplified1.8%
Taylor expanded in x around -inf 0.0%
+-commutative0.0%
unpow20.0%
rem-square-sqrt74.0%
Simplified74.0%
Final simplification75.9%
(FPCore (x l t) :precision binary64 (if (<= t -1e-310) -1.0 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
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 <= (-1d-310)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= -1e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-310: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-310) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-310) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-310], -1.0, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-310}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -9.999999999999969e-311Initial program 41.1%
associate-*l/41.1%
Simplified41.1%
Taylor expanded in t around -inf 79.2%
mul-1-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
+-commutative79.2%
sub-neg79.2%
metadata-eval79.2%
+-commutative79.2%
distribute-rgt-neg-out79.2%
Simplified79.2%
Taylor expanded in x around inf 77.9%
if -9.999999999999969e-311 < t Initial program 32.1%
associate-*l/32.1%
Simplified32.1%
Taylor expanded in x around inf 71.5%
sqrt-unprod72.6%
metadata-eval72.6%
metadata-eval72.6%
Applied egg-rr72.6%
Final simplification74.9%
(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 36.0%
associate-*l/36.1%
Simplified36.1%
Taylor expanded in t around -inf 35.6%
mul-1-neg35.6%
*-commutative35.6%
distribute-rgt-neg-in35.6%
+-commutative35.6%
sub-neg35.6%
metadata-eval35.6%
+-commutative35.6%
distribute-rgt-neg-out35.6%
Simplified35.6%
Taylor expanded in x around inf 35.1%
Final simplification35.1%
herbie shell --seed 2023275
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))