
(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 16 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 (/ a (/ (+ (- t z) 1.0) (- z y)))))
double code(double x, double y, double z, double t, double a) {
return x + (a / (((t - z) + 1.0) / (z - y)));
}
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 + (a / (((t - z) + 1.0d0) / (z - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a / (((t - z) + 1.0) / (z - y)));
}
def code(x, y, z, t, a): return x + (a / (((t - z) + 1.0) / (z - y)))
function code(x, y, z, t, a) return Float64(x + Float64(a / Float64(Float64(Float64(t - z) + 1.0) / Float64(z - y)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a / (((t - z) + 1.0) / (z - y))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{a}{\frac{\left(t - z\right) + 1}{z - y}}
\end{array}
Initial program 96.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ y t)))))
(if (<= z -1e+168)
(- x a)
(if (<= z -1.2e-55)
(+ x (* y (/ a z)))
(if (<= z -1.02e-90)
t_1
(if (<= z -2.05e-175)
(- x (* a y))
(if (<= z 2e+104) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * (y / t));
double tmp;
if (z <= -1e+168) {
tmp = x - a;
} else if (z <= -1.2e-55) {
tmp = x + (y * (a / z));
} else if (z <= -1.02e-90) {
tmp = t_1;
} else if (z <= -2.05e-175) {
tmp = x - (a * y);
} else if (z <= 2e+104) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (a * (y / t))
if (z <= (-1d+168)) then
tmp = x - a
else if (z <= (-1.2d-55)) then
tmp = x + (y * (a / z))
else if (z <= (-1.02d-90)) then
tmp = t_1
else if (z <= (-2.05d-175)) then
tmp = x - (a * y)
else if (z <= 2d+104) then
tmp = t_1
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 t_1 = x - (a * (y / t));
double tmp;
if (z <= -1e+168) {
tmp = x - a;
} else if (z <= -1.2e-55) {
tmp = x + (y * (a / z));
} else if (z <= -1.02e-90) {
tmp = t_1;
} else if (z <= -2.05e-175) {
tmp = x - (a * y);
} else if (z <= 2e+104) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * (y / t)) tmp = 0 if z <= -1e+168: tmp = x - a elif z <= -1.2e-55: tmp = x + (y * (a / z)) elif z <= -1.02e-90: tmp = t_1 elif z <= -2.05e-175: tmp = x - (a * y) elif z <= 2e+104: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(y / t))) tmp = 0.0 if (z <= -1e+168) tmp = Float64(x - a); elseif (z <= -1.2e-55) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= -1.02e-90) tmp = t_1; elseif (z <= -2.05e-175) tmp = Float64(x - Float64(a * y)); elseif (z <= 2e+104) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * (y / t)); tmp = 0.0; if (z <= -1e+168) tmp = x - a; elseif (z <= -1.2e-55) tmp = x + (y * (a / z)); elseif (z <= -1.02e-90) tmp = t_1; elseif (z <= -2.05e-175) tmp = x - (a * y); elseif (z <= 2e+104) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+168], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.2e-55], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.02e-90], t$95$1, If[LessEqual[z, -2.05e-175], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+104], t$95$1, N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+168}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-55}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-175}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -9.9999999999999993e167 or 2e104 < z Initial program 94.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 92.8%
if -9.9999999999999993e167 < z < -1.19999999999999996e-55Initial program 97.8%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in y around inf 72.6%
Taylor expanded in z around inf 59.9%
associate-*r/59.9%
neg-mul-159.9%
Simplified59.9%
distribute-frac-neg59.9%
distribute-lft-neg-out59.9%
add-sqr-sqrt17.2%
sqrt-unprod45.7%
sqr-neg45.7%
sqrt-unprod30.4%
add-sqr-sqrt43.0%
associate-*l/42.9%
associate-/l*43.0%
add-sqr-sqrt30.4%
sqrt-unprod45.7%
sqr-neg45.7%
sqrt-unprod17.2%
add-sqr-sqrt60.0%
Applied egg-rr60.0%
if -1.19999999999999996e-55 < z < -1.02e-90 or -2.04999999999999999e-175 < z < 2e104Initial program 97.4%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 91.3%
Taylor expanded in t around inf 83.2%
if -1.02e-90 < z < -2.04999999999999999e-175Initial program 99.8%
Taylor expanded in t around 0 79.6%
Taylor expanded in z around 0 74.5%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+100)
(- x a)
(if (<= z -1.32e+57)
(+ x (/ a (/ t (- z y))))
(if (<= z -1.55e+34)
(+ x (* y (/ a z)))
(if (<= z 9.6e+105) (+ x (* a (/ y (- -1.0 t)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -1.32e+57) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -1.55e+34) {
tmp = x + (y * (a / z));
} else if (z <= 9.6e+105) {
tmp = x + (a * (y / (-1.0 - t)));
} 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 <= (-1.45d+100)) then
tmp = x - a
else if (z <= (-1.32d+57)) then
tmp = x + (a / (t / (z - y)))
else if (z <= (-1.55d+34)) then
tmp = x + (y * (a / z))
else if (z <= 9.6d+105) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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 <= -1.45e+100) {
tmp = x - a;
} else if (z <= -1.32e+57) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -1.55e+34) {
tmp = x + (y * (a / z));
} else if (z <= 9.6e+105) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+100: tmp = x - a elif z <= -1.32e+57: tmp = x + (a / (t / (z - y))) elif z <= -1.55e+34: tmp = x + (y * (a / z)) elif z <= 9.6e+105: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+100) tmp = Float64(x - a); elseif (z <= -1.32e+57) tmp = Float64(x + Float64(a / Float64(t / Float64(z - y)))); elseif (z <= -1.55e+34) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 9.6e+105) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+100) tmp = x - a; elseif (z <= -1.32e+57) tmp = x + (a / (t / (z - y))); elseif (z <= -1.55e+34) tmp = x + (y * (a / z)); elseif (z <= 9.6e+105) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+100], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.32e+57], N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e+34], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+105], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{+57}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+34}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+105}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45e100 or 9.599999999999999e105 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -1.45e100 < z < -1.32000000000000001e57Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 76.8%
if -1.32000000000000001e57 < z < -1.54999999999999989e34Initial program 99.7%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in y around inf 70.0%
Taylor expanded in z around inf 70.4%
associate-*r/70.4%
neg-mul-170.4%
Simplified70.4%
distribute-frac-neg70.4%
distribute-lft-neg-out70.4%
add-sqr-sqrt10.1%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod42.1%
add-sqr-sqrt51.8%
associate-*l/51.8%
associate-/l*51.8%
add-sqr-sqrt42.1%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod10.1%
add-sqr-sqrt70.5%
Applied egg-rr70.5%
if -1.54999999999999989e34 < z < 9.599999999999999e105Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 86.4%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+100)
(- x a)
(if (<= z -2.75e+57)
(- x (/ (- y z) (/ t a)))
(if (<= z -5e+33)
(+ x (* y (/ a z)))
(if (<= z 2.25e+104) (+ x (* a (/ y (- -1.0 t)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -2.75e+57) {
tmp = x - ((y - z) / (t / a));
} else if (z <= -5e+33) {
tmp = x + (y * (a / z));
} else if (z <= 2.25e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} 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 <= (-1.45d+100)) then
tmp = x - a
else if (z <= (-2.75d+57)) then
tmp = x - ((y - z) / (t / a))
else if (z <= (-5d+33)) then
tmp = x + (y * (a / z))
else if (z <= 2.25d+104) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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 <= -1.45e+100) {
tmp = x - a;
} else if (z <= -2.75e+57) {
tmp = x - ((y - z) / (t / a));
} else if (z <= -5e+33) {
tmp = x + (y * (a / z));
} else if (z <= 2.25e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+100: tmp = x - a elif z <= -2.75e+57: tmp = x - ((y - z) / (t / a)) elif z <= -5e+33: tmp = x + (y * (a / z)) elif z <= 2.25e+104: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+100) tmp = Float64(x - a); elseif (z <= -2.75e+57) tmp = Float64(x - Float64(Float64(y - z) / Float64(t / a))); elseif (z <= -5e+33) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 2.25e+104) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+100) tmp = x - a; elseif (z <= -2.75e+57) tmp = x - ((y - z) / (t / a)); elseif (z <= -5e+33) tmp = x + (y * (a / z)); elseif (z <= 2.25e+104) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+100], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.75e+57], N[(x - N[(N[(y - z), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e+33], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+104], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{+57}:\\
\;\;\;\;x - \frac{y - z}{\frac{t}{a}}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+33}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+104}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45e100 or 2.2499999999999999e104 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -1.45e100 < z < -2.7500000000000001e57Initial program 100.0%
Taylor expanded in t around inf 77.0%
if -2.7500000000000001e57 < z < -4.99999999999999973e33Initial program 99.7%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in y around inf 70.0%
Taylor expanded in z around inf 70.4%
associate-*r/70.4%
neg-mul-170.4%
Simplified70.4%
distribute-frac-neg70.4%
distribute-lft-neg-out70.4%
add-sqr-sqrt10.1%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod42.1%
add-sqr-sqrt51.8%
associate-*l/51.8%
associate-/l*51.8%
add-sqr-sqrt42.1%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod10.1%
add-sqr-sqrt70.5%
Applied egg-rr70.5%
if -4.99999999999999973e33 < z < 2.2499999999999999e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 86.4%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e+46) (not (<= y 7.5e+26))) (- x (* a (/ y (- (+ t 1.0) z)))) (- x (* a (/ z (+ -1.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+46) || !(y <= 7.5e+26)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x - (a * (z / (-1.0 + (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) :: tmp
if ((y <= (-1.5d+46)) .or. (.not. (y <= 7.5d+26))) then
tmp = x - (a * (y / ((t + 1.0d0) - z)))
else
tmp = x - (a * (z / ((-1.0d0) + (z - t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+46) || !(y <= 7.5e+26)) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x - (a * (z / (-1.0 + (z - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e+46) or not (y <= 7.5e+26): tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x - (a * (z / (-1.0 + (z - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e+46) || !(y <= 7.5e+26)) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x - Float64(a * Float64(z / Float64(-1.0 + Float64(z - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e+46) || ~((y <= 7.5e+26))) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x - (a * (z / (-1.0 + (z - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e+46], N[Not[LessEqual[y, 7.5e+26]], $MachinePrecision]], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+46} \lor \neg \left(y \leq 7.5 \cdot 10^{+26}\right):\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{-1 + \left(z - t\right)}\\
\end{array}
\end{array}
if y < -1.50000000000000012e46 or 7.49999999999999941e26 < y Initial program 95.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 87.8%
if -1.50000000000000012e46 < y < 7.49999999999999941e26Initial program 97.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 92.6%
mul-1-neg92.6%
associate--l+92.6%
+-commutative92.6%
distribute-neg-frac292.6%
+-commutative92.6%
distribute-neg-in92.6%
metadata-eval92.6%
unsub-neg92.6%
Simplified92.6%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.9e+24)
(+ x (/ a (/ z (- y z))))
(if (<= z 2e+104)
(- x (* a (/ y (- (+ t 1.0) z))))
(+ x (* a (/ (- y z) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+24) {
tmp = x + (a / (z / (y - z)));
} else if (z <= 2e+104) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x + (a * ((y - z) / 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 (z <= (-3.9d+24)) then
tmp = x + (a / (z / (y - z)))
else if (z <= 2d+104) then
tmp = x - (a * (y / ((t + 1.0d0) - z)))
else
tmp = x + (a * ((y - z) / z))
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+24) {
tmp = x + (a / (z / (y - z)));
} else if (z <= 2e+104) {
tmp = x - (a * (y / ((t + 1.0) - z)));
} else {
tmp = x + (a * ((y - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e+24: tmp = x + (a / (z / (y - z))) elif z <= 2e+104: tmp = x - (a * (y / ((t + 1.0) - z))) else: tmp = x + (a * ((y - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e+24) tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); elseif (z <= 2e+104) tmp = Float64(x - Float64(a * Float64(y / Float64(Float64(t + 1.0) - z)))); else tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e+24) tmp = x + (a / (z / (y - z))); elseif (z <= 2e+104) tmp = x - (a * (y / ((t + 1.0) - z))); else tmp = x + (a * ((y - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+24], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+104], N[(x - N[(a * N[(y / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+104}:\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\end{array}
\end{array}
if z < -3.8999999999999998e24Initial program 93.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
Simplified84.6%
if -3.8999999999999998e24 < z < 2e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 90.1%
if 2e104 < z Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.9%
mul-1-neg97.9%
Simplified97.9%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.5e+93) (not (<= z 1.04e+108))) (- x a) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e+93) || !(z <= 1.04e+108)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - 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) :: tmp
if ((z <= (-5.5d+93)) .or. (.not. (z <= 1.04d+108))) then
tmp = x - a
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e+93) || !(z <= 1.04e+108)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.5e+93) or not (z <= 1.04e+108): tmp = x - a else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.5e+93) || !(z <= 1.04e+108)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.5e+93) || ~((z <= 1.04e+108))) tmp = x - a; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.5e+93], N[Not[LessEqual[z, 1.04e+108]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+93} \lor \neg \left(z \leq 1.04 \cdot 10^{+108}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -5.5000000000000003e93 or 1.04e108 < z Initial program 94.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.8%
if -5.5000000000000003e93 < z < 1.04e108Initial program 97.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 82.9%
Final simplification83.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+22) (not (<= z 2.5e+104))) (+ x (* a (/ (- y z) z))) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+22) || !(z <= 2.5e+104)) {
tmp = x + (a * ((y - z) / z));
} else {
tmp = x + (a * (y / (-1.0 - 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) :: tmp
if ((z <= (-8d+22)) .or. (.not. (z <= 2.5d+104))) then
tmp = x + (a * ((y - z) / z))
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+22) || !(z <= 2.5e+104)) {
tmp = x + (a * ((y - z) / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+22) or not (z <= 2.5e+104): tmp = x + (a * ((y - z) / z)) else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+22) || !(z <= 2.5e+104)) tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e+22) || ~((z <= 2.5e+104))) tmp = x + (a * ((y - z) / z)); else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+22], N[Not[LessEqual[z, 2.5e+104]], $MachinePrecision]], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+22} \lor \neg \left(z \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -8e22 or 2.4999999999999998e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 89.4%
mul-1-neg89.4%
Simplified89.4%
if -8e22 < z < 2.4999999999999998e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 87.0%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.5e+30) (+ x (/ a (/ z (- y z)))) (if (<= z 2e+104) (+ x (* a (/ y (- -1.0 t)))) (+ x (* a (/ (- y z) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+30) {
tmp = x + (a / (z / (y - z)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a * ((y - z) / 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 (z <= (-2.5d+30)) then
tmp = x + (a / (z / (y - z)))
else if (z <= 2d+104) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x + (a * ((y - z) / z))
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.5e+30) {
tmp = x + (a / (z / (y - z)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x + (a * ((y - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+30: tmp = x + (a / (z / (y - z))) elif z <= 2e+104: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x + (a * ((y - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+30) tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); elseif (z <= 2e+104) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(a * Float64(Float64(y - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+30) tmp = x + (a / (z / (y - z))); elseif (z <= 2e+104) tmp = x + (a * (y / (-1.0 - t))); else tmp = x + (a * ((y - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+30], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+104], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+30}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+104}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\
\end{array}
\end{array}
if z < -2.4999999999999999e30Initial program 93.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
Simplified84.6%
if -2.4999999999999999e30 < z < 2e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 87.0%
if 2e104 < z Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.9%
mul-1-neg97.9%
Simplified97.9%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.3e+31) (not (<= z 8.6e+105))) (- x a) (- x (* a (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.3e+31) || !(z <= 8.6e+105)) {
tmp = x - a;
} else {
tmp = x - (a * (y / 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) :: tmp
if ((z <= (-4.3d+31)) .or. (.not. (z <= 8.6d+105))) then
tmp = x - a
else
tmp = x - (a * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.3e+31) || !(z <= 8.6e+105)) {
tmp = x - a;
} else {
tmp = x - (a * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.3e+31) or not (z <= 8.6e+105): tmp = x - a else: tmp = x - (a * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.3e+31) || !(z <= 8.6e+105)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.3e+31) || ~((z <= 8.6e+105))) tmp = x - a; else tmp = x - (a * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.3e+31], N[Not[LessEqual[z, 8.6e+105]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+31} \lor \neg \left(z \leq 8.6 \cdot 10^{+105}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -4.29999999999999989e31 or 8.6000000000000003e105 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
if -4.29999999999999989e31 < z < 8.6000000000000003e105Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 90.1%
Taylor expanded in t around inf 78.4%
Final simplification78.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5e+17) (not (<= z 2.9e+97))) (- x a) (- x (* a y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5e+17) || !(z <= 2.9e+97)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
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 <= (-5d+17)) .or. (.not. (z <= 2.9d+97))) then
tmp = x - a
else
tmp = x - (a * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5e+17) || !(z <= 2.9e+97)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5e+17) or not (z <= 2.9e+97): tmp = x - a else: tmp = x - (a * y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5e+17) || !(z <= 2.9e+97)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5e+17) || ~((z <= 2.9e+97))) tmp = x - a; else tmp = x - (a * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5e+17], N[Not[LessEqual[z, 2.9e+97]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+17} \lor \neg \left(z \leq 2.9 \cdot 10^{+97}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot y\\
\end{array}
\end{array}
if z < -5e17 or 2.89999999999999987e97 < z Initial program 96.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -5e17 < z < 2.89999999999999987e97Initial program 97.2%
Taylor expanded in t around 0 67.7%
Taylor expanded in z around 0 65.5%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.2e+15) (not (<= z 1.3e+105))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.2e+15) || !(z <= 1.3e+105)) {
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 ((z <= (-6.2d+15)) .or. (.not. (z <= 1.3d+105))) 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 ((z <= -6.2e+15) || !(z <= 1.3e+105)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.2e+15) or not (z <= 1.3e+105): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.2e+15) || !(z <= 1.3e+105)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.2e+15) || ~((z <= 1.3e+105))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.2e+15], N[Not[LessEqual[z, 1.3e+105]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+15} \lor \neg \left(z \leq 1.3 \cdot 10^{+105}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.2e15 or 1.3000000000000001e105 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -6.2e15 < z < 1.3000000000000001e105Initial program 97.3%
Taylor expanded in t around inf 78.9%
Taylor expanded in x around inf 57.1%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (- x (* (/ a (+ -1.0 (- z t))) (- z y))))
double code(double x, double y, double z, double t, double a) {
return x - ((a / (-1.0 + (z - t))) * (z - y));
}
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 - ((a / ((-1.0d0) + (z - t))) * (z - y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((a / (-1.0 + (z - t))) * (z - y));
}
def code(x, y, z, t, a): return x - ((a / (-1.0 + (z - t))) * (z - y))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(a / Float64(-1.0 + Float64(z - t))) * Float64(z - y))) end
function tmp = code(x, y, z, t, a) tmp = x - ((a / (-1.0 + (z - t))) * (z - y)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(a / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{a}{-1 + \left(z - t\right)} \cdot \left(z - y\right)
\end{array}
Initial program 96.7%
clear-num96.7%
associate-/r/96.7%
clear-num97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (+ -1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
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 + (a * ((y - z) / ((-1.0d0) + (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 + (z - t))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 + (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\right)}
\end{array}
Initial program 96.7%
associate-/r/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.3e+161) (not (<= a 1.05e+153))) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.3e+161) || !(a <= 1.05e+153)) {
tmp = -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 ((a <= (-3.3d+161)) .or. (.not. (a <= 1.05d+153))) then
tmp = -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 ((a <= -3.3e+161) || !(a <= 1.05e+153)) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.3e+161) or not (a <= 1.05e+153): tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.3e+161) || !(a <= 1.05e+153)) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.3e+161) || ~((a <= 1.05e+153))) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.3e+161], N[Not[LessEqual[a, 1.05e+153]], $MachinePrecision]], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+161} \lor \neg \left(a \leq 1.05 \cdot 10^{+153}\right):\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.29999999999999997e161 or 1.05000000000000008e153 < a Initial program 99.8%
Taylor expanded in t around 0 70.0%
Taylor expanded in x around 0 28.1%
mul-1-neg28.1%
associate-*r/60.1%
distribute-rgt-neg-in60.1%
distribute-neg-frac260.1%
Simplified60.1%
Taylor expanded in z around inf 32.2%
neg-mul-132.2%
Simplified32.2%
if -3.29999999999999997e161 < a < 1.05000000000000008e153Initial program 95.5%
Taylor expanded in t around inf 63.8%
Taylor expanded in x around inf 67.5%
Final simplification58.0%
(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%
Taylor expanded in t around inf 60.7%
Taylor expanded in x around inf 53.2%
Final simplification53.2%
(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 2024055
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))