
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ l (/ x l)))
(t_2
(/
t
(sqrt
(*
0.5
(+
t_1
(+
t_1
(- (* 2.0 (fma t t (* t (/ t x)))) (/ (* t -2.0) (/ x t)))))))))
(t_3 (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e+74)
(/ 1.0 (- t_3))
(if (<= t -3.1e-143)
t_2
(if (<= t -8.5e-246)
(+ -1.0 (/ 1.0 x))
(if (<= t 3.8e+50) t_2 (/ (sqrt 2.0) (* t_3 (sqrt 2.0)))))))))
double code(double x, double l, double t) {
double t_1 = l / (x / l);
double t_2 = t / sqrt((0.5 * (t_1 + (t_1 + ((2.0 * fma(t, t, (t * (t / x)))) - ((t * -2.0) / (x / t)))))));
double t_3 = sqrt(((1.0 + x) / (x + -1.0)));
double tmp;
if (t <= -3.5e+74) {
tmp = 1.0 / -t_3;
} else if (t <= -3.1e-143) {
tmp = t_2;
} else if (t <= -8.5e-246) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 3.8e+50) {
tmp = t_2;
} else {
tmp = sqrt(2.0) / (t_3 * sqrt(2.0));
}
return tmp;
}
function code(x, l, t) t_1 = Float64(l / Float64(x / l)) t_2 = Float64(t / sqrt(Float64(0.5 * Float64(t_1 + Float64(t_1 + Float64(Float64(2.0 * fma(t, t, Float64(t * Float64(t / x)))) - Float64(Float64(t * -2.0) / Float64(x / t)))))))) t_3 = sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))) tmp = 0.0 if (t <= -3.5e+74) tmp = Float64(1.0 / Float64(-t_3)); elseif (t <= -3.1e-143) tmp = t_2; elseif (t <= -8.5e-246) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 3.8e+50) tmp = t_2; else tmp = Float64(sqrt(2.0) / Float64(t_3 * sqrt(2.0))); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(0.5 * N[(t$95$1 + N[(t$95$1 + N[(N[(2.0 * N[(t * t + N[(t * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t * -2.0), $MachinePrecision] / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -3.5e+74], N[(1.0 / (-t$95$3)), $MachinePrecision], If[LessEqual[t, -3.1e-143], t$95$2, If[LessEqual[t, -8.5e-246], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+50], t$95$2, N[(N[Sqrt[2.0], $MachinePrecision] / N[(t$95$3 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{x}{\ell}}\\
t_2 := \frac{t}{\sqrt{0.5 \cdot \left(t_1 + \left(t_1 + \left(2 \cdot \mathsf{fma}\left(t, t, t \cdot \frac{t}{x}\right) - \frac{t \cdot -2}{\frac{x}{t}}\right)\right)\right)}}\\
t_3 := \sqrt{\frac{1 + x}{x + -1}}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+74}:\\
\;\;\;\;\frac{1}{-t_3}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-246}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{t_3 \cdot \sqrt{2}}\\
\end{array}
\end{array}
if t < -3.50000000000000014e74Initial program 24.7%
associate-/l*24.7%
fma-neg24.7%
remove-double-neg24.7%
fma-neg24.7%
sub-neg24.7%
metadata-eval24.7%
remove-double-neg24.7%
fma-def24.7%
Simplified24.7%
Taylor expanded in t around -inf 95.1%
mul-1-neg95.1%
distribute-rgt-neg-in95.1%
+-commutative95.1%
sub-neg95.1%
metadata-eval95.1%
+-commutative95.1%
Simplified95.1%
div-inv95.1%
+-commutative95.1%
Applied egg-rr95.1%
associate-*r/95.1%
*-rgt-identity95.1%
associate-/r*95.1%
*-inverses95.1%
Simplified95.1%
if -3.50000000000000014e74 < t < -3.10000000000000007e-143 or -8.4999999999999998e-246 < t < 3.79999999999999987e50Initial program 43.7%
associate-*l/43.7%
Simplified43.7%
Applied egg-rr38.8%
expm1-def38.9%
expm1-log1p40.5%
metadata-eval40.5%
sub-neg40.5%
associate-/l*29.1%
sub-neg29.1%
metadata-eval29.1%
+-commutative29.1%
Simplified29.1%
Taylor expanded in x around inf 73.1%
distribute-lft-in73.1%
associate--l+73.1%
unpow273.1%
+-commutative73.1%
unpow273.1%
unpow273.1%
associate-*r/73.1%
Simplified73.1%
Taylor expanded in t around 0 73.1%
+-commutative73.1%
mul-1-neg73.1%
unsub-neg73.1%
*-commutative73.1%
unpow273.1%
unpow273.1%
Simplified73.1%
expm1-log1p-u71.9%
expm1-udef34.4%
Applied egg-rr42.6%
expm1-def80.1%
expm1-log1p82.1%
*-commutative82.1%
+-commutative82.1%
associate-/r/82.1%
associate-*l/82.1%
Simplified82.1%
if -3.10000000000000007e-143 < t < -8.4999999999999998e-246Initial program 7.6%
associate-/l*7.5%
fma-neg7.5%
remove-double-neg7.5%
fma-neg7.5%
sub-neg7.5%
metadata-eval7.5%
remove-double-neg7.5%
fma-def7.5%
Simplified7.5%
Taylor expanded in t around -inf 69.7%
mul-1-neg69.7%
distribute-rgt-neg-in69.7%
+-commutative69.7%
sub-neg69.7%
metadata-eval69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in x around inf 69.9%
if 3.79999999999999987e50 < t Initial program 28.3%
associate-/l*28.2%
fma-neg28.2%
remove-double-neg28.2%
fma-neg28.2%
sub-neg28.2%
metadata-eval28.2%
remove-double-neg28.2%
fma-def28.2%
Simplified28.2%
Taylor expanded in l around 0 94.6%
+-commutative94.6%
sub-neg94.6%
metadata-eval94.6%
+-commutative94.6%
Simplified94.6%
Final simplification87.8%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ l (/ x l)))
(t_2
(/
t
(sqrt
(*
0.5
(+
t_1
(+
t_1
(- (* 2.0 (fma t t (* t (/ t x)))) (/ (* t -2.0) (/ x t))))))))))
(if (<= t -3e+74)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.1e-143)
t_2
(if (<= t -8e-246)
(+ -1.0 (/ 1.0 x))
(if (<= t 4e+145)
t_2
(* t (/ (sqrt (/ (+ x -1.0) (+ 1.0 x))) t))))))))
double code(double x, double l, double t) {
double t_1 = l / (x / l);
double t_2 = t / sqrt((0.5 * (t_1 + (t_1 + ((2.0 * fma(t, t, (t * (t / x)))) - ((t * -2.0) / (x / t)))))));
double tmp;
if (t <= -3e+74) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.1e-143) {
tmp = t_2;
} else if (t <= -8e-246) {
tmp = -1.0 + (1.0 / x);
} else if (t <= 4e+145) {
tmp = t_2;
} else {
tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / t);
}
return tmp;
}
function code(x, l, t) t_1 = Float64(l / Float64(x / l)) t_2 = Float64(t / sqrt(Float64(0.5 * Float64(t_1 + Float64(t_1 + Float64(Float64(2.0 * fma(t, t, Float64(t * Float64(t / x)))) - Float64(Float64(t * -2.0) / Float64(x / t)))))))) tmp = 0.0 if (t <= -3e+74) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.1e-143) tmp = t_2; elseif (t <= -8e-246) tmp = Float64(-1.0 + Float64(1.0 / x)); elseif (t <= 4e+145) tmp = t_2; else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) / t)); end return tmp end
code[x_, l_, t_] := Block[{t$95$1 = N[(l / N[(x / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[Sqrt[N[(0.5 * N[(t$95$1 + N[(t$95$1 + N[(N[(2.0 * N[(t * t + N[(t * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t * -2.0), $MachinePrecision] / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+74], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.1e-143], t$95$2, If[LessEqual[t, -8e-246], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+145], t$95$2, N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{x}{\ell}}\\
t_2 := \frac{t}{\sqrt{0.5 \cdot \left(t_1 + \left(t_1 + \left(2 \cdot \mathsf{fma}\left(t, t, t \cdot \frac{t}{x}\right) - \frac{t \cdot -2}{\frac{x}{t}}\right)\right)\right)}}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+74}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-246}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+145}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{1 + x}}}{t}\\
\end{array}
\end{array}
if t < -3e74Initial program 24.7%
associate-/l*24.7%
fma-neg24.7%
remove-double-neg24.7%
fma-neg24.7%
sub-neg24.7%
metadata-eval24.7%
remove-double-neg24.7%
fma-def24.7%
Simplified24.7%
Taylor expanded in t around -inf 95.1%
mul-1-neg95.1%
distribute-rgt-neg-in95.1%
+-commutative95.1%
sub-neg95.1%
metadata-eval95.1%
+-commutative95.1%
Simplified95.1%
div-inv95.1%
+-commutative95.1%
Applied egg-rr95.1%
associate-*r/95.1%
*-rgt-identity95.1%
associate-/r*95.1%
*-inverses95.1%
Simplified95.1%
if -3e74 < t < -3.10000000000000007e-143 or -7.99999999999999965e-246 < t < 4e145Initial program 49.5%
associate-*l/49.6%
Simplified49.6%
Applied egg-rr34.1%
expm1-def34.2%
expm1-log1p35.5%
metadata-eval35.5%
sub-neg35.5%
associate-/l*37.4%
sub-neg37.4%
metadata-eval37.4%
+-commutative37.4%
Simplified37.4%
Taylor expanded in x around inf 76.2%
distribute-lft-in76.2%
associate--l+76.2%
unpow276.2%
+-commutative76.2%
unpow276.2%
unpow276.2%
associate-*r/76.2%
Simplified76.2%
Taylor expanded in t around 0 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
*-commutative76.2%
unpow276.2%
unpow276.2%
Simplified76.2%
expm1-log1p-u73.8%
expm1-udef42.8%
Applied egg-rr50.3%
expm1-def81.3%
expm1-log1p84.4%
*-commutative84.4%
+-commutative84.4%
associate-/r/84.4%
associate-*l/84.4%
Simplified84.4%
if -3.10000000000000007e-143 < t < -7.99999999999999965e-246Initial program 7.6%
associate-/l*7.5%
fma-neg7.5%
remove-double-neg7.5%
fma-neg7.5%
sub-neg7.5%
metadata-eval7.5%
remove-double-neg7.5%
fma-def7.5%
Simplified7.5%
Taylor expanded in t around -inf 69.7%
mul-1-neg69.7%
distribute-rgt-neg-in69.7%
+-commutative69.7%
sub-neg69.7%
metadata-eval69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in x around inf 69.9%
if 4e145 < t Initial program 4.2%
associate-*l/4.2%
Simplified4.2%
Taylor expanded in t around inf 3.1%
associate-/l*5.4%
+-commutative5.4%
sub-neg5.4%
metadata-eval5.4%
+-commutative5.4%
unpow25.4%
Simplified5.4%
Taylor expanded in t around 0 94.0%
associate-*r/94.0%
*-rgt-identity94.0%
sub-neg94.0%
metadata-eval94.0%
+-commutative94.0%
Simplified94.0%
Final simplification87.7%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* t t) x)))
(if (<= t -2.6e-197)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e-297)
(* (/ t l) (sqrt x))
(if (<= t -4e-301)
(* t (/ (sqrt 2.0) (* (sqrt (+ (/ 2.0 x) (+ 2.0 (/ 2.0 x)))) (- t))))
(if (<= t 1.45e+61)
(/
t
(sqrt
(/
(+
(/ (* l l) x)
(+ (* 2.0 (+ (* t t) t_1)) (- (* l (/ l x)) (* -2.0 t_1))))
2.0)))
(* t (/ (sqrt (/ (+ x -1.0) (+ 1.0 x))) t))))))))
double code(double x, double l, double t) {
double t_1 = (t * t) / x;
double tmp;
if (t <= -2.6e-197) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * sqrt(x);
} else if (t <= -4e-301) {
tmp = t * (sqrt(2.0) / (sqrt(((2.0 / x) + (2.0 + (2.0 / x)))) * -t));
} else if (t <= 1.45e+61) {
tmp = t / sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0));
} else {
tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / 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) :: tmp
t_1 = (t * t) / x
if (t <= (-2.6d-197)) then
tmp = 1.0d0 / -sqrt(((1.0d0 + x) / (x + (-1.0d0))))
else if (t <= (-3.5d-297)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-4d-301)) then
tmp = t * (sqrt(2.0d0) / (sqrt(((2.0d0 / x) + (2.0d0 + (2.0d0 / x)))) * -t))
else if (t <= 1.45d+61) then
tmp = t / sqrt(((((l * l) / x) + ((2.0d0 * ((t * t) + t_1)) + ((l * (l / x)) - ((-2.0d0) * t_1)))) / 2.0d0))
else
tmp = t * (sqrt(((x + (-1.0d0)) / (1.0d0 + x))) / t)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t * t) / x;
double tmp;
if (t <= -2.6e-197) {
tmp = 1.0 / -Math.sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -4e-301) {
tmp = t * (Math.sqrt(2.0) / (Math.sqrt(((2.0 / x) + (2.0 + (2.0 / x)))) * -t));
} else if (t <= 1.45e+61) {
tmp = t / Math.sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0));
} else {
tmp = t * (Math.sqrt(((x + -1.0) / (1.0 + x))) / t);
}
return tmp;
}
def code(x, l, t): t_1 = (t * t) / x tmp = 0 if t <= -2.6e-197: tmp = 1.0 / -math.sqrt(((1.0 + x) / (x + -1.0))) elif t <= -3.5e-297: tmp = (t / l) * math.sqrt(x) elif t <= -4e-301: tmp = t * (math.sqrt(2.0) / (math.sqrt(((2.0 / x) + (2.0 + (2.0 / x)))) * -t)) elif t <= 1.45e+61: tmp = t / math.sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0)) else: tmp = t * (math.sqrt(((x + -1.0) / (1.0 + x))) / t) return tmp
function code(x, l, t) t_1 = Float64(Float64(t * t) / x) tmp = 0.0 if (t <= -2.6e-197) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.5e-297) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -4e-301) tmp = Float64(t * Float64(sqrt(2.0) / Float64(sqrt(Float64(Float64(2.0 / x) + Float64(2.0 + Float64(2.0 / x)))) * Float64(-t)))); elseif (t <= 1.45e+61) tmp = Float64(t / sqrt(Float64(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + t_1)) + Float64(Float64(l * Float64(l / x)) - Float64(-2.0 * t_1)))) / 2.0))); else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) / t)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t * t) / x; tmp = 0.0; if (t <= -2.6e-197) tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0))); elseif (t <= -3.5e-297) tmp = (t / l) * sqrt(x); elseif (t <= -4e-301) tmp = t * (sqrt(2.0) / (sqrt(((2.0 / x) + (2.0 + (2.0 / x)))) * -t)); elseif (t <= 1.45e+61) tmp = t / sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0)); else tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / t); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -2.6e-197], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.5e-297], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e-301], N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+61], N[(t / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-301}:\\
\;\;\;\;t \cdot \frac{\sqrt{2}}{\sqrt{\frac{2}{x} + \left(2 + \frac{2}{x}\right)} \cdot \left(-t\right)}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+61}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + t_1\right) + \left(\ell \cdot \frac{\ell}{x} - -2 \cdot t_1\right)\right)}{2}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{1 + x}}}{t}\\
\end{array}
\end{array}
if t < -2.6000000000000001e-197Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
div-inv82.9%
+-commutative82.9%
Applied egg-rr82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-/r*82.9%
*-inverses82.9%
Simplified82.9%
if -2.6000000000000001e-197 < t < -3.4999999999999999e-297Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Applied egg-rr0.0%
expm1-def0.0%
expm1-log1p1.9%
metadata-eval1.9%
sub-neg1.9%
associate-/l*1.2%
sub-neg1.2%
metadata-eval1.2%
+-commutative1.2%
Simplified1.2%
Taylor expanded in x around inf 48.8%
distribute-lft-in48.8%
associate--l+48.8%
unpow248.8%
+-commutative48.8%
unpow248.8%
unpow248.8%
associate-*r/48.8%
Simplified48.8%
Taylor expanded in t around 0 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
*-commutative48.8%
unpow248.8%
unpow248.8%
Simplified48.8%
Taylor expanded in t around 0 35.4%
if -3.4999999999999999e-297 < t < -4.00000000000000027e-301Initial program 3.1%
associate-*l/3.1%
Simplified3.1%
Taylor expanded in x around inf 3.1%
associate--l+3.1%
unpow23.1%
distribute-lft-out3.1%
unpow23.1%
unpow23.1%
associate-*r/3.1%
mul-1-neg3.1%
unpow23.1%
+-commutative3.1%
unpow23.1%
fma-udef3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
*-commutative85.7%
distribute-rgt-neg-in85.7%
distribute-lft-in85.7%
metadata-eval85.7%
associate-*r/85.7%
metadata-eval85.7%
associate-*r/85.7%
metadata-eval85.7%
Simplified85.7%
if -4.00000000000000027e-301 < t < 1.45e61Initial program 40.7%
associate-*l/40.6%
Simplified40.6%
Applied egg-rr41.2%
expm1-def41.2%
expm1-log1p41.2%
metadata-eval41.2%
sub-neg41.2%
associate-/l*19.6%
sub-neg19.6%
metadata-eval19.6%
+-commutative19.6%
Simplified19.6%
Taylor expanded in x around inf 80.6%
distribute-lft-in80.6%
associate--l+80.6%
unpow280.6%
+-commutative80.6%
unpow280.6%
unpow280.6%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in t around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
*-commutative80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
*-un-lft-identity80.6%
associate-/l*80.6%
Applied egg-rr80.6%
*-lft-identity80.6%
associate-/r/80.6%
Simplified80.6%
if 1.45e61 < t Initial program 27.5%
associate-*l/27.6%
Simplified27.6%
Taylor expanded in t around inf 6.1%
associate-/l*33.0%
+-commutative33.0%
sub-neg33.0%
metadata-eval33.0%
+-commutative33.0%
unpow233.0%
Simplified33.0%
Taylor expanded in t around 0 94.3%
associate-*r/94.4%
*-rgt-identity94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
Final simplification82.6%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* t t) x)))
(if (<= t -5e-198)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e-297)
(* (/ t l) (sqrt x))
(if (<= t -5.2e-299)
-1.0
(if (<= t 4e+60)
(/
t
(sqrt
(/
(+
(/ (* l l) x)
(+ (* 2.0 (+ (* t t) t_1)) (- (* l (/ l x)) (* -2.0 t_1))))
2.0)))
(* t (/ (sqrt (/ (+ x -1.0) (+ 1.0 x))) t))))))))
double code(double x, double l, double t) {
double t_1 = (t * t) / x;
double tmp;
if (t <= -5e-198) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * sqrt(x);
} else if (t <= -5.2e-299) {
tmp = -1.0;
} else if (t <= 4e+60) {
tmp = t / sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0));
} else {
tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / 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) :: tmp
t_1 = (t * t) / x
if (t <= (-5d-198)) then
tmp = 1.0d0 / -sqrt(((1.0d0 + x) / (x + (-1.0d0))))
else if (t <= (-3.5d-297)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-5.2d-299)) then
tmp = -1.0d0
else if (t <= 4d+60) then
tmp = t / sqrt(((((l * l) / x) + ((2.0d0 * ((t * t) + t_1)) + ((l * (l / x)) - ((-2.0d0) * t_1)))) / 2.0d0))
else
tmp = t * (sqrt(((x + (-1.0d0)) / (1.0d0 + x))) / t)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t * t) / x;
double tmp;
if (t <= -5e-198) {
tmp = 1.0 / -Math.sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -5.2e-299) {
tmp = -1.0;
} else if (t <= 4e+60) {
tmp = t / Math.sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0));
} else {
tmp = t * (Math.sqrt(((x + -1.0) / (1.0 + x))) / t);
}
return tmp;
}
def code(x, l, t): t_1 = (t * t) / x tmp = 0 if t <= -5e-198: tmp = 1.0 / -math.sqrt(((1.0 + x) / (x + -1.0))) elif t <= -3.5e-297: tmp = (t / l) * math.sqrt(x) elif t <= -5.2e-299: tmp = -1.0 elif t <= 4e+60: tmp = t / math.sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0)) else: tmp = t * (math.sqrt(((x + -1.0) / (1.0 + x))) / t) return tmp
function code(x, l, t) t_1 = Float64(Float64(t * t) / x) tmp = 0.0 if (t <= -5e-198) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.5e-297) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -5.2e-299) tmp = -1.0; elseif (t <= 4e+60) tmp = Float64(t / sqrt(Float64(Float64(Float64(Float64(l * l) / x) + Float64(Float64(2.0 * Float64(Float64(t * t) + t_1)) + Float64(Float64(l * Float64(l / x)) - Float64(-2.0 * t_1)))) / 2.0))); else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) / t)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t * t) / x; tmp = 0.0; if (t <= -5e-198) tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0))); elseif (t <= -3.5e-297) tmp = (t / l) * sqrt(x); elseif (t <= -5.2e-299) tmp = -1.0; elseif (t <= 4e+60) tmp = t / sqrt(((((l * l) / x) + ((2.0 * ((t * t) + t_1)) + ((l * (l / x)) - (-2.0 * t_1)))) / 2.0)); else tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / t); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -5e-198], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.5e-297], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-299], -1.0, If[LessEqual[t, 4e+60], N[(t / N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision] + N[(N[(2.0 * N[(N[(t * t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(l * N[(l / x), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot t}{x}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-198}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-299}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{\frac{\ell \cdot \ell}{x} + \left(2 \cdot \left(t \cdot t + t_1\right) + \left(\ell \cdot \frac{\ell}{x} - -2 \cdot t_1\right)\right)}{2}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{1 + x}}}{t}\\
\end{array}
\end{array}
if t < -4.9999999999999999e-198Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
div-inv82.9%
+-commutative82.9%
Applied egg-rr82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-/r*82.9%
*-inverses82.9%
Simplified82.9%
if -4.9999999999999999e-198 < t < -3.4999999999999999e-297Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Applied egg-rr0.0%
expm1-def0.0%
expm1-log1p1.9%
metadata-eval1.9%
sub-neg1.9%
associate-/l*1.2%
sub-neg1.2%
metadata-eval1.2%
+-commutative1.2%
Simplified1.2%
Taylor expanded in x around inf 48.8%
distribute-lft-in48.8%
associate--l+48.8%
unpow248.8%
+-commutative48.8%
unpow248.8%
unpow248.8%
associate-*r/48.8%
Simplified48.8%
Taylor expanded in t around 0 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
*-commutative48.8%
unpow248.8%
unpow248.8%
Simplified48.8%
Taylor expanded in t around 0 35.4%
if -3.4999999999999999e-297 < t < -5.1999999999999998e-299Initial program 3.1%
associate-/l*3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
fma-def3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
distribute-rgt-neg-in85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
if -5.1999999999999998e-299 < t < 3.9999999999999998e60Initial program 40.7%
associate-*l/40.6%
Simplified40.6%
Applied egg-rr41.2%
expm1-def41.2%
expm1-log1p41.2%
metadata-eval41.2%
sub-neg41.2%
associate-/l*19.6%
sub-neg19.6%
metadata-eval19.6%
+-commutative19.6%
Simplified19.6%
Taylor expanded in x around inf 80.6%
distribute-lft-in80.6%
associate--l+80.6%
unpow280.6%
+-commutative80.6%
unpow280.6%
unpow280.6%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in t around 0 80.6%
+-commutative80.6%
mul-1-neg80.6%
unsub-neg80.6%
*-commutative80.6%
unpow280.6%
unpow280.6%
Simplified80.6%
*-un-lft-identity80.6%
associate-/l*80.6%
Applied egg-rr80.6%
*-lft-identity80.6%
associate-/r/80.6%
Simplified80.6%
if 3.9999999999999998e60 < t Initial program 27.5%
associate-*l/27.6%
Simplified27.6%
Taylor expanded in t around inf 6.1%
associate-/l*33.0%
+-commutative33.0%
sub-neg33.0%
metadata-eval33.0%
+-commutative33.0%
unpow233.0%
Simplified33.0%
Taylor expanded in t around 0 94.3%
associate-*r/94.4%
*-rgt-identity94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
Final simplification82.6%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (/ (* l l) x)))
(if (<= t -3.5e-198)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e-297)
(* (/ t l) (sqrt x))
(if (<= t -3e-299)
-1.0
(if (<= t 9.5e+58)
(/
t
(sqrt (/ (+ t_1 (+ t_1 (* 2.0 (+ (* t t) (/ (* t t) x))))) 2.0)))
(* t (/ (sqrt (/ (+ x -1.0) (+ 1.0 x))) t))))))))
double code(double x, double l, double t) {
double t_1 = (l * l) / x;
double tmp;
if (t <= -3.5e-198) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * sqrt(x);
} else if (t <= -3e-299) {
tmp = -1.0;
} else if (t <= 9.5e+58) {
tmp = t / sqrt(((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))) / 2.0));
} else {
tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / 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) :: tmp
t_1 = (l * l) / x
if (t <= (-3.5d-198)) then
tmp = 1.0d0 / -sqrt(((1.0d0 + x) / (x + (-1.0d0))))
else if (t <= (-3.5d-297)) then
tmp = (t / l) * sqrt(x)
else if (t <= (-3d-299)) then
tmp = -1.0d0
else if (t <= 9.5d+58) then
tmp = t / sqrt(((t_1 + (t_1 + (2.0d0 * ((t * t) + ((t * t) / x))))) / 2.0d0))
else
tmp = t * (sqrt(((x + (-1.0d0)) / (1.0d0 + x))) / t)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (l * l) / x;
double tmp;
if (t <= -3.5e-198) {
tmp = 1.0 / -Math.sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = (t / l) * Math.sqrt(x);
} else if (t <= -3e-299) {
tmp = -1.0;
} else if (t <= 9.5e+58) {
tmp = t / Math.sqrt(((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))) / 2.0));
} else {
tmp = t * (Math.sqrt(((x + -1.0) / (1.0 + x))) / t);
}
return tmp;
}
def code(x, l, t): t_1 = (l * l) / x tmp = 0 if t <= -3.5e-198: tmp = 1.0 / -math.sqrt(((1.0 + x) / (x + -1.0))) elif t <= -3.5e-297: tmp = (t / l) * math.sqrt(x) elif t <= -3e-299: tmp = -1.0 elif t <= 9.5e+58: tmp = t / math.sqrt(((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))) / 2.0)) else: tmp = t * (math.sqrt(((x + -1.0) / (1.0 + x))) / t) return tmp
function code(x, l, t) t_1 = Float64(Float64(l * l) / x) tmp = 0.0 if (t <= -3.5e-198) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.5e-297) tmp = Float64(Float64(t / l) * sqrt(x)); elseif (t <= -3e-299) tmp = -1.0; elseif (t <= 9.5e+58) tmp = Float64(t / sqrt(Float64(Float64(t_1 + Float64(t_1 + Float64(2.0 * Float64(Float64(t * t) + Float64(Float64(t * t) / x))))) / 2.0))); else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) / t)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (l * l) / x; tmp = 0.0; if (t <= -3.5e-198) tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0))); elseif (t <= -3.5e-297) tmp = (t / l) * sqrt(x); elseif (t <= -3e-299) tmp = -1.0; elseif (t <= 9.5e+58) tmp = t / sqrt(((t_1 + (t_1 + (2.0 * ((t * t) + ((t * t) / x))))) / 2.0)); else tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / t); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t, -3.5e-198], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.5e-297], N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3e-299], -1.0, If[LessEqual[t, 9.5e+58], N[(t / N[Sqrt[N[(N[(t$95$1 + N[(t$95$1 + N[(2.0 * N[(N[(t * t), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{x}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-198}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;\frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-299}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+58}:\\
\;\;\;\;\frac{t}{\sqrt{\frac{t_1 + \left(t_1 + 2 \cdot \left(t \cdot t + \frac{t \cdot t}{x}\right)\right)}{2}}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{1 + x}}}{t}\\
\end{array}
\end{array}
if t < -3.50000000000000025e-198Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
div-inv82.9%
+-commutative82.9%
Applied egg-rr82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-/r*82.9%
*-inverses82.9%
Simplified82.9%
if -3.50000000000000025e-198 < t < -3.4999999999999999e-297Initial program 1.9%
associate-*l/1.9%
Simplified1.9%
Applied egg-rr0.0%
expm1-def0.0%
expm1-log1p1.9%
metadata-eval1.9%
sub-neg1.9%
associate-/l*1.2%
sub-neg1.2%
metadata-eval1.2%
+-commutative1.2%
Simplified1.2%
Taylor expanded in x around inf 48.8%
distribute-lft-in48.8%
associate--l+48.8%
unpow248.8%
+-commutative48.8%
unpow248.8%
unpow248.8%
associate-*r/48.8%
Simplified48.8%
Taylor expanded in t around 0 48.8%
+-commutative48.8%
mul-1-neg48.8%
unsub-neg48.8%
*-commutative48.8%
unpow248.8%
unpow248.8%
Simplified48.8%
Taylor expanded in t around 0 35.4%
if -3.4999999999999999e-297 < t < -2.99999999999999984e-299Initial program 3.1%
associate-/l*3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
fma-def3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
distribute-rgt-neg-in85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
if -2.99999999999999984e-299 < t < 9.5000000000000002e58Initial program 40.7%
associate-*l/40.6%
Simplified40.6%
Applied egg-rr41.2%
expm1-def41.2%
expm1-log1p41.2%
metadata-eval41.2%
sub-neg41.2%
associate-/l*19.6%
sub-neg19.6%
metadata-eval19.6%
+-commutative19.6%
Simplified19.6%
Taylor expanded in x around inf 80.6%
distribute-lft-in80.6%
associate--l+80.6%
unpow280.6%
+-commutative80.6%
unpow280.6%
unpow280.6%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in t around 0 79.9%
associate-*r/79.9%
neg-mul-179.9%
unpow279.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
if 9.5000000000000002e58 < t Initial program 27.5%
associate-*l/27.6%
Simplified27.6%
Taylor expanded in t around inf 6.1%
associate-/l*33.0%
+-commutative33.0%
sub-neg33.0%
metadata-eval33.0%
+-commutative33.0%
unpow233.0%
Simplified33.0%
Taylor expanded in t around 0 94.3%
associate-*r/94.4%
*-rgt-identity94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
Simplified94.4%
Final simplification82.4%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))))
(if (<= t -8.2e-199)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e-297)
t_1
(if (<= t 5e-309)
-1.0
(if (<= t 1.4e-279)
(* t (- (/ 1.0 t) (/ (/ 1.0 t) x)))
(if (<= t 7.8e-152)
t_1
(* t (/ (sqrt (/ (+ x -1.0) (+ 1.0 x))) t)))))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double tmp;
if (t <= -8.2e-199) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.4e-279) {
tmp = t * ((1.0 / t) - ((1.0 / t) / x));
} else if (t <= 7.8e-152) {
tmp = t_1;
} else {
tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / 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) :: tmp
t_1 = (t / l) * sqrt(x)
if (t <= (-8.2d-199)) then
tmp = 1.0d0 / -sqrt(((1.0d0 + x) / (x + (-1.0d0))))
else if (t <= (-3.5d-297)) then
tmp = t_1
else if (t <= 5d-309) then
tmp = -1.0d0
else if (t <= 1.4d-279) then
tmp = t * ((1.0d0 / t) - ((1.0d0 / t) / x))
else if (t <= 7.8d-152) then
tmp = t_1
else
tmp = t * (sqrt(((x + (-1.0d0)) / (1.0d0 + x))) / t)
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double tmp;
if (t <= -8.2e-199) {
tmp = 1.0 / -Math.sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.4e-279) {
tmp = t * ((1.0 / t) - ((1.0 / t) / x));
} else if (t <= 7.8e-152) {
tmp = t_1;
} else {
tmp = t * (Math.sqrt(((x + -1.0) / (1.0 + x))) / t);
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) tmp = 0 if t <= -8.2e-199: tmp = 1.0 / -math.sqrt(((1.0 + x) / (x + -1.0))) elif t <= -3.5e-297: tmp = t_1 elif t <= 5e-309: tmp = -1.0 elif t <= 1.4e-279: tmp = t * ((1.0 / t) - ((1.0 / t) / x)) elif t <= 7.8e-152: tmp = t_1 else: tmp = t * (math.sqrt(((x + -1.0) / (1.0 + x))) / t) return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) tmp = 0.0 if (t <= -8.2e-199) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.4e-279) tmp = Float64(t * Float64(Float64(1.0 / t) - Float64(Float64(1.0 / t) / x))); elseif (t <= 7.8e-152) tmp = t_1; else tmp = Float64(t * Float64(sqrt(Float64(Float64(x + -1.0) / Float64(1.0 + x))) / t)); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); tmp = 0.0; if (t <= -8.2e-199) tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.4e-279) tmp = t * ((1.0 / t) - ((1.0 / t) / x)); elseif (t <= 7.8e-152) tmp = t_1; else tmp = t * (sqrt(((x + -1.0) / (1.0 + x))) / t); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-199], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.5e-297], t$95$1, If[LessEqual[t, 5e-309], -1.0, If[LessEqual[t, 1.4e-279], N[(t * N[(N[(1.0 / t), $MachinePrecision] - N[(N[(1.0 / t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-152], t$95$1, N[(t * N[(N[Sqrt[N[(N[(x + -1.0), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-199}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-279}:\\
\;\;\;\;t \cdot \left(\frac{1}{t} - \frac{\frac{1}{t}}{x}\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-152}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\sqrt{\frac{x + -1}{1 + x}}}{t}\\
\end{array}
\end{array}
if t < -8.20000000000000043e-199Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
div-inv82.9%
+-commutative82.9%
Applied egg-rr82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-/r*82.9%
*-inverses82.9%
Simplified82.9%
if -8.20000000000000043e-199 < t < -3.4999999999999999e-297 or 1.4e-279 < t < 7.8000000000000008e-152Initial program 5.3%
associate-*l/5.3%
Simplified5.3%
Applied egg-rr4.6%
expm1-def4.6%
expm1-log1p5.8%
metadata-eval5.8%
sub-neg5.8%
associate-/l*1.3%
sub-neg1.3%
metadata-eval1.3%
+-commutative1.3%
Simplified1.3%
Taylor expanded in x around inf 63.4%
distribute-lft-in63.4%
associate--l+63.4%
unpow263.4%
+-commutative63.4%
unpow263.4%
unpow263.4%
associate-*r/63.4%
Simplified63.4%
Taylor expanded in t around 0 63.4%
+-commutative63.4%
mul-1-neg63.4%
unsub-neg63.4%
*-commutative63.4%
unpow263.4%
unpow263.4%
Simplified63.4%
Taylor expanded in t around 0 31.9%
if -3.4999999999999999e-297 < t < 4.9999999999999995e-309Initial program 3.1%
associate-/l*3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
fma-def3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
distribute-rgt-neg-in85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
if 4.9999999999999995e-309 < t < 1.4e-279Initial program 2.5%
associate-*l/2.5%
Simplified2.5%
Taylor expanded in t around inf 2.8%
associate-/l*2.8%
+-commutative2.8%
sub-neg2.8%
metadata-eval2.8%
+-commutative2.8%
unpow22.8%
Simplified2.8%
Taylor expanded in x around inf 80.6%
associate-/r*80.6%
Simplified80.6%
if 7.8000000000000008e-152 < t Initial program 37.0%
associate-*l/36.9%
Simplified36.9%
Taylor expanded in t around inf 30.4%
associate-/l*34.0%
+-commutative34.0%
sub-neg34.0%
metadata-eval34.0%
+-commutative34.0%
unpow234.0%
Simplified34.0%
Taylor expanded in t around 0 84.7%
associate-*r/84.7%
*-rgt-identity84.7%
sub-neg84.7%
metadata-eval84.7%
+-commutative84.7%
Simplified84.7%
Final simplification78.8%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (- (/ 1.0 t) (/ (/ 1.0 t) x))))
(if (<= t -7.5e-197)
(+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x))))
(if (<= t -3.5e-297)
t_1
(if (<= t 5e-309)
-1.0
(if (<= t 1.9e-279)
(* t t_2)
(if (<= t 1.05e-151) t_1 (* t (+ t_2 (/ 0.5 (* t (* x x))))))))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double t_2 = (1.0 / t) - ((1.0 / t) / x);
double tmp;
if (t <= -7.5e-197) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.9e-279) {
tmp = t * t_2;
} else if (t <= 1.05e-151) {
tmp = t_1;
} else {
tmp = t * (t_2 + (0.5 / (t * (x * x))));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t / l) * sqrt(x)
t_2 = (1.0d0 / t) - ((1.0d0 / t) / x)
if (t <= (-7.5d-197)) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else if (t <= (-3.5d-297)) then
tmp = t_1
else if (t <= 5d-309) then
tmp = -1.0d0
else if (t <= 1.9d-279) then
tmp = t * t_2
else if (t <= 1.05d-151) then
tmp = t_1
else
tmp = t * (t_2 + (0.5d0 / (t * (x * x))))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double t_2 = (1.0 / t) - ((1.0 / t) / x);
double tmp;
if (t <= -7.5e-197) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.9e-279) {
tmp = t * t_2;
} else if (t <= 1.05e-151) {
tmp = t_1;
} else {
tmp = t * (t_2 + (0.5 / (t * (x * x))));
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) t_2 = (1.0 / t) - ((1.0 / t) / x) tmp = 0 if t <= -7.5e-197: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) elif t <= -3.5e-297: tmp = t_1 elif t <= 5e-309: tmp = -1.0 elif t <= 1.9e-279: tmp = t * t_2 elif t <= 1.05e-151: tmp = t_1 else: tmp = t * (t_2 + (0.5 / (t * (x * x)))) return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) t_2 = Float64(Float64(1.0 / t) - Float64(Float64(1.0 / t) / x)) tmp = 0.0 if (t <= -7.5e-197) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.9e-279) tmp = Float64(t * t_2); elseif (t <= 1.05e-151) tmp = t_1; else tmp = Float64(t * Float64(t_2 + Float64(0.5 / Float64(t * Float64(x * x))))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); t_2 = (1.0 / t) - ((1.0 / t) / x); tmp = 0.0; if (t <= -7.5e-197) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.9e-279) tmp = t * t_2; elseif (t <= 1.05e-151) tmp = t_1; else tmp = t * (t_2 + (0.5 / (t * (x * x)))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / t), $MachinePrecision] - N[(N[(1.0 / t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e-197], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-297], t$95$1, If[LessEqual[t, 5e-309], -1.0, If[LessEqual[t, 1.9e-279], N[(t * t$95$2), $MachinePrecision], If[LessEqual[t, 1.05e-151], t$95$1, N[(t * N[(t$95$2 + N[(0.5 / N[(t * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \frac{1}{t} - \frac{\frac{1}{t}}{x}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-197}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-279}:\\
\;\;\;\;t \cdot t_2\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t_2 + \frac{0.5}{t \cdot \left(x \cdot x\right)}\right)\\
\end{array}
\end{array}
if t < -7.5e-197Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in x around inf 82.8%
associate-*r/82.8%
metadata-eval82.8%
unpow282.8%
Simplified82.8%
if -7.5e-197 < t < -3.4999999999999999e-297 or 1.90000000000000016e-279 < t < 1.04999999999999995e-151Initial program 5.3%
associate-*l/5.3%
Simplified5.3%
Applied egg-rr4.6%
expm1-def4.6%
expm1-log1p5.8%
metadata-eval5.8%
sub-neg5.8%
associate-/l*1.3%
sub-neg1.3%
metadata-eval1.3%
+-commutative1.3%
Simplified1.3%
Taylor expanded in x around inf 63.4%
distribute-lft-in63.4%
associate--l+63.4%
unpow263.4%
+-commutative63.4%
unpow263.4%
unpow263.4%
associate-*r/63.4%
Simplified63.4%
Taylor expanded in t around 0 63.4%
+-commutative63.4%
mul-1-neg63.4%
unsub-neg63.4%
*-commutative63.4%
unpow263.4%
unpow263.4%
Simplified63.4%
Taylor expanded in t around 0 31.9%
if -3.4999999999999999e-297 < t < 4.9999999999999995e-309Initial program 3.1%
associate-/l*3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
fma-def3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
distribute-rgt-neg-in85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
if 4.9999999999999995e-309 < t < 1.90000000000000016e-279Initial program 2.5%
associate-*l/2.5%
Simplified2.5%
Taylor expanded in t around inf 2.8%
associate-/l*2.8%
+-commutative2.8%
sub-neg2.8%
metadata-eval2.8%
+-commutative2.8%
unpow22.8%
Simplified2.8%
Taylor expanded in x around inf 80.6%
associate-/r*80.6%
Simplified80.6%
if 1.04999999999999995e-151 < t Initial program 37.0%
associate-*l/36.9%
Simplified36.9%
Taylor expanded in t around inf 30.4%
associate-/l*34.0%
+-commutative34.0%
sub-neg34.0%
metadata-eval34.0%
+-commutative34.0%
unpow234.0%
Simplified34.0%
Taylor expanded in x around inf 84.5%
associate--l+84.5%
associate-*r/84.5%
metadata-eval84.5%
unpow284.5%
associate-/r*84.5%
Simplified84.5%
Final simplification78.7%
(FPCore (x l t)
:precision binary64
(let* ((t_1 (* (/ t l) (sqrt x))) (t_2 (- (/ 1.0 t) (/ (/ 1.0 t) x))))
(if (<= t -9.5e-199)
(/ 1.0 (- (sqrt (/ (+ 1.0 x) (+ x -1.0)))))
(if (<= t -3.5e-297)
t_1
(if (<= t 5e-309)
-1.0
(if (<= t 1.55e-279)
(* t t_2)
(if (<= t 1.36e-151) t_1 (* t (+ t_2 (/ 0.5 (* t (* x x))))))))))))
double code(double x, double l, double t) {
double t_1 = (t / l) * sqrt(x);
double t_2 = (1.0 / t) - ((1.0 / t) / x);
double tmp;
if (t <= -9.5e-199) {
tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.55e-279) {
tmp = t * t_2;
} else if (t <= 1.36e-151) {
tmp = t_1;
} else {
tmp = t * (t_2 + (0.5 / (t * (x * x))));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t / l) * sqrt(x)
t_2 = (1.0d0 / t) - ((1.0d0 / t) / x)
if (t <= (-9.5d-199)) then
tmp = 1.0d0 / -sqrt(((1.0d0 + x) / (x + (-1.0d0))))
else if (t <= (-3.5d-297)) then
tmp = t_1
else if (t <= 5d-309) then
tmp = -1.0d0
else if (t <= 1.55d-279) then
tmp = t * t_2
else if (t <= 1.36d-151) then
tmp = t_1
else
tmp = t * (t_2 + (0.5d0 / (t * (x * x))))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double t_1 = (t / l) * Math.sqrt(x);
double t_2 = (1.0 / t) - ((1.0 / t) / x);
double tmp;
if (t <= -9.5e-199) {
tmp = 1.0 / -Math.sqrt(((1.0 + x) / (x + -1.0)));
} else if (t <= -3.5e-297) {
tmp = t_1;
} else if (t <= 5e-309) {
tmp = -1.0;
} else if (t <= 1.55e-279) {
tmp = t * t_2;
} else if (t <= 1.36e-151) {
tmp = t_1;
} else {
tmp = t * (t_2 + (0.5 / (t * (x * x))));
}
return tmp;
}
def code(x, l, t): t_1 = (t / l) * math.sqrt(x) t_2 = (1.0 / t) - ((1.0 / t) / x) tmp = 0 if t <= -9.5e-199: tmp = 1.0 / -math.sqrt(((1.0 + x) / (x + -1.0))) elif t <= -3.5e-297: tmp = t_1 elif t <= 5e-309: tmp = -1.0 elif t <= 1.55e-279: tmp = t * t_2 elif t <= 1.36e-151: tmp = t_1 else: tmp = t * (t_2 + (0.5 / (t * (x * x)))) return tmp
function code(x, l, t) t_1 = Float64(Float64(t / l) * sqrt(x)) t_2 = Float64(Float64(1.0 / t) - Float64(Float64(1.0 / t) / x)) tmp = 0.0 if (t <= -9.5e-199) tmp = Float64(1.0 / Float64(-sqrt(Float64(Float64(1.0 + x) / Float64(x + -1.0))))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.55e-279) tmp = Float64(t * t_2); elseif (t <= 1.36e-151) tmp = t_1; else tmp = Float64(t * Float64(t_2 + Float64(0.5 / Float64(t * Float64(x * x))))); end return tmp end
function tmp_2 = code(x, l, t) t_1 = (t / l) * sqrt(x); t_2 = (1.0 / t) - ((1.0 / t) / x); tmp = 0.0; if (t <= -9.5e-199) tmp = 1.0 / -sqrt(((1.0 + x) / (x + -1.0))); elseif (t <= -3.5e-297) tmp = t_1; elseif (t <= 5e-309) tmp = -1.0; elseif (t <= 1.55e-279) tmp = t * t_2; elseif (t <= 1.36e-151) tmp = t_1; else tmp = t * (t_2 + (0.5 / (t * (x * x)))); end tmp_2 = tmp; end
code[x_, l_, t_] := Block[{t$95$1 = N[(N[(t / l), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / t), $MachinePrecision] - N[(N[(1.0 / t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-199], N[(1.0 / (-N[Sqrt[N[(N[(1.0 + x), $MachinePrecision] / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -3.5e-297], t$95$1, If[LessEqual[t, 5e-309], -1.0, If[LessEqual[t, 1.55e-279], N[(t * t$95$2), $MachinePrecision], If[LessEqual[t, 1.36e-151], t$95$1, N[(t * N[(t$95$2 + N[(0.5 / N[(t * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\ell} \cdot \sqrt{x}\\
t_2 := \frac{1}{t} - \frac{\frac{1}{t}}{x}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-199}:\\
\;\;\;\;\frac{1}{-\sqrt{\frac{1 + x}{x + -1}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-297}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-279}:\\
\;\;\;\;t \cdot t_2\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t_2 + \frac{0.5}{t \cdot \left(x \cdot x\right)}\right)\\
\end{array}
\end{array}
if t < -9.5000000000000005e-199Initial program 35.0%
associate-/l*34.9%
fma-neg34.9%
remove-double-neg34.9%
fma-neg34.9%
sub-neg34.9%
metadata-eval34.9%
remove-double-neg34.9%
fma-def34.9%
Simplified34.9%
Taylor expanded in t around -inf 82.9%
mul-1-neg82.9%
distribute-rgt-neg-in82.9%
+-commutative82.9%
sub-neg82.9%
metadata-eval82.9%
+-commutative82.9%
Simplified82.9%
div-inv82.9%
+-commutative82.9%
Applied egg-rr82.9%
associate-*r/82.9%
*-rgt-identity82.9%
associate-/r*82.9%
*-inverses82.9%
Simplified82.9%
if -9.5000000000000005e-199 < t < -3.4999999999999999e-297 or 1.55e-279 < t < 1.35999999999999994e-151Initial program 5.3%
associate-*l/5.3%
Simplified5.3%
Applied egg-rr4.6%
expm1-def4.6%
expm1-log1p5.8%
metadata-eval5.8%
sub-neg5.8%
associate-/l*1.3%
sub-neg1.3%
metadata-eval1.3%
+-commutative1.3%
Simplified1.3%
Taylor expanded in x around inf 63.4%
distribute-lft-in63.4%
associate--l+63.4%
unpow263.4%
+-commutative63.4%
unpow263.4%
unpow263.4%
associate-*r/63.4%
Simplified63.4%
Taylor expanded in t around 0 63.4%
+-commutative63.4%
mul-1-neg63.4%
unsub-neg63.4%
*-commutative63.4%
unpow263.4%
unpow263.4%
Simplified63.4%
Taylor expanded in t around 0 31.9%
if -3.4999999999999999e-297 < t < 4.9999999999999995e-309Initial program 3.1%
associate-/l*3.1%
fma-neg3.1%
remove-double-neg3.1%
fma-neg3.1%
sub-neg3.1%
metadata-eval3.1%
remove-double-neg3.1%
fma-def3.1%
Simplified3.1%
Taylor expanded in t around -inf 85.7%
mul-1-neg85.7%
distribute-rgt-neg-in85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in x around inf 85.7%
if 4.9999999999999995e-309 < t < 1.55e-279Initial program 2.5%
associate-*l/2.5%
Simplified2.5%
Taylor expanded in t around inf 2.8%
associate-/l*2.8%
+-commutative2.8%
sub-neg2.8%
metadata-eval2.8%
+-commutative2.8%
unpow22.8%
Simplified2.8%
Taylor expanded in x around inf 80.6%
associate-/r*80.6%
Simplified80.6%
if 1.35999999999999994e-151 < t Initial program 37.0%
associate-*l/36.9%
Simplified36.9%
Taylor expanded in t around inf 30.4%
associate-/l*34.0%
+-commutative34.0%
sub-neg34.0%
metadata-eval34.0%
+-commutative34.0%
unpow234.0%
Simplified34.0%
Taylor expanded in x around inf 84.5%
associate--l+84.5%
associate-*r/84.5%
metadata-eval84.5%
unpow284.5%
associate-/r*84.5%
Simplified84.5%
Final simplification78.8%
(FPCore (x l t) :precision binary64 (if (<= t 5e-309) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (* t (+ (- (/ 1.0 t) (/ (/ 1.0 t) x)) (/ 0.5 (* t (* x x)))))))
double code(double x, double l, double t) {
double tmp;
if (t <= 5e-309) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = t * (((1.0 / t) - ((1.0 / t) / x)) + (0.5 / (t * (x * x))));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 5d-309) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else
tmp = t * (((1.0d0 / t) - ((1.0d0 / t) / x)) + (0.5d0 / (t * (x * x))))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= 5e-309) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = t * (((1.0 / t) - ((1.0 / t) / x)) + (0.5 / (t * (x * x))));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= 5e-309: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) else: tmp = t * (((1.0 / t) - ((1.0 / t) / x)) + (0.5 / (t * (x * x)))) return tmp
function code(x, l, t) tmp = 0.0 if (t <= 5e-309) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); else tmp = Float64(t * Float64(Float64(Float64(1.0 / t) - Float64(Float64(1.0 / t) / x)) + Float64(0.5 / Float64(t * Float64(x * x))))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 5e-309) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); else tmp = t * (((1.0 / t) - ((1.0 / t) / x)) + (0.5 / (t * (x * x)))); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, 5e-309], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(1.0 / t), $MachinePrecision] - N[(N[(1.0 / t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 / N[(t * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(\frac{1}{t} - \frac{\frac{1}{t}}{x}\right) + \frac{0.5}{t \cdot \left(x \cdot x\right)}\right)\\
\end{array}
\end{array}
if t < 4.9999999999999995e-309Initial program 30.9%
associate-/l*30.8%
fma-neg30.8%
remove-double-neg30.8%
fma-neg30.8%
sub-neg30.8%
metadata-eval30.8%
remove-double-neg30.8%
fma-def30.8%
Simplified30.8%
Taylor expanded in t around -inf 77.1%
mul-1-neg77.1%
distribute-rgt-neg-in77.1%
+-commutative77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 77.0%
associate-*r/77.0%
metadata-eval77.0%
unpow277.0%
Simplified77.0%
if 4.9999999999999995e-309 < t Initial program 33.6%
associate-*l/33.6%
Simplified33.6%
Taylor expanded in t around inf 27.9%
associate-/l*30.3%
+-commutative30.3%
sub-neg30.3%
metadata-eval30.3%
+-commutative30.3%
unpow230.3%
Simplified30.3%
Taylor expanded in x around inf 79.1%
associate--l+79.1%
associate-*r/79.1%
metadata-eval79.1%
unpow279.1%
associate-/r*79.1%
Simplified79.1%
Final simplification78.0%
(FPCore (x l t) :precision binary64 (if (<= t 1.1e-301) (+ (/ 1.0 x) (- -1.0 (/ 0.5 (* x x)))) (/ 1.0 (- (- -1.0) (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= 1.1e-301) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = 1.0 / (-(-1.0) - (-1.0 / x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1.1d-301) then
tmp = (1.0d0 / x) + ((-1.0d0) - (0.5d0 / (x * x)))
else
tmp = 1.0d0 / (-(-1.0d0) - ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= 1.1e-301) {
tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x)));
} else {
tmp = 1.0 / (-(-1.0) - (-1.0 / x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= 1.1e-301: tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))) else: tmp = 1.0 / (-(-1.0) - (-1.0 / x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= 1.1e-301) tmp = Float64(Float64(1.0 / x) + Float64(-1.0 - Float64(0.5 / Float64(x * x)))); else tmp = Float64(1.0 / Float64(Float64(-(-1.0)) - Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 1.1e-301) tmp = (1.0 / x) + (-1.0 - (0.5 / (x * x))); else tmp = 1.0 / (-(-1.0) - (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, 1.1e-301], N[(N[(1.0 / x), $MachinePrecision] + N[(-1.0 - N[(0.5 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[((--1.0) - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-301}:\\
\;\;\;\;\frac{1}{x} + \left(-1 - \frac{0.5}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(--1\right) - \frac{-1}{x}}\\
\end{array}
\end{array}
if t < 1.1e-301Initial program 30.6%
associate-/l*30.6%
fma-neg30.6%
remove-double-neg30.6%
fma-neg30.6%
sub-neg30.6%
metadata-eval30.6%
remove-double-neg30.6%
fma-def30.6%
Simplified30.6%
Taylor expanded in t around -inf 76.6%
mul-1-neg76.6%
distribute-rgt-neg-in76.6%
+-commutative76.6%
sub-neg76.6%
metadata-eval76.6%
+-commutative76.6%
Simplified76.6%
Taylor expanded in x around inf 76.5%
associate-*r/76.5%
metadata-eval76.5%
unpow276.5%
Simplified76.5%
if 1.1e-301 < t Initial program 33.9%
associate-/l*33.8%
fma-neg33.8%
remove-double-neg33.8%
fma-neg33.8%
sub-neg33.8%
metadata-eval33.8%
remove-double-neg33.8%
fma-def33.8%
Simplified33.8%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
div-inv1.7%
+-commutative1.7%
Applied egg-rr1.7%
associate-*r/1.7%
*-rgt-identity1.7%
associate-/r*1.7%
*-inverses1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
sub-neg0.0%
unpow20.0%
rem-square-sqrt79.6%
distribute-neg-frac79.6%
metadata-eval79.6%
Simplified79.6%
Final simplification77.9%
(FPCore (x l t) :precision binary64 (if (<= t 1.1e-301) (+ -1.0 (/ 1.0 x)) (/ 1.0 (- (- -1.0) (/ -1.0 x)))))
double code(double x, double l, double t) {
double tmp;
if (t <= 1.1e-301) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 / (-(-1.0) - (-1.0 / x));
}
return tmp;
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1.1d-301) then
tmp = (-1.0d0) + (1.0d0 / x)
else
tmp = 1.0d0 / (-(-1.0d0) - ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double l, double t) {
double tmp;
if (t <= 1.1e-301) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0 / (-(-1.0) - (-1.0 / x));
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= 1.1e-301: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 / (-(-1.0) - (-1.0 / x)) return tmp
function code(x, l, t) tmp = 0.0 if (t <= 1.1e-301) tmp = Float64(-1.0 + Float64(1.0 / x)); else tmp = Float64(1.0 / Float64(Float64(-(-1.0)) - Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= 1.1e-301) tmp = -1.0 + (1.0 / x); else tmp = 1.0 / (-(-1.0) - (-1.0 / x)); end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, 1.1e-301], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[((--1.0) - N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-301}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(--1\right) - \frac{-1}{x}}\\
\end{array}
\end{array}
if t < 1.1e-301Initial program 30.6%
associate-/l*30.6%
fma-neg30.6%
remove-double-neg30.6%
fma-neg30.6%
sub-neg30.6%
metadata-eval30.6%
remove-double-neg30.6%
fma-def30.6%
Simplified30.6%
Taylor expanded in t around -inf 76.6%
mul-1-neg76.6%
distribute-rgt-neg-in76.6%
+-commutative76.6%
sub-neg76.6%
metadata-eval76.6%
+-commutative76.6%
Simplified76.6%
Taylor expanded in x around inf 76.3%
if 1.1e-301 < t Initial program 33.9%
associate-/l*33.8%
fma-neg33.8%
remove-double-neg33.8%
fma-neg33.8%
sub-neg33.8%
metadata-eval33.8%
remove-double-neg33.8%
fma-def33.8%
Simplified33.8%
Taylor expanded in t around -inf 1.7%
mul-1-neg1.7%
distribute-rgt-neg-in1.7%
+-commutative1.7%
sub-neg1.7%
metadata-eval1.7%
+-commutative1.7%
Simplified1.7%
div-inv1.7%
+-commutative1.7%
Applied egg-rr1.7%
associate-*r/1.7%
*-rgt-identity1.7%
associate-/r*1.7%
*-inverses1.7%
Simplified1.7%
Taylor expanded in x around -inf 0.0%
sub-neg0.0%
unpow20.0%
rem-square-sqrt79.6%
distribute-neg-frac79.6%
metadata-eval79.6%
Simplified79.6%
Final simplification77.9%
(FPCore (x l t) :precision binary64 (if (<= t 1.1e-301) (+ -1.0 (/ 1.0 x)) 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= 1.1e-301) {
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 <= 1.1d-301) 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 <= 1.1e-301) {
tmp = -1.0 + (1.0 / x);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= 1.1e-301: tmp = -1.0 + (1.0 / x) else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= 1.1e-301) 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 <= 1.1e-301) tmp = -1.0 + (1.0 / x); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, 1.1e-301], N[(-1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-301}:\\
\;\;\;\;-1 + \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < 1.1e-301Initial program 30.6%
associate-/l*30.6%
fma-neg30.6%
remove-double-neg30.6%
fma-neg30.6%
sub-neg30.6%
metadata-eval30.6%
remove-double-neg30.6%
fma-def30.6%
Simplified30.6%
Taylor expanded in t around -inf 76.6%
mul-1-neg76.6%
distribute-rgt-neg-in76.6%
+-commutative76.6%
sub-neg76.6%
metadata-eval76.6%
+-commutative76.6%
Simplified76.6%
Taylor expanded in x around inf 76.3%
if 1.1e-301 < t Initial program 33.9%
associate-*l/33.8%
Simplified33.8%
Taylor expanded in t around inf 28.1%
associate-/l*30.5%
+-commutative30.5%
sub-neg30.5%
metadata-eval30.5%
+-commutative30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in x around inf 78.8%
Taylor expanded in t around 0 78.9%
Final simplification77.5%
(FPCore (x l t) :precision binary64 (if (<= t -1e-309) -1.0 1.0))
double code(double x, double l, double t) {
double tmp;
if (t <= -1e-309) {
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-309)) 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-309) {
tmp = -1.0;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, l, t): tmp = 0 if t <= -1e-309: tmp = -1.0 else: tmp = 1.0 return tmp
function code(x, l, t) tmp = 0.0 if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, l, t) tmp = 0.0; if (t <= -1e-309) tmp = -1.0; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, l_, t_] := If[LessEqual[t, -1e-309], -1.0, 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-309}:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if t < -1.000000000000002e-309Initial program 30.9%
associate-/l*30.8%
fma-neg30.8%
remove-double-neg30.8%
fma-neg30.8%
sub-neg30.8%
metadata-eval30.8%
remove-double-neg30.8%
fma-def30.8%
Simplified30.8%
Taylor expanded in t around -inf 77.1%
mul-1-neg77.1%
distribute-rgt-neg-in77.1%
+-commutative77.1%
sub-neg77.1%
metadata-eval77.1%
+-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 76.5%
if -1.000000000000002e-309 < t Initial program 33.6%
associate-*l/33.6%
Simplified33.6%
Taylor expanded in t around inf 27.9%
associate-/l*30.3%
+-commutative30.3%
sub-neg30.3%
metadata-eval30.3%
+-commutative30.3%
unpow230.3%
Simplified30.3%
Taylor expanded in x around inf 78.2%
Taylor expanded in t around 0 78.3%
Final simplification77.3%
(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 32.1%
associate-/l*32.1%
fma-neg32.1%
remove-double-neg32.1%
fma-neg32.1%
sub-neg32.1%
metadata-eval32.1%
remove-double-neg32.1%
fma-def32.1%
Simplified32.1%
Taylor expanded in t around -inf 41.8%
mul-1-neg41.8%
distribute-rgt-neg-in41.8%
+-commutative41.8%
sub-neg41.8%
metadata-eval41.8%
+-commutative41.8%
Simplified41.8%
Taylor expanded in x around inf 41.4%
Final simplification41.4%
herbie shell --seed 2023260
(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)))))