
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
Initial program 96.7%
associate-/r/99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y (- 1.0 z)))))
(t_2 (- x (* a (/ (- y z) t))))
(t_3 (+ x (- (* a (/ y z)) a))))
(if (<= t -52000000000.0)
t_2
(if (<= t -1.6e-160)
t_1
(if (<= t 6e-179)
t_3
(if (<= t 1.02e-79) t_1 (if (<= t 0.6) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a * ((y - z) / t));
double t_3 = x + ((a * (y / z)) - a);
double tmp;
if (t <= -52000000000.0) {
tmp = t_2;
} else if (t <= -1.6e-160) {
tmp = t_1;
} else if (t <= 6e-179) {
tmp = t_3;
} else if (t <= 1.02e-79) {
tmp = t_1;
} else if (t <= 0.6) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x - (a * (y / (1.0d0 - z)))
t_2 = x - (a * ((y - z) / t))
t_3 = x + ((a * (y / z)) - a)
if (t <= (-52000000000.0d0)) then
tmp = t_2
else if (t <= (-1.6d-160)) then
tmp = t_1
else if (t <= 6d-179) then
tmp = t_3
else if (t <= 1.02d-79) then
tmp = t_1
else if (t <= 0.6d0) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a * ((y - z) / t));
double t_3 = x + ((a * (y / z)) - a);
double tmp;
if (t <= -52000000000.0) {
tmp = t_2;
} else if (t <= -1.6e-160) {
tmp = t_1;
} else if (t <= 6e-179) {
tmp = t_3;
} else if (t <= 1.02e-79) {
tmp = t_1;
} else if (t <= 0.6) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / (1.0 - z))) t_2 = x - (a * ((y - z) / t)) t_3 = x + ((a * (y / z)) - a) tmp = 0 if t <= -52000000000.0: tmp = t_2 elif t <= -1.6e-160: tmp = t_1 elif t <= 6e-179: tmp = t_3 elif t <= 1.02e-79: tmp = t_1 elif t <= 0.6: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))) t_2 = Float64(x - Float64(a * Float64(Float64(y - z) / t))) t_3 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (t <= -52000000000.0) tmp = t_2; elseif (t <= -1.6e-160) tmp = t_1; elseif (t <= 6e-179) tmp = t_3; elseif (t <= 1.02e-79) tmp = t_1; elseif (t <= 0.6) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / (1.0 - z))); t_2 = x - (a * ((y - z) / t)); t_3 = x + ((a * (y / z)) - a); tmp = 0.0; if (t <= -52000000000.0) tmp = t_2; elseif (t <= -1.6e-160) tmp = t_1; elseif (t <= 6e-179) tmp = t_3; elseif (t <= 1.02e-79) tmp = t_1; elseif (t <= 0.6) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -52000000000.0], t$95$2, If[LessEqual[t, -1.6e-160], t$95$1, If[LessEqual[t, 6e-179], t$95$3, If[LessEqual[t, 1.02e-79], t$95$1, If[LessEqual[t, 0.6], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{1 - z}\\
t_2 := x - a \cdot \frac{y - z}{t}\\
t_3 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;t \leq -52000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-179}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 0.6:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -5.2e10 or 0.599999999999999978 < t Initial program 98.3%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in t around inf 90.2%
if -5.2e10 < t < -1.60000000000000004e-160 or 6.00000000000000012e-179 < t < 1.02000000000000002e-79Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 99.0%
Taylor expanded in y around inf 83.0%
if -1.60000000000000004e-160 < t < 6.00000000000000012e-179 or 1.02000000000000002e-79 < t < 0.599999999999999978Initial program 94.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in y around 0 76.6%
mul-1-neg76.6%
unsub-neg76.6%
*-lft-identity76.6%
times-frac83.5%
/-rgt-identity83.5%
Simplified83.5%
Final simplification86.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y (- 1.0 z))))) (t_2 (+ x (- (* a (/ y z)) a))))
(if (<= t -900.0)
(- x (/ a (/ t (- y z))))
(if (<= t -1.7e-159)
t_1
(if (<= t 1.25e-178)
t_2
(if (<= t 2.05e-78)
t_1
(if (<= t 3.45) t_2 (- x (* a (/ (- y z) t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x + ((a * (y / z)) - a);
double tmp;
if (t <= -900.0) {
tmp = x - (a / (t / (y - z)));
} else if (t <= -1.7e-159) {
tmp = t_1;
} else if (t <= 1.25e-178) {
tmp = t_2;
} else if (t <= 2.05e-78) {
tmp = t_1;
} else if (t <= 3.45) {
tmp = t_2;
} else {
tmp = x - (a * ((y - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (a * (y / (1.0d0 - z)))
t_2 = x + ((a * (y / z)) - a)
if (t <= (-900.0d0)) then
tmp = x - (a / (t / (y - z)))
else if (t <= (-1.7d-159)) then
tmp = t_1
else if (t <= 1.25d-178) then
tmp = t_2
else if (t <= 2.05d-78) then
tmp = t_1
else if (t <= 3.45d0) then
tmp = t_2
else
tmp = x - (a * ((y - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x + ((a * (y / z)) - a);
double tmp;
if (t <= -900.0) {
tmp = x - (a / (t / (y - z)));
} else if (t <= -1.7e-159) {
tmp = t_1;
} else if (t <= 1.25e-178) {
tmp = t_2;
} else if (t <= 2.05e-78) {
tmp = t_1;
} else if (t <= 3.45) {
tmp = t_2;
} else {
tmp = x - (a * ((y - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / (1.0 - z))) t_2 = x + ((a * (y / z)) - a) tmp = 0 if t <= -900.0: tmp = x - (a / (t / (y - z))) elif t <= -1.7e-159: tmp = t_1 elif t <= 1.25e-178: tmp = t_2 elif t <= 2.05e-78: tmp = t_1 elif t <= 3.45: tmp = t_2 else: tmp = x - (a * ((y - z) / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))) t_2 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (t <= -900.0) tmp = Float64(x - Float64(a / Float64(t / Float64(y - z)))); elseif (t <= -1.7e-159) tmp = t_1; elseif (t <= 1.25e-178) tmp = t_2; elseif (t <= 2.05e-78) tmp = t_1; elseif (t <= 3.45) tmp = t_2; else tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / (1.0 - z))); t_2 = x + ((a * (y / z)) - a); tmp = 0.0; if (t <= -900.0) tmp = x - (a / (t / (y - z))); elseif (t <= -1.7e-159) tmp = t_1; elseif (t <= 1.25e-178) tmp = t_2; elseif (t <= 2.05e-78) tmp = t_1; elseif (t <= 3.45) tmp = t_2; else tmp = x - (a * ((y - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -900.0], N[(x - N[(a / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-159], t$95$1, If[LessEqual[t, 1.25e-178], t$95$2, If[LessEqual[t, 2.05e-78], t$95$1, If[LessEqual[t, 3.45], t$95$2, N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{1 - z}\\
t_2 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;t \leq -900:\\
\;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-178}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.45:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\end{array}
\end{array}
if t < -900Initial program 98.0%
associate-/r/98.0%
Simplified98.0%
Taylor expanded in t around inf 79.4%
associate-/l*93.2%
Simplified93.2%
if -900 < t < -1.69999999999999992e-159 or 1.24999999999999994e-178 < t < 2.0499999999999999e-78Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 99.0%
Taylor expanded in y around inf 83.0%
if -1.69999999999999992e-159 < t < 1.24999999999999994e-178 or 2.0499999999999999e-78 < t < 3.4500000000000002Initial program 94.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
mul-1-neg83.5%
Simplified83.5%
Taylor expanded in y around 0 76.6%
mul-1-neg76.6%
unsub-neg76.6%
*-lft-identity76.6%
times-frac83.5%
/-rgt-identity83.5%
Simplified83.5%
if 3.4500000000000002 < t Initial program 98.5%
associate-/r/98.6%
Simplified98.6%
Taylor expanded in t around inf 88.1%
Final simplification86.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))) (t_2 (- x (/ a (/ t y)))))
(if (<= t -1.6e+16)
t_2
(if (<= t -1.9e-163)
t_1
(if (<= t 3.6e-214)
(- x a)
(if (<= t 2e-78) t_1 (if (<= t 1.22) (- x a) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -1.6e+16) {
tmp = t_2;
} else if (t <= -1.9e-163) {
tmp = t_1;
} else if (t <= 3.6e-214) {
tmp = x - a;
} else if (t <= 2e-78) {
tmp = t_1;
} else if (t <= 1.22) {
tmp = x - a;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * a)
t_2 = x - (a / (t / y))
if (t <= (-1.6d+16)) then
tmp = t_2
else if (t <= (-1.9d-163)) then
tmp = t_1
else if (t <= 3.6d-214) then
tmp = x - a
else if (t <= 2d-78) then
tmp = t_1
else if (t <= 1.22d0) then
tmp = x - a
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -1.6e+16) {
tmp = t_2;
} else if (t <= -1.9e-163) {
tmp = t_1;
} else if (t <= 3.6e-214) {
tmp = x - a;
} else if (t <= 2e-78) {
tmp = t_1;
} else if (t <= 1.22) {
tmp = x - a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) t_2 = x - (a / (t / y)) tmp = 0 if t <= -1.6e+16: tmp = t_2 elif t <= -1.9e-163: tmp = t_1 elif t <= 3.6e-214: tmp = x - a elif t <= 2e-78: tmp = t_1 elif t <= 1.22: tmp = x - a else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) t_2 = Float64(x - Float64(a / Float64(t / y))) tmp = 0.0 if (t <= -1.6e+16) tmp = t_2; elseif (t <= -1.9e-163) tmp = t_1; elseif (t <= 3.6e-214) tmp = Float64(x - a); elseif (t <= 2e-78) tmp = t_1; elseif (t <= 1.22) tmp = Float64(x - a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); t_2 = x - (a / (t / y)); tmp = 0.0; if (t <= -1.6e+16) tmp = t_2; elseif (t <= -1.9e-163) tmp = t_1; elseif (t <= 3.6e-214) tmp = x - a; elseif (t <= 2e-78) tmp = t_1; elseif (t <= 1.22) tmp = x - a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+16], t$95$2, If[LessEqual[t, -1.9e-163], t$95$1, If[LessEqual[t, 3.6e-214], N[(x - a), $MachinePrecision], If[LessEqual[t, 2e-78], t$95$1, If[LessEqual[t, 1.22], N[(x - a), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
t_2 := x - \frac{a}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-214}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.22:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.6e16 or 1.21999999999999997 < t Initial program 98.3%
associate-/r/98.3%
Simplified98.3%
Taylor expanded in t around inf 74.9%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in y around inf 86.9%
if -1.6e16 < t < -1.9e-163 or 3.6e-214 < t < 2e-78Initial program 96.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 75.0%
Taylor expanded in t around 0 74.3%
if -1.9e-163 < t < 3.6e-214 or 2e-78 < t < 1.21999999999999997Initial program 94.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.4%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y (- 1.0 z))))) (t_2 (- x (/ a (/ t y)))))
(if (<= t -1.6e+16)
t_2
(if (<= t 2.2e-262)
t_1
(if (<= t 8.5e-215) (- x a) (if (<= t 3.75e+17) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -1.6e+16) {
tmp = t_2;
} else if (t <= 2.2e-262) {
tmp = t_1;
} else if (t <= 8.5e-215) {
tmp = x - a;
} else if (t <= 3.75e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (a * (y / (1.0d0 - z)))
t_2 = x - (a / (t / y))
if (t <= (-1.6d+16)) then
tmp = t_2
else if (t <= 2.2d-262) then
tmp = t_1
else if (t <= 8.5d-215) then
tmp = x - a
else if (t <= 3.75d+17) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -1.6e+16) {
tmp = t_2;
} else if (t <= 2.2e-262) {
tmp = t_1;
} else if (t <= 8.5e-215) {
tmp = x - a;
} else if (t <= 3.75e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / (1.0 - z))) t_2 = x - (a / (t / y)) tmp = 0 if t <= -1.6e+16: tmp = t_2 elif t <= 2.2e-262: tmp = t_1 elif t <= 8.5e-215: tmp = x - a elif t <= 3.75e+17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))) t_2 = Float64(x - Float64(a / Float64(t / y))) tmp = 0.0 if (t <= -1.6e+16) tmp = t_2; elseif (t <= 2.2e-262) tmp = t_1; elseif (t <= 8.5e-215) tmp = Float64(x - a); elseif (t <= 3.75e+17) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / (1.0 - z))); t_2 = x - (a / (t / y)); tmp = 0.0; if (t <= -1.6e+16) tmp = t_2; elseif (t <= 2.2e-262) tmp = t_1; elseif (t <= 8.5e-215) tmp = x - a; elseif (t <= 3.75e+17) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+16], t$95$2, If[LessEqual[t, 2.2e-262], t$95$1, If[LessEqual[t, 8.5e-215], N[(x - a), $MachinePrecision], If[LessEqual[t, 3.75e+17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{1 - z}\\
t_2 := x - \frac{a}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-215}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 3.75 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.6e16 or 3.75e17 < t Initial program 98.2%
associate-/r/98.3%
Simplified98.3%
Taylor expanded in t around inf 74.4%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in y around inf 87.1%
if -1.6e16 < t < 2.19999999999999989e-262 or 8.4999999999999998e-215 < t < 3.75e17Initial program 95.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 98.8%
Taylor expanded in y around inf 76.3%
if 2.19999999999999989e-262 < t < 8.4999999999999998e-215Initial program 92.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.5%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y (- 1.0 z))))) (t_2 (- x (* a (/ (- y z) t)))))
(if (<= t -44.0)
t_2
(if (<= t 7.5e-264)
t_1
(if (<= t 1.35e-214) (- x a) (if (<= t 7.8e+17) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a * ((y - z) / t));
double tmp;
if (t <= -44.0) {
tmp = t_2;
} else if (t <= 7.5e-264) {
tmp = t_1;
} else if (t <= 1.35e-214) {
tmp = x - a;
} else if (t <= 7.8e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (a * (y / (1.0d0 - z)))
t_2 = x - (a * ((y - z) / t))
if (t <= (-44.0d0)) then
tmp = t_2
else if (t <= 7.5d-264) then
tmp = t_1
else if (t <= 1.35d-214) then
tmp = x - a
else if (t <= 7.8d+17) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / (1.0 - z)));
double t_2 = x - (a * ((y - z) / t));
double tmp;
if (t <= -44.0) {
tmp = t_2;
} else if (t <= 7.5e-264) {
tmp = t_1;
} else if (t <= 1.35e-214) {
tmp = x - a;
} else if (t <= 7.8e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / (1.0 - z))) t_2 = x - (a * ((y - z) / t)) tmp = 0 if t <= -44.0: tmp = t_2 elif t <= 7.5e-264: tmp = t_1 elif t <= 1.35e-214: tmp = x - a elif t <= 7.8e+17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))) t_2 = Float64(x - Float64(a * Float64(Float64(y - z) / t))) tmp = 0.0 if (t <= -44.0) tmp = t_2; elseif (t <= 7.5e-264) tmp = t_1; elseif (t <= 1.35e-214) tmp = Float64(x - a); elseif (t <= 7.8e+17) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / (1.0 - z))); t_2 = x - (a * ((y - z) / t)); tmp = 0.0; if (t <= -44.0) tmp = t_2; elseif (t <= 7.5e-264) tmp = t_1; elseif (t <= 1.35e-214) tmp = x - a; elseif (t <= 7.8e+17) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -44.0], t$95$2, If[LessEqual[t, 7.5e-264], t$95$1, If[LessEqual[t, 1.35e-214], N[(x - a), $MachinePrecision], If[LessEqual[t, 7.8e+17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{1 - z}\\
t_2 := x - a \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -44:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-214}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -44 or 7.8e17 < t Initial program 98.2%
associate-/r/98.3%
Simplified98.3%
Taylor expanded in t around inf 90.5%
if -44 < t < 7.5000000000000001e-264 or 1.35e-214 < t < 7.8e17Initial program 95.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.6%
Taylor expanded in y around inf 76.8%
if 7.5000000000000001e-264 < t < 1.35e-214Initial program 92.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.5%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -26000000000000.0) (not (<= t 8.6e+61))) (+ x (/ (- z y) (/ t a))) (+ x (* a (/ (- z y) (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -26000000000000.0) || !(t <= 8.6e+61)) {
tmp = x + ((z - y) / (t / a));
} else {
tmp = x + (a * ((z - y) / (1.0 - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-26000000000000.0d0)) .or. (.not. (t <= 8.6d+61))) then
tmp = x + ((z - y) / (t / a))
else
tmp = x + (a * ((z - y) / (1.0d0 - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -26000000000000.0) || !(t <= 8.6e+61)) {
tmp = x + ((z - y) / (t / a));
} else {
tmp = x + (a * ((z - y) / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -26000000000000.0) or not (t <= 8.6e+61): tmp = x + ((z - y) / (t / a)) else: tmp = x + (a * ((z - y) / (1.0 - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -26000000000000.0) || !(t <= 8.6e+61)) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); else tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -26000000000000.0) || ~((t <= 8.6e+61))) tmp = x + ((z - y) / (t / a)); else tmp = x + (a * ((z - y) / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -26000000000000.0], N[Not[LessEqual[t, 8.6e+61]], $MachinePrecision]], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -26000000000000 \lor \neg \left(t \leq 8.6 \cdot 10^{+61}\right):\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\end{array}
\end{array}
if t < -2.6e13 or 8.6000000000000003e61 < t Initial program 98.0%
Taylor expanded in t around inf 95.0%
if -2.6e13 < t < 8.6000000000000003e61Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 98.4%
Final simplification97.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.4e-11) (not (<= z 9e+30))) (+ x (- (* a (/ y z)) a)) (- x (/ y (/ (+ t 1.0) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e-11) || !(z <= 9e+30)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x - (y / ((t + 1.0) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.4d-11)) .or. (.not. (z <= 9d+30))) then
tmp = x + ((a * (y / z)) - a)
else
tmp = x - (y / ((t + 1.0d0) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e-11) || !(z <= 9e+30)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x - (y / ((t + 1.0) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.4e-11) or not (z <= 9e+30): tmp = x + ((a * (y / z)) - a) else: tmp = x - (y / ((t + 1.0) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.4e-11) || !(z <= 9e+30)) tmp = Float64(x + Float64(Float64(a * Float64(y / z)) - a)); else tmp = Float64(x - Float64(y / Float64(Float64(t + 1.0) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.4e-11) || ~((z <= 9e+30))) tmp = x + ((a * (y / z)) - a); else tmp = x - (y / ((t + 1.0) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.4e-11], N[Not[LessEqual[z, 9e+30]], $MachinePrecision]], N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(t + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-11} \lor \neg \left(z \leq 9 \cdot 10^{+30}\right):\\
\;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{t + 1}{a}}\\
\end{array}
\end{array}
if z < -2.4000000000000001e-11 or 8.9999999999999999e30 < z Initial program 93.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.4%
mul-1-neg87.4%
Simplified87.4%
Taylor expanded in y around 0 81.0%
mul-1-neg81.0%
unsub-neg81.0%
*-lft-identity81.0%
times-frac87.4%
/-rgt-identity87.4%
Simplified87.4%
if -2.4000000000000001e-11 < z < 8.9999999999999999e30Initial program 99.9%
associate-/r/98.6%
Simplified98.6%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
associate-/l*93.7%
Simplified93.7%
Final simplification90.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.4e-11) (not (<= z 1.85e+35))) (+ x (/ a (/ z (- y z)))) (- x (/ y (/ (+ t 1.0) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e-11) || !(z <= 1.85e+35)) {
tmp = x + (a / (z / (y - z)));
} else {
tmp = x - (y / ((t + 1.0) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.4d-11)) .or. (.not. (z <= 1.85d+35))) then
tmp = x + (a / (z / (y - z)))
else
tmp = x - (y / ((t + 1.0d0) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e-11) || !(z <= 1.85e+35)) {
tmp = x + (a / (z / (y - z)));
} else {
tmp = x - (y / ((t + 1.0) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.4e-11) or not (z <= 1.85e+35): tmp = x + (a / (z / (y - z))) else: tmp = x - (y / ((t + 1.0) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.4e-11) || !(z <= 1.85e+35)) tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); else tmp = Float64(x - Float64(y / Float64(Float64(t + 1.0) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.4e-11) || ~((z <= 1.85e+35))) tmp = x + (a / (z / (y - z))); else tmp = x - (y / ((t + 1.0) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.4e-11], N[Not[LessEqual[z, 1.85e+35]], $MachinePrecision]], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(t + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-11} \lor \neg \left(z \leq 1.85 \cdot 10^{+35}\right):\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{t + 1}{a}}\\
\end{array}
\end{array}
if z < -2.4000000000000001e-11 or 1.85e35 < z Initial program 93.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.4%
mul-1-neg87.4%
Simplified87.4%
Taylor expanded in a around 0 68.4%
mul-1-neg68.4%
associate-/l*87.4%
distribute-neg-frac87.4%
Simplified87.4%
if -2.4000000000000001e-11 < z < 1.85e35Initial program 99.9%
associate-/r/98.6%
Simplified98.6%
Taylor expanded in z around 0 86.2%
*-commutative86.2%
associate-/l*93.7%
Simplified93.7%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.9e+47) (- x a) (if (<= z 7.2e+30) (- x (* y a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+47) {
tmp = x - a;
} else if (z <= 7.2e+30) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.9d+47)) then
tmp = x - a
else if (z <= 7.2d+30) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+47) {
tmp = x - a;
} else if (z <= 7.2e+30) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e+47: tmp = x - a elif z <= 7.2e+30: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e+47) tmp = Float64(x - a); elseif (z <= 7.2e+30) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e+47) tmp = x - a; elseif (z <= 7.2e+30) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+47], N[(x - a), $MachinePrecision], If[LessEqual[z, 7.2e+30], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+47}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+30}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.90000000000000025e47 or 7.2000000000000004e30 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if -3.90000000000000025e47 < z < 7.2000000000000004e30Initial program 99.9%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in z around 0 85.7%
Taylor expanded in t around 0 69.0%
Final simplification73.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e-61) x (if (<= t 5.4e+112) (- x a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e-61) {
tmp = x;
} else if (t <= 5.4e+112) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2d-61)) then
tmp = x
else if (t <= 5.4d+112) then
tmp = x - a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e-61) {
tmp = x;
} else if (t <= 5.4e+112) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e-61: tmp = x elif t <= 5.4e+112: tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e-61) tmp = x; elseif (t <= 5.4e+112) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e-61) tmp = x; elseif (t <= 5.4e+112) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e-61], x, If[LessEqual[t, 5.4e+112], N[(x - a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-61}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+112}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.0000000000000001e-61 or 5.4000000000000002e112 < t Initial program 98.9%
associate-/r/98.0%
Simplified98.0%
Taylor expanded in x around inf 71.1%
if -2.0000000000000001e-61 < t < 5.4000000000000002e112Initial program 95.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 63.9%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.7%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in x around inf 55.1%
Final simplification55.1%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2023200
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))