
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* l (/ l x)))
(t_2
(*
t
(sqrt
(/ 2.0 (+ t_1 (fma 2.0 (/ t (/ x t)) (fma 2.0 (* t t) t_1)))))))
(t_3 (+ 2.0 (/ 4.0 x))))
(if (<= t -7.6e+82)
(- (+ (/ 1.0 x) -1.0) (/ 0.5 (* x x)))
(if (<= t -4.9e-154)
t_2
(if (<= t -3.5e-308)
(*
t
(/
(sqrt 2.0)
(- (fma t (sqrt t_3) (* (* (/ l x) (/ l t)) (sqrt (/ 1.0 t_3)))))))
(if (<= t 1.8e-225)
(* t (/ (sqrt 2.0) (* l (* (sqrt 2.0) (sqrt (/ 1.0 x))))))
(if (<= t 9.5e-151)
(*
t
(/
(sqrt 2.0)
(fma
0.5
(/ (* 2.0 (fma 2.0 (* t t) (* l l))) (* (sqrt 2.0) (* t x)))
(* t (sqrt 2.0)))))
(if (<= t 4.5e+43) t_2 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = l * (l / x);
double t_2 = t * sqrt((2.0 / (t_1 + fma(2.0, (t / (x / t)), fma(2.0, (t * t), t_1)))));
double t_3 = 2.0 + (4.0 / x);
double tmp;
if (t <= -7.6e+82) {
tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x));
} else if (t <= -4.9e-154) {
tmp = t_2;
} else if (t <= -3.5e-308) {
tmp = t * (sqrt(2.0) / -fma(t, sqrt(t_3), (((l / x) * (l / t)) * sqrt((1.0 / t_3)))));
} else if (t <= 1.8e-225) {
tmp = t * (sqrt(2.0) / (l * (sqrt(2.0) * sqrt((1.0 / x)))));
} else if (t <= 9.5e-151) {
tmp = t * (sqrt(2.0) / fma(0.5, ((2.0 * fma(2.0, (t * t), (l * l))) / (sqrt(2.0) * (t * x))), (t * sqrt(2.0))));
} else if (t <= 4.5e+43) {
tmp = t_2;
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(l * Float64(l / x)) t_2 = Float64(t * sqrt(Float64(2.0 / Float64(t_1 + fma(2.0, Float64(t / Float64(x / t)), fma(2.0, Float64(t * t), t_1)))))) t_3 = Float64(2.0 + Float64(4.0 / x)) tmp = 0.0 if (t <= -7.6e+82) tmp = Float64(Float64(Float64(1.0 / x) + -1.0) - Float64(0.5 / Float64(x * x))); elseif (t <= -4.9e-154) tmp = t_2; elseif (t <= -3.5e-308) tmp = Float64(t * Float64(sqrt(2.0) / Float64(-fma(t, sqrt(t_3), Float64(Float64(Float64(l / x) * Float64(l / t)) * sqrt(Float64(1.0 / t_3))))))); elseif (t <= 1.8e-225) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * Float64(sqrt(2.0) * sqrt(Float64(1.0 / x)))))); elseif (t <= 9.5e-151) 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))), Float64(t * sqrt(2.0))))); elseif (t <= 4.5e+43) tmp = t_2; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[N[(2.0 / N[(t$95$1 + N[(2.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.6e+82], N[(N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.9e-154], t$95$2, If[LessEqual[t, -3.5e-308], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / (-N[(t * N[Sqrt[t$95$3], $MachinePrecision] + N[(N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-225], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-151], 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] + N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+43], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{x}\\
t_2 := t \cdot \sqrt{\frac{2}{t_1 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)}}\\
t_3 := 2 + \frac{4}{x}\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+82}:\\
\;\;\;\;\left(\frac{1}{x} + -1\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{-154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-308}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{-\mathsf{fma}\left(t, \sqrt{t_3}, \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right) \cdot \sqrt{\frac{1}{t_3}}\right)}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-225}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \left(\sqrt{2} \cdot \sqrt{\frac{1}{x}}\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-151}:\\
\;\;\;\;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 \cdot \sqrt{2}\right)}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+43}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -7.60000000000000067e82Initial program 31.0%
associate-*l/31.0%
Simplified31.0%
Taylor expanded in t around -inf 91.1%
mul-1-neg91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
+-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
+-commutative91.1%
distribute-rgt-neg-in91.1%
Simplified91.1%
Taylor expanded in x around inf 91.4%
associate-*r/91.4%
metadata-eval91.4%
unpow291.4%
Simplified91.4%
Taylor expanded in x around 0 91.4%
associate--r+91.5%
sub-neg91.5%
metadata-eval91.5%
associate-*r/91.5%
metadata-eval91.5%
unpow291.5%
Simplified91.5%
if -7.60000000000000067e82 < t < -4.89999999999999997e-154 or 9.4999999999999996e-151 < t < 4.5e43Initial program 61.6%
associate-*l/61.7%
Simplified61.7%
Taylor expanded in x around inf 83.0%
sub-neg83.0%
fma-def83.0%
unpow283.0%
fma-def83.0%
unpow283.0%
unpow283.0%
mul-1-neg83.0%
remove-double-neg83.0%
fma-def83.0%
unpow283.0%
unpow283.0%
Simplified83.0%
Taylor expanded in t around 0 82.6%
unpow282.6%
Simplified82.6%
sqrt-undiv82.7%
associate-/l*82.7%
associate-/l*82.7%
associate-/r/82.7%
associate-/l*93.3%
associate-/r/93.3%
Applied egg-rr93.3%
if -4.89999999999999997e-154 < t < -3.5e-308Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 38.6%
sub-neg38.6%
fma-def38.6%
unpow238.6%
fma-def38.6%
unpow238.6%
unpow238.6%
mul-1-neg38.6%
remove-double-neg38.6%
fma-def38.6%
unpow238.6%
unpow238.6%
Simplified38.6%
Taylor expanded in t around -inf 79.5%
distribute-lft-out79.5%
mul-1-neg79.5%
fma-def79.5%
associate-*r/79.5%
metadata-eval79.5%
unpow279.5%
*-commutative79.5%
times-frac79.5%
associate-*r/79.5%
metadata-eval79.5%
Simplified79.5%
if -3.5e-308 < t < 1.80000000000000005e-225Initial program 1.8%
associate-*l/1.8%
Simplified1.8%
Taylor expanded in x around inf 73.1%
sub-neg73.1%
fma-def73.1%
unpow273.1%
fma-def73.1%
unpow273.1%
unpow273.1%
mul-1-neg73.1%
remove-double-neg73.1%
fma-def73.1%
unpow273.1%
unpow273.1%
Simplified73.1%
Taylor expanded in t around 0 82.1%
associate-*l*82.1%
Simplified82.1%
if 1.80000000000000005e-225 < t < 9.4999999999999996e-151Initial program 7.8%
associate-*l/7.8%
Simplified7.8%
Taylor expanded in x around inf 70.0%
fma-def70.0%
cancel-sign-sub-inv70.0%
metadata-eval70.0%
distribute-rgt1-in70.0%
metadata-eval70.0%
fma-def70.0%
unpow270.0%
unpow270.0%
associate-*r*70.0%
Simplified70.0%
if 4.5e43 < t Initial program 48.1%
associate-*l/48.3%
Simplified48.3%
Taylor expanded in t around inf 94.9%
Taylor expanded in t around 0 95.3%
Final simplification89.7%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* l (/ l x)))
(t_2
(*
t
(sqrt
(/ 2.0 (+ t_1 (fma 2.0 (/ t (/ x t)) (fma 2.0 (* t t) t_1)))))))
(t_3 (+ 2.0 (/ 4.0 x))))
(if (<= t -5e+82)
(- (+ (/ 1.0 x) -1.0) (/ 0.5 (* x x)))
(if (<= t -4.9e-154)
t_2
(if (<= t -2.8e-308)
(*
t
(/
(sqrt 2.0)
(- (fma t (sqrt t_3) (* (* (/ l x) (/ l t)) (sqrt (/ 1.0 t_3)))))))
(if (<= t 4.5e+43) t_2 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = l * (l / x);
double t_2 = t * sqrt((2.0 / (t_1 + fma(2.0, (t / (x / t)), fma(2.0, (t * t), t_1)))));
double t_3 = 2.0 + (4.0 / x);
double tmp;
if (t <= -5e+82) {
tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x));
} else if (t <= -4.9e-154) {
tmp = t_2;
} else if (t <= -2.8e-308) {
tmp = t * (sqrt(2.0) / -fma(t, sqrt(t_3), (((l / x) * (l / t)) * sqrt((1.0 / t_3)))));
} else if (t <= 4.5e+43) {
tmp = t_2;
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(l * Float64(l / x)) t_2 = Float64(t * sqrt(Float64(2.0 / Float64(t_1 + fma(2.0, Float64(t / Float64(x / t)), fma(2.0, Float64(t * t), t_1)))))) t_3 = Float64(2.0 + Float64(4.0 / x)) tmp = 0.0 if (t <= -5e+82) tmp = Float64(Float64(Float64(1.0 / x) + -1.0) - Float64(0.5 / Float64(x * x))); elseif (t <= -4.9e-154) tmp = t_2; elseif (t <= -2.8e-308) tmp = Float64(t * Float64(sqrt(2.0) / Float64(-fma(t, sqrt(t_3), Float64(Float64(Float64(l / x) * Float64(l / t)) * sqrt(Float64(1.0 / t_3))))))); elseif (t <= 4.5e+43) tmp = t_2; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[Sqrt[N[(2.0 / N[(t$95$1 + N[(2.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[(4.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+82], N[(N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.9e-154], t$95$2, If[LessEqual[t, -2.8e-308], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / (-N[(t * N[Sqrt[t$95$3], $MachinePrecision] + N[(N[(N[(l / x), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+43], t$95$2, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{x}\\
t_2 := t \cdot \sqrt{\frac{2}{t_1 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_1\right)\right)}}\\
t_3 := 2 + \frac{4}{x}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+82}:\\
\;\;\;\;\left(\frac{1}{x} + -1\right) - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{-154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-308}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{-\mathsf{fma}\left(t, \sqrt{t_3}, \left(\frac{\ell}{x} \cdot \frac{\ell}{t}\right) \cdot \sqrt{\frac{1}{t_3}}\right)}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+43}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -5.00000000000000015e82Initial program 31.0%
associate-*l/31.0%
Simplified31.0%
Taylor expanded in t around -inf 91.1%
mul-1-neg91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
+-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
+-commutative91.1%
distribute-rgt-neg-in91.1%
Simplified91.1%
Taylor expanded in x around inf 91.4%
associate-*r/91.4%
metadata-eval91.4%
unpow291.4%
Simplified91.4%
Taylor expanded in x around 0 91.4%
associate--r+91.5%
sub-neg91.5%
metadata-eval91.5%
associate-*r/91.5%
metadata-eval91.5%
unpow291.5%
Simplified91.5%
if -5.00000000000000015e82 < t < -4.89999999999999997e-154 or -2.79999999999999984e-308 < t < 4.5e43Initial program 47.9%
associate-*l/47.9%
Simplified47.9%
Taylor expanded in x around inf 78.3%
sub-neg78.3%
fma-def78.3%
unpow278.3%
fma-def78.3%
unpow278.3%
unpow278.3%
mul-1-neg78.3%
remove-double-neg78.3%
fma-def78.3%
unpow278.3%
unpow278.3%
Simplified78.3%
Taylor expanded in t around 0 77.7%
unpow277.7%
Simplified77.7%
sqrt-undiv77.6%
associate-/l*77.6%
associate-/l*77.6%
associate-/r/77.6%
associate-/l*86.4%
associate-/r/86.3%
Applied egg-rr86.3%
if -4.89999999999999997e-154 < t < -2.79999999999999984e-308Initial program 2.4%
associate-*l/2.4%
Simplified2.4%
Taylor expanded in x around inf 38.6%
sub-neg38.6%
fma-def38.6%
unpow238.6%
fma-def38.6%
unpow238.6%
unpow238.6%
mul-1-neg38.6%
remove-double-neg38.6%
fma-def38.6%
unpow238.6%
unpow238.6%
Simplified38.6%
Taylor expanded in t around -inf 79.5%
distribute-lft-out79.5%
mul-1-neg79.5%
fma-def79.5%
associate-*r/79.5%
metadata-eval79.5%
unpow279.5%
*-commutative79.5%
times-frac79.5%
associate-*r/79.5%
metadata-eval79.5%
Simplified79.5%
if 4.5e43 < t Initial program 48.1%
associate-*l/48.3%
Simplified48.3%
Taylor expanded in t around inf 94.9%
Taylor expanded in t around 0 95.3%
Final simplification88.6%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (+ (/ 1.0 x) -1.0))
(t_2 (* l (/ l x)))
(t_3
(*
t
(sqrt
(/ 2.0 (+ t_2 (fma 2.0 (/ t (/ x t)) (fma 2.0 (* t t) t_2))))))))
(if (<= t -2e+82)
(- t_1 (/ 0.5 (* x x)))
(if (<= t -1.8e-156)
t_3
(if (<= t -3.7e-308)
t_1
(if (<= t 2e+43) t_3 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = (1.0 / x) + -1.0;
double t_2 = l * (l / x);
double t_3 = t * sqrt((2.0 / (t_2 + fma(2.0, (t / (x / t)), fma(2.0, (t * t), t_2)))));
double tmp;
if (t <= -2e+82) {
tmp = t_1 - (0.5 / (x * x));
} else if (t <= -1.8e-156) {
tmp = t_3;
} else if (t <= -3.7e-308) {
tmp = t_1;
} else if (t <= 2e+43) {
tmp = t_3;
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) function code(x, l, t) t_1 = Float64(Float64(1.0 / x) + -1.0) t_2 = Float64(l * Float64(l / x)) t_3 = Float64(t * sqrt(Float64(2.0 / Float64(t_2 + fma(2.0, Float64(t / Float64(x / t)), fma(2.0, Float64(t * t), t_2)))))) tmp = 0.0 if (t <= -2e+82) tmp = Float64(t_1 - Float64(0.5 / Float64(x * x))); elseif (t <= -1.8e-156) tmp = t_3; elseif (t <= -3.7e-308) tmp = t_1; elseif (t <= 2e+43) tmp = t_3; else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[Sqrt[N[(2.0 / N[(t$95$2 + N[(2.0 * N[(t / N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+82], N[(t$95$1 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-156], t$95$3, If[LessEqual[t, -3.7e-308], t$95$1, If[LessEqual[t, 2e+43], t$95$3, N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{1}{x} + -1\\
t_2 := \ell \cdot \frac{\ell}{x}\\
t_3 := t \cdot \sqrt{\frac{2}{t_2 + \mathsf{fma}\left(2, \frac{t}{\frac{x}{t}}, \mathsf{fma}\left(2, t \cdot t, t_2\right)\right)}}\\
\mathbf{if}\;t \leq -2 \cdot 10^{+82}:\\
\;\;\;\;t_1 - \frac{0.5}{x \cdot x}\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{-156}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+43}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -1.9999999999999999e82Initial program 31.0%
associate-*l/31.0%
Simplified31.0%
Taylor expanded in t around -inf 91.1%
mul-1-neg91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
+-commutative91.1%
sub-neg91.1%
metadata-eval91.1%
+-commutative91.1%
distribute-rgt-neg-in91.1%
Simplified91.1%
Taylor expanded in x around inf 91.4%
associate-*r/91.4%
metadata-eval91.4%
unpow291.4%
Simplified91.4%
Taylor expanded in x around 0 91.4%
associate--r+91.5%
sub-neg91.5%
metadata-eval91.5%
associate-*r/91.5%
metadata-eval91.5%
unpow291.5%
Simplified91.5%
if -1.9999999999999999e82 < t < -1.79999999999999999e-156 or -3.70000000000000006e-308 < t < 2.00000000000000003e43Initial program 46.8%
associate-*l/46.9%
Simplified46.9%
Taylor expanded in x around inf 78.7%
sub-neg78.7%
fma-def78.7%
unpow278.7%
fma-def78.7%
unpow278.7%
unpow278.7%
mul-1-neg78.7%
remove-double-neg78.7%
fma-def78.7%
unpow278.7%
unpow278.7%
Simplified78.7%
Taylor expanded in t around 0 78.2%
unpow278.2%
Simplified78.2%
sqrt-undiv78.1%
associate-/l*78.1%
associate-/l*78.1%
associate-/r/78.1%
associate-/l*86.7%
associate-/r/86.6%
Applied egg-rr86.6%
if -1.79999999999999999e-156 < t < -3.70000000000000006e-308Initial program 2.6%
associate-*l/2.6%
Simplified2.6%
Taylor expanded in t around -inf 58.9%
mul-1-neg58.9%
*-commutative58.9%
distribute-rgt-neg-in58.9%
+-commutative58.9%
sub-neg58.9%
metadata-eval58.9%
+-commutative58.9%
distribute-rgt-neg-in58.9%
Simplified58.9%
Taylor expanded in x around inf 59.3%
if 2.00000000000000003e43 < t Initial program 48.1%
associate-*l/48.3%
Simplified48.3%
Taylor expanded in t around inf 94.9%
Taylor expanded in t around 0 95.3%
Final simplification87.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.55e-253)
(- t_1)
(if (<= t 4e-127)
(/
(* t (sqrt 2.0))
(* l (sqrt (+ (+ (/ 1.0 x) (/ 1.0 (* x x))) (/ 1.0 (+ x -1.0))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.55e-253) {
tmp = -t_1;
} else if (t <= 4e-127) {
tmp = (t * sqrt(2.0)) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0)))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.55d-253)) then
tmp = -t_1
else if (t <= 4d-127) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt((((1.0d0 / x) + (1.0d0 / (x * x))) + (1.0d0 / (x + (-1.0d0))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.55e-253) {
tmp = -t_1;
} else if (t <= 4e-127) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0)))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.55e-253: tmp = -t_1 elif t <= 4e-127: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.55e-253) tmp = Float64(-t_1); elseif (t <= 4e-127) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x * x))) + Float64(1.0 / Float64(x + -1.0)))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.55e-253) tmp = -t_1; elseif (t <= 4e-127) tmp = (t * sqrt(2.0)) / (l * sqrt((((1.0 / x) + (1.0 / (x * x))) + (1.0 / (x + -1.0))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.55e-253], (-t$95$1), If[LessEqual[t, 4e-127], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-253}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-127}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\left(\frac{1}{x} + \frac{1}{x \cdot x}\right) + \frac{1}{x + -1}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.54999999999999998e-253Initial program 38.6%
associate-*l/38.7%
Simplified38.7%
Taylor expanded in t around -inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
sub-neg77.4%
metadata-eval77.4%
+-commutative77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
sub-neg77.7%
metadata-eval77.7%
+-commutative77.7%
Simplified77.7%
if -1.54999999999999998e-253 < t < 4.0000000000000001e-127Initial program 4.7%
associate-*l/4.7%
Simplified4.7%
Taylor expanded in l around inf 5.9%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
associate-*l/29.5%
*-commutative29.5%
+-commutative29.5%
sub-neg29.5%
+-commutative29.5%
metadata-eval29.5%
+-commutative29.5%
Applied egg-rr29.5%
Taylor expanded in x around inf 43.7%
unpow243.7%
Simplified43.7%
if 4.0000000000000001e-127 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification76.2%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -2.4e-253)
(- t_1)
(if (<= t 2.85e-129)
(* (/ t l) (/ (sqrt 2.0) (sqrt (+ (/ 2.0 x) (/ 2.0 (* x x))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -2.4e-253) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = (t / l) * (sqrt(2.0) / sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-2.4d-253)) then
tmp = -t_1
else if (t <= 2.85d-129) then
tmp = (t / l) * (sqrt(2.0d0) / sqrt(((2.0d0 / x) + (2.0d0 / (x * x)))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -2.4e-253) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = (t / l) * (Math.sqrt(2.0) / Math.sqrt(((2.0 / x) + (2.0 / (x * x)))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -2.4e-253: tmp = -t_1 elif t <= 2.85e-129: tmp = (t / l) * (math.sqrt(2.0) / math.sqrt(((2.0 / x) + (2.0 / (x * x))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -2.4e-253) tmp = Float64(-t_1); elseif (t <= 2.85e-129) tmp = Float64(Float64(t / l) * Float64(sqrt(2.0) / sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / Float64(x * x)))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -2.4e-253) tmp = -t_1; elseif (t <= 2.85e-129) tmp = (t / l) * (sqrt(2.0) / sqrt(((2.0 / x) + (2.0 / (x * x))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -2.4e-253], (-t$95$1), If[LessEqual[t, 2.85e-129], N[(N[(t / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-253}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-129}:\\
\;\;\;\;\frac{t}{\ell} \cdot \frac{\sqrt{2}}{\sqrt{\frac{2}{x} + \frac{2}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.40000000000000009e-253Initial program 38.6%
associate-*l/38.7%
Simplified38.7%
Taylor expanded in t around -inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
sub-neg77.4%
metadata-eval77.4%
+-commutative77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
sub-neg77.7%
metadata-eval77.7%
+-commutative77.7%
Simplified77.7%
if -2.40000000000000009e-253 < t < 2.85e-129Initial program 4.7%
associate-*l/4.7%
Simplified4.7%
Taylor expanded in l around inf 5.9%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
associate-*l/29.5%
*-commutative29.5%
+-commutative29.5%
sub-neg29.5%
+-commutative29.5%
metadata-eval29.5%
+-commutative29.5%
Applied egg-rr29.5%
times-frac29.3%
associate-+l+5.6%
Applied egg-rr5.6%
Taylor expanded in x around inf 41.6%
associate-*r/41.6%
metadata-eval41.6%
associate-*r/41.6%
metadata-eval41.6%
unpow241.6%
Simplified41.6%
if 2.85e-129 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification75.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -3.7e-308)
(- t_1)
(if (<= t 5.4e-129)
(* t (/ (sqrt 2.0) (* l (sqrt (+ (/ 1.0 x) (/ 1.0 (+ x -1.0)))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -3.7e-308) {
tmp = -t_1;
} else if (t <= 5.4e-129) {
tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / x) + (1.0 / (x + -1.0))))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-3.7d-308)) then
tmp = -t_1
else if (t <= 5.4d-129) then
tmp = t * (sqrt(2.0d0) / (l * sqrt(((1.0d0 / x) + (1.0d0 / (x + (-1.0d0)))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -3.7e-308) {
tmp = -t_1;
} else if (t <= 5.4e-129) {
tmp = t * (Math.sqrt(2.0) / (l * Math.sqrt(((1.0 / x) + (1.0 / (x + -1.0))))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -3.7e-308: tmp = -t_1 elif t <= 5.4e-129: tmp = t * (math.sqrt(2.0) / (l * math.sqrt(((1.0 / x) + (1.0 / (x + -1.0)))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -3.7e-308) tmp = Float64(-t_1); elseif (t <= 5.4e-129) tmp = Float64(t * Float64(sqrt(2.0) / Float64(l * sqrt(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0))))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -3.7e-308) tmp = -t_1; elseif (t <= 5.4e-129) tmp = t * (sqrt(2.0) / (l * sqrt(((1.0 / x) + (1.0 / (x + -1.0)))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.7e-308], (-t$95$1), If[LessEqual[t, 5.4e-129], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-308}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-129}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x} + \frac{1}{x + -1}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.70000000000000006e-308Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in t around 0 75.4%
mul-1-neg75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
if -3.70000000000000006e-308 < t < 5.39999999999999998e-129Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
Taylor expanded in l around inf 4.4%
associate--l+31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
sub-neg31.1%
metadata-eval31.1%
+-commutative31.1%
Simplified31.1%
Taylor expanded in x around inf 50.2%
if 5.39999999999999998e-129 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification77.3%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.55e-253)
(- t_1)
(if (<= t 4.4e-129)
(/ (* t (sqrt 2.0)) (* l (sqrt (+ (/ 1.0 x) (/ 1.0 (+ x -1.0))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.55e-253) {
tmp = -t_1;
} else if (t <= 4.4e-129) {
tmp = (t * sqrt(2.0)) / (l * sqrt(((1.0 / x) + (1.0 / (x + -1.0)))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.55d-253)) then
tmp = -t_1
else if (t <= 4.4d-129) then
tmp = (t * sqrt(2.0d0)) / (l * sqrt(((1.0d0 / x) + (1.0d0 / (x + (-1.0d0))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.55e-253) {
tmp = -t_1;
} else if (t <= 4.4e-129) {
tmp = (t * Math.sqrt(2.0)) / (l * Math.sqrt(((1.0 / x) + (1.0 / (x + -1.0)))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.55e-253: tmp = -t_1 elif t <= 4.4e-129: tmp = (t * math.sqrt(2.0)) / (l * math.sqrt(((1.0 / x) + (1.0 / (x + -1.0))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.55e-253) tmp = Float64(-t_1); elseif (t <= 4.4e-129) tmp = Float64(Float64(t * sqrt(2.0)) / Float64(l * sqrt(Float64(Float64(1.0 / x) + Float64(1.0 / Float64(x + -1.0)))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.55e-253) tmp = -t_1; elseif (t <= 4.4e-129) tmp = (t * sqrt(2.0)) / (l * sqrt(((1.0 / x) + (1.0 / (x + -1.0))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.55e-253], (-t$95$1), If[LessEqual[t, 4.4e-129], N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Sqrt[N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-253}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-129}:\\
\;\;\;\;\frac{t \cdot \sqrt{2}}{\ell \cdot \sqrt{\frac{1}{x} + \frac{1}{x + -1}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.54999999999999998e-253Initial program 38.6%
associate-*l/38.7%
Simplified38.7%
Taylor expanded in t around -inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
sub-neg77.4%
metadata-eval77.4%
+-commutative77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
sub-neg77.7%
metadata-eval77.7%
+-commutative77.7%
Simplified77.7%
if -1.54999999999999998e-253 < t < 4.40000000000000006e-129Initial program 4.7%
associate-*l/4.7%
Simplified4.7%
Taylor expanded in l around inf 5.9%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
associate-*l/29.5%
*-commutative29.5%
+-commutative29.5%
sub-neg29.5%
+-commutative29.5%
metadata-eval29.5%
+-commutative29.5%
Applied egg-rr29.5%
Taylor expanded in x around inf 43.5%
if 4.40000000000000006e-129 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification76.1%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.25e-253)
(- t_1)
(if (<= t 2.85e-129) (* (/ t l) (/ (sqrt 2.0) (sqrt (/ 2.0 x)))) t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.25e-253) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = (t / l) * (sqrt(2.0) / sqrt((2.0 / x)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.25d-253)) then
tmp = -t_1
else if (t <= 2.85d-129) then
tmp = (t / l) * (sqrt(2.0d0) / sqrt((2.0d0 / x)))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.25e-253) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = (t / l) * (Math.sqrt(2.0) / Math.sqrt((2.0 / x)));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.25e-253: tmp = -t_1 elif t <= 2.85e-129: tmp = (t / l) * (math.sqrt(2.0) / math.sqrt((2.0 / x))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.25e-253) tmp = Float64(-t_1); elseif (t <= 2.85e-129) tmp = Float64(Float64(t / l) * Float64(sqrt(2.0) / sqrt(Float64(2.0 / x)))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.25e-253) tmp = -t_1; elseif (t <= 2.85e-129) tmp = (t / l) * (sqrt(2.0) / sqrt((2.0 / x))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.25e-253], (-t$95$1), If[LessEqual[t, 2.85e-129], N[(N[(t / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-253}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-129}:\\
\;\;\;\;\frac{t}{\ell} \cdot \frac{\sqrt{2}}{\sqrt{\frac{2}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.24999999999999993e-253Initial program 38.6%
associate-*l/38.7%
Simplified38.7%
Taylor expanded in t around -inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
distribute-rgt-neg-in77.4%
+-commutative77.4%
sub-neg77.4%
metadata-eval77.4%
+-commutative77.4%
distribute-rgt-neg-in77.4%
Simplified77.4%
Taylor expanded in t around 0 77.7%
mul-1-neg77.7%
sub-neg77.7%
metadata-eval77.7%
+-commutative77.7%
Simplified77.7%
if -1.24999999999999993e-253 < t < 2.85e-129Initial program 4.7%
associate-*l/4.7%
Simplified4.7%
Taylor expanded in l around inf 5.9%
associate--l+29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
sub-neg29.5%
metadata-eval29.5%
+-commutative29.5%
Simplified29.5%
associate-*l/29.5%
*-commutative29.5%
+-commutative29.5%
sub-neg29.5%
+-commutative29.5%
metadata-eval29.5%
+-commutative29.5%
Applied egg-rr29.5%
times-frac29.3%
associate-+l+5.6%
Applied egg-rr5.6%
Taylor expanded in x around inf 41.5%
if 2.85e-129 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification75.8%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.8e-308)
(- t_1)
(if (<= t 2.85e-129)
(* t (sqrt (/ 2.0 (* 2.0 (* (/ l x) (+ l (/ l x)))))))
t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.8e-308) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = t * sqrt((2.0 / (2.0 * ((l / x) * (l + (l / x))))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.8d-308)) then
tmp = -t_1
else if (t <= 2.85d-129) then
tmp = t * sqrt((2.0d0 / (2.0d0 * ((l / x) * (l + (l / x))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.8e-308) {
tmp = -t_1;
} else if (t <= 2.85e-129) {
tmp = t * Math.sqrt((2.0 / (2.0 * ((l / x) * (l + (l / x))))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.8e-308: tmp = -t_1 elif t <= 2.85e-129: tmp = t * math.sqrt((2.0 / (2.0 * ((l / x) * (l + (l / x)))))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.8e-308) tmp = Float64(-t_1); elseif (t <= 2.85e-129) tmp = Float64(t * sqrt(Float64(2.0 / Float64(2.0 * Float64(Float64(l / x) * Float64(l + Float64(l / x))))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.8e-308) tmp = -t_1; elseif (t <= 2.85e-129) tmp = t * sqrt((2.0 / (2.0 * ((l / x) * (l + (l / x)))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.8e-308], (-t$95$1), If[LessEqual[t, 2.85e-129], N[(t * N[Sqrt[N[(2.0 / N[(2.0 * N[(N[(l / x), $MachinePrecision] * N[(l + N[(l / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{-308}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-129}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{2 \cdot \left(\frac{\ell}{x} \cdot \left(\ell + \frac{\ell}{x}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.7999999999999999e-308Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in t around 0 75.4%
mul-1-neg75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
if -1.7999999999999999e-308 < t < 2.85e-129Initial program 5.1%
associate-*l/5.1%
Simplified5.1%
expm1-log1p-u4.8%
expm1-udef4.8%
Applied egg-rr10.0%
expm1-def10.1%
expm1-log1p10.3%
metadata-eval10.3%
sub-neg10.3%
associate-/l*4.3%
sub-neg4.3%
metadata-eval4.3%
+-commutative4.3%
Simplified4.3%
Taylor expanded in t around 0 4.3%
sub-neg4.3%
metadata-eval4.3%
unpow24.3%
Simplified4.3%
Taylor expanded in x around inf 50.1%
associate--l+50.1%
unpow250.1%
associate-/l*50.2%
unpow250.2%
unpow250.2%
distribute-lft-out50.2%
unpow250.2%
associate-/l*50.2%
unpow250.2%
unpow250.2%
Simplified50.2%
*-un-lft-identity50.2%
associate-/r/50.2%
cancel-sign-sub-inv50.2%
times-frac50.2%
metadata-eval50.2%
*-un-lft-identity50.2%
associate-/r/50.1%
times-frac63.4%
Applied egg-rr63.4%
*-lft-identity63.4%
associate-+r+63.4%
count-263.4%
+-commutative63.4%
distribute-lft-out63.1%
Simplified63.1%
if 2.85e-129 < t Initial program 59.1%
associate-*l/59.2%
Simplified59.2%
Taylor expanded in t around inf 88.7%
Taylor expanded in t around 0 89.1%
Final simplification79.1%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -1.8e-308)
(- t_1)
(if (<= t 2.2e-194) (* t (sqrt (/ 2.0 (/ (* 2.0 (* l l)) x)))) t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.8e-308) {
tmp = -t_1;
} else if (t <= 2.2e-194) {
tmp = t * sqrt((2.0 / ((2.0 * (l * l)) / x)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-1.8d-308)) then
tmp = -t_1
else if (t <= 2.2d-194) then
tmp = t * sqrt((2.0d0 / ((2.0d0 * (l * l)) / x)))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -1.8e-308) {
tmp = -t_1;
} else if (t <= 2.2e-194) {
tmp = t * Math.sqrt((2.0 / ((2.0 * (l * l)) / x)));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -1.8e-308: tmp = -t_1 elif t <= 2.2e-194: tmp = t * math.sqrt((2.0 / ((2.0 * (l * l)) / x))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -1.8e-308) tmp = Float64(-t_1); elseif (t <= 2.2e-194) tmp = Float64(t * sqrt(Float64(2.0 / Float64(Float64(2.0 * Float64(l * l)) / x)))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -1.8e-308) tmp = -t_1; elseif (t <= 2.2e-194) tmp = t * sqrt((2.0 / ((2.0 * (l * l)) / x))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.8e-308], (-t$95$1), If[LessEqual[t, 2.2e-194], N[(t * N[Sqrt[N[(2.0 / N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{-308}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-194}:\\
\;\;\;\;t \cdot \sqrt{\frac{2}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{x}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.7999999999999999e-308Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in t around 0 75.4%
mul-1-neg75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
if -1.7999999999999999e-308 < t < 2.2000000000000001e-194Initial program 1.7%
associate-*l/1.7%
Simplified1.7%
expm1-log1p-u1.7%
expm1-udef1.7%
Applied egg-rr13.0%
expm1-def13.0%
expm1-log1p13.0%
metadata-eval13.0%
sub-neg13.0%
associate-/l*6.7%
sub-neg6.7%
metadata-eval6.7%
+-commutative6.7%
Simplified6.7%
Taylor expanded in t around 0 6.7%
sub-neg6.7%
metadata-eval6.7%
unpow26.7%
Simplified6.7%
Taylor expanded in x around inf 72.5%
cancel-sign-sub-inv72.5%
metadata-eval72.5%
distribute-rgt1-in72.5%
metadata-eval72.5%
unpow272.5%
Simplified72.5%
if 2.2000000000000001e-194 < t Initial program 51.2%
associate-*l/51.3%
Simplified51.3%
Taylor expanded in t around inf 82.0%
Taylor expanded in t around 0 82.4%
Final simplification78.5%
NOTE: l should be positive before calling this function
(FPCore (x l t)
:precision binary64
(let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
(if (<= t -3.6e-308)
(- t_1)
(if (<= t 3.35e-195) (* t (sqrt (/ (* x -2.0) (* (* l l) -2.0)))) t_1))))l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -3.6e-308) {
tmp = -t_1;
} else if (t <= 3.35e-195) {
tmp = t * sqrt(((x * -2.0) / ((l * l) * -2.0)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-3.6d-308)) then
tmp = -t_1
else if (t <= 3.35d-195) then
tmp = t * sqrt(((x * (-2.0d0)) / ((l * l) * (-2.0d0))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -3.6e-308) {
tmp = -t_1;
} else if (t <= 3.35e-195) {
tmp = t * Math.sqrt(((x * -2.0) / ((l * l) * -2.0)));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -3.6e-308: tmp = -t_1 elif t <= 3.35e-195: tmp = t * math.sqrt(((x * -2.0) / ((l * l) * -2.0))) else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -3.6e-308) tmp = Float64(-t_1); elseif (t <= 3.35e-195) tmp = Float64(t * sqrt(Float64(Float64(x * -2.0) / Float64(Float64(l * l) * -2.0)))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -3.6e-308) tmp = -t_1; elseif (t <= 3.35e-195) tmp = t * sqrt(((x * -2.0) / ((l * l) * -2.0))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.6e-308], (-t$95$1), If[LessEqual[t, 3.35e-195], N[(t * N[Sqrt[N[(N[(x * -2.0), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{-308}:\\
\;\;\;\;-t_1\\
\mathbf{elif}\;t \leq 3.35 \cdot 10^{-195}:\\
\;\;\;\;t \cdot \sqrt{\frac{x \cdot -2}{\left(\ell \cdot \ell\right) \cdot -2}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.5999999999999999e-308Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in t around 0 75.4%
mul-1-neg75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
if -3.5999999999999999e-308 < t < 3.3500000000000001e-195Initial program 1.7%
associate-*l/1.7%
Simplified1.7%
expm1-log1p-u1.7%
expm1-udef1.7%
Applied egg-rr13.0%
expm1-def13.0%
expm1-log1p13.0%
metadata-eval13.0%
sub-neg13.0%
associate-/l*6.7%
sub-neg6.7%
metadata-eval6.7%
+-commutative6.7%
Simplified6.7%
Taylor expanded in t around 0 6.7%
sub-neg6.7%
metadata-eval6.7%
unpow26.7%
Simplified6.7%
Taylor expanded in x around inf 61.7%
associate--l+61.7%
unpow261.7%
associate-/l*61.7%
unpow261.7%
unpow261.7%
distribute-lft-out61.7%
unpow261.7%
associate-/l*61.7%
unpow261.7%
unpow261.7%
Simplified61.7%
Taylor expanded in x around -inf 72.6%
associate-*r/72.6%
*-commutative72.6%
sub-neg72.6%
mul-1-neg72.6%
distribute-rgt-out72.6%
metadata-eval72.6%
unpow272.6%
Simplified72.6%
if 3.3500000000000001e-195 < t Initial program 51.2%
associate-*l/51.3%
Simplified51.3%
Taylor expanded in t around inf 82.0%
Taylor expanded in t around 0 82.4%
Final simplification78.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (sqrt (/ (+ x -1.0) (+ 1.0 x))))) (if (<= t -5e-310) (- t_1) t_1)))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -5e-310) {
tmp = -t_1;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
if (t <= (-5d-310)) then
tmp = -t_1
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = Math.sqrt(((x + -1.0) / (1.0 + x)));
double tmp;
if (t <= -5e-310) {
tmp = -t_1;
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = math.sqrt(((x + -1.0) / (1.0 + x))) tmp = 0 if t <= -5e-310: tmp = -t_1 else: tmp = t_1 return tmp
l = abs(l) function code(x, l, t) t_1 = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) tmp = 0.0 if (t <= -5e-310) tmp = Float64(-t_1); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = sqrt(((x + -1.0) / (1.0 + x))); tmp = 0.0; if (t <= -5e-310) tmp = -t_1; else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -5e-310], (-t$95$1), t$95$1]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\frac{x + -1}{1 + x}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-t_1\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in t around 0 75.4%
mul-1-neg75.4%
sub-neg75.4%
metadata-eval75.4%
+-commutative75.4%
Simplified75.4%
if -4.999999999999985e-310 < t Initial program 44.8%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around inf 73.4%
Taylor expanded in t around 0 73.7%
Final simplification74.5%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) (- (+ (/ 1.0 x) -1.0) (/ 0.5 (* x x))) (sqrt (/ (+ x -1.0) (+ 1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x));
} else {
tmp = sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = ((1.0d0 / x) + (-1.0d0)) - (0.5d0 / (x * x))
else
tmp = sqrt(((x + (-1.0d0)) / (1.0d0 + x)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x));
} else {
tmp = Math.sqrt(((x + -1.0) / (1.0 + x)));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x)) else: tmp = math.sqrt(((x + -1.0) / (1.0 + x))) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = Float64(Float64(Float64(1.0 / x) + -1.0) - Float64(0.5 / Float64(x * x))); else tmp = sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = ((1.0 / x) + -1.0) - (0.5 / (x * x)); else tmp = sqrt(((x + -1.0) / (1.0 + x))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], N[(N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision] - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(\frac{1}{x} + -1\right) - \frac{0.5}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{x + -1}{1 + x}}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in x around inf 74.9%
associate-*r/74.9%
metadata-eval74.9%
unpow274.9%
Simplified74.9%
Taylor expanded in x around 0 74.9%
associate--r+74.9%
sub-neg74.9%
metadata-eval74.9%
associate-*r/74.9%
metadata-eval74.9%
unpow274.9%
Simplified74.9%
if -4.999999999999985e-310 < t Initial program 44.8%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around inf 73.4%
Taylor expanded in t around 0 73.7%
Final simplification74.3%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t 4.5e-305) (+ (/ 1.0 x) -1.0) (+ 1.0 (+ (/ 0.5 (* x x)) (/ -1.0 x)))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= 4.5e-305) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 4.5d-305) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0 + ((0.5d0 / (x * x)) + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= 4.5e-305) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= 4.5e-305: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= 4.5e-305) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(1.0 + Float64(Float64(0.5 / Float64(x * x)) + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 4.5e-305) tmp = (1.0 / x) + -1.0; else tmp = 1.0 + ((0.5 / (x * x)) + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, 4.5e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(\frac{0.5}{x \cdot x} + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < 4.5000000000000002e-305Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in t around -inf 74.5%
mul-1-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
+-commutative74.5%
sub-neg74.5%
metadata-eval74.5%
+-commutative74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
Taylor expanded in x around inf 74.1%
if 4.5000000000000002e-305 < t Initial program 45.1%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in t around inf 73.9%
Taylor expanded in x around inf 73.7%
associate--l+73.7%
associate-*r/73.7%
metadata-eval73.7%
unpow273.7%
Simplified73.7%
Final simplification73.9%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (let* ((t_1 (/ 0.5 (* x x)))) (if (<= t 4.5e-305) (- (+ (/ 1.0 x) -1.0) t_1) (+ 1.0 (+ t_1 (/ -1.0 x))))))
l = abs(l);
double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= 4.5e-305) {
tmp = ((1.0 / x) + -1.0) - t_1;
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 0.5d0 / (x * x)
if (t <= 4.5d-305) then
tmp = ((1.0d0 / x) + (-1.0d0)) - t_1
else
tmp = 1.0d0 + (t_1 + ((-1.0d0) / x))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double t_1 = 0.5 / (x * x);
double tmp;
if (t <= 4.5e-305) {
tmp = ((1.0 / x) + -1.0) - t_1;
} else {
tmp = 1.0 + (t_1 + (-1.0 / x));
}
return tmp;
}
l = abs(l) def code(x, l, t): t_1 = 0.5 / (x * x) tmp = 0 if t <= 4.5e-305: tmp = ((1.0 / x) + -1.0) - t_1 else: tmp = 1.0 + (t_1 + (-1.0 / x)) return tmp
l = abs(l) function code(x, l, t) t_1 = Float64(0.5 / Float64(x * x)) tmp = 0.0 if (t <= 4.5e-305) tmp = Float64(Float64(Float64(1.0 / x) + -1.0) - t_1); else tmp = Float64(1.0 + Float64(t_1 + Float64(-1.0 / x))); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) t_1 = 0.5 / (x * x); tmp = 0.0; if (t <= 4.5e-305) tmp = ((1.0 / x) + -1.0) - t_1; else tmp = 1.0 + (t_1 + (-1.0 / x)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[x_, l_, t_] := Block[{t$95$1 = N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 4.5e-305], N[(N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision] - t$95$1), $MachinePrecision], N[(1.0 + N[(t$95$1 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{0.5}{x \cdot x}\\
\mathbf{if}\;t \leq 4.5 \cdot 10^{-305}:\\
\;\;\;\;\left(\frac{1}{x} + -1\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(t_1 + \frac{-1}{x}\right)\\
\end{array}
\end{array}
if t < 4.5000000000000002e-305Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in t around -inf 74.5%
mul-1-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
+-commutative74.5%
sub-neg74.5%
metadata-eval74.5%
+-commutative74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
Taylor expanded in x around inf 74.3%
associate-*r/74.3%
metadata-eval74.3%
unpow274.3%
Simplified74.3%
Taylor expanded in x around 0 74.3%
associate--r+74.3%
sub-neg74.3%
metadata-eval74.3%
associate-*r/74.3%
metadata-eval74.3%
unpow274.3%
Simplified74.3%
if 4.5000000000000002e-305 < t Initial program 45.1%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in t around inf 73.9%
Taylor expanded in x around inf 73.7%
associate--l+73.7%
associate-*r/73.7%
metadata-eval73.7%
unpow273.7%
Simplified73.7%
Final simplification74.0%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) -1.0 (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = -1.0d0
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = -1.0; else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], -1.0, N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in x around inf 73.4%
Taylor expanded in t around 0 73.7%
if -4.999999999999985e-310 < t Initial program 44.8%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around inf 73.4%
Taylor expanded in x around inf 72.8%
Final simplification73.2%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t 4.5e-305) (+ (/ 1.0 x) -1.0) (+ 1.0 (/ -1.0 x))))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= 4.5e-305) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 4.5d-305) then
tmp = (1.0d0 / x) + (-1.0d0)
else
tmp = 1.0d0 + ((-1.0d0) / x)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= 4.5e-305) {
tmp = (1.0 / x) + -1.0;
} else {
tmp = 1.0 + (-1.0 / x);
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= 4.5e-305: tmp = (1.0 / x) + -1.0 else: tmp = 1.0 + (-1.0 / x) return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= 4.5e-305) tmp = Float64(Float64(1.0 / x) + -1.0); else tmp = Float64(1.0 + Float64(-1.0 / x)); end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 4.5e-305) tmp = (1.0 / x) + -1.0; else tmp = 1.0 + (-1.0 / x); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, 4.5e-305], N[(N[(1.0 / x), $MachinePrecision] + -1.0), $MachinePrecision], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{1}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\end{array}
\end{array}
if t < 4.5000000000000002e-305Initial program 35.5%
associate-*l/35.6%
Simplified35.6%
Taylor expanded in t around -inf 74.5%
mul-1-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
+-commutative74.5%
sub-neg74.5%
metadata-eval74.5%
+-commutative74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
Taylor expanded in x around inf 74.1%
if 4.5000000000000002e-305 < t Initial program 45.1%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in t around inf 73.9%
Taylor expanded in x around inf 73.3%
Final simplification73.7%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 (if (<= t -5e-310) -1.0 1.0))
l = abs(l);
double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d-310)) then
tmp = -1.0d0
else
tmp = 1.0d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
double tmp;
if (t <= -5e-310) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
l = abs(l) def code(x, l, t): tmp = 0 if t <= -5e-310: tmp = -1.0 else: tmp = 1.0 return tmp
l = abs(l) function code(x, l, t) tmp = 0.0 if (t <= -5e-310) tmp = -1.0; else tmp = 1.0; end return tmp end
l = abs(l) function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -5e-310) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := If[LessEqual[t, -5e-310], -1.0, 1.0]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 35.8%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in t around -inf 75.1%
mul-1-neg75.1%
*-commutative75.1%
distribute-rgt-neg-in75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
+-commutative75.1%
distribute-rgt-neg-in75.1%
Simplified75.1%
Taylor expanded in x around inf 73.4%
Taylor expanded in t around 0 73.7%
if -4.999999999999985e-310 < t Initial program 44.8%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in t around inf 73.4%
Taylor expanded in x around inf 71.8%
Final simplification72.6%
NOTE: l should be positive before calling this function (FPCore (x l t) :precision binary64 -1.0)
l = abs(l);
double code(double x, double l, double t) {
return -1.0;
}
NOTE: l should be positive before calling this function
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = -1.0d0
end function
l = Math.abs(l);
public static double code(double x, double l, double t) {
return -1.0;
}
l = abs(l) def code(x, l, t): return -1.0
l = abs(l) function code(x, l, t) return -1.0 end
l = abs(l) function tmp = code(x, l, t) tmp = -1.0; end
NOTE: l should be positive before calling this function code[x_, l_, t_] := -1.0
\begin{array}{l}
l = |l|\\
\\
-1
\end{array}
Initial program 40.7%
associate-*l/40.8%
Simplified40.8%
Taylor expanded in t around -inf 35.0%
mul-1-neg35.0%
*-commutative35.0%
distribute-rgt-neg-in35.0%
+-commutative35.0%
sub-neg35.0%
metadata-eval35.0%
+-commutative35.0%
distribute-rgt-neg-in35.0%
Simplified35.0%
Taylor expanded in x around inf 34.2%
Taylor expanded in t around 0 34.4%
Final simplification34.4%
herbie shell --seed 2023283
(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)))))