
(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 (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 97.3%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -5e+113)
(- x a)
(if (<= z -4.3e+39)
(+ x (* a (/ z t)))
(if (<= z -0.0034)
(- x a)
(if (<= z -1.9e-144)
t_1
(if (<= z -2.8e-264)
(- x (* a (/ y t)))
(if (<= z 8.2e-8) t_1 (- x a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -5e+113) {
tmp = x - a;
} else if (z <= -4.3e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0034) {
tmp = x - a;
} else if (z <= -1.9e-144) {
tmp = t_1;
} else if (z <= -2.8e-264) {
tmp = x - (a * (y / t));
} else if (z <= 8.2e-8) {
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 - (y * a)
if (z <= (-5d+113)) then
tmp = x - a
else if (z <= (-4.3d+39)) then
tmp = x + (a * (z / t))
else if (z <= (-0.0034d0)) then
tmp = x - a
else if (z <= (-1.9d-144)) then
tmp = t_1
else if (z <= (-2.8d-264)) then
tmp = x - (a * (y / t))
else if (z <= 8.2d-8) 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 - (y * a);
double tmp;
if (z <= -5e+113) {
tmp = x - a;
} else if (z <= -4.3e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0034) {
tmp = x - a;
} else if (z <= -1.9e-144) {
tmp = t_1;
} else if (z <= -2.8e-264) {
tmp = x - (a * (y / t));
} else if (z <= 8.2e-8) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -5e+113: tmp = x - a elif z <= -4.3e+39: tmp = x + (a * (z / t)) elif z <= -0.0034: tmp = x - a elif z <= -1.9e-144: tmp = t_1 elif z <= -2.8e-264: tmp = x - (a * (y / t)) elif z <= 8.2e-8: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -5e+113) tmp = Float64(x - a); elseif (z <= -4.3e+39) tmp = Float64(x + Float64(a * Float64(z / t))); elseif (z <= -0.0034) tmp = Float64(x - a); elseif (z <= -1.9e-144) tmp = t_1; elseif (z <= -2.8e-264) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 8.2e-8) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -5e+113) tmp = x - a; elseif (z <= -4.3e+39) tmp = x + (a * (z / t)); elseif (z <= -0.0034) tmp = x - a; elseif (z <= -1.9e-144) tmp = t_1; elseif (z <= -2.8e-264) tmp = x - (a * (y / t)); elseif (z <= 8.2e-8) 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[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+113], N[(x - a), $MachinePrecision], If[LessEqual[z, -4.3e+39], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0034], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.9e-144], t$95$1, If[LessEqual[z, -2.8e-264], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-8], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -5 \cdot 10^{+113}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{+39}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq -0.0034:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-264}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5e113 or -4.3e39 < z < -0.00339999999999999981 or 8.20000000000000063e-8 < z Initial program 95.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 86.4%
if -5e113 < z < -4.3e39Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 72.4%
Taylor expanded in y around 0 79.5%
neg-mul-179.5%
distribute-neg-frac79.5%
Simplified79.5%
if -0.00339999999999999981 < z < -1.89999999999999996e-144 or -2.80000000000000012e-264 < z < 8.20000000000000063e-8Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
associate-/r/98.7%
div-inv98.7%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 83.1%
Taylor expanded in z around 0 81.3%
if -1.89999999999999996e-144 < z < -2.80000000000000012e-264Initial program 100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around inf 87.8%
Taylor expanded in y around inf 87.8%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ (- 1.0 z) z)))))
(if (<= t -2.05e+172)
(- x (* a (/ y t)))
(if (<= t -4.2e-226)
t_1
(if (<= t 1e-148)
(- x (* y a))
(if (<= t 1.95e+96) t_1 (- x (/ a (/ t y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((1.0 - z) / z));
double tmp;
if (t <= -2.05e+172) {
tmp = x - (a * (y / t));
} else if (t <= -4.2e-226) {
tmp = t_1;
} else if (t <= 1e-148) {
tmp = x - (y * a);
} else if (t <= 1.95e+96) {
tmp = t_1;
} else {
tmp = x - (a / (t / 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) :: t_1
real(8) :: tmp
t_1 = x + (a / ((1.0d0 - z) / z))
if (t <= (-2.05d+172)) then
tmp = x - (a * (y / t))
else if (t <= (-4.2d-226)) then
tmp = t_1
else if (t <= 1d-148) then
tmp = x - (y * a)
else if (t <= 1.95d+96) then
tmp = t_1
else
tmp = x - (a / (t / y))
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 / ((1.0 - z) / z));
double tmp;
if (t <= -2.05e+172) {
tmp = x - (a * (y / t));
} else if (t <= -4.2e-226) {
tmp = t_1;
} else if (t <= 1e-148) {
tmp = x - (y * a);
} else if (t <= 1.95e+96) {
tmp = t_1;
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / ((1.0 - z) / z)) tmp = 0 if t <= -2.05e+172: tmp = x - (a * (y / t)) elif t <= -4.2e-226: tmp = t_1 elif t <= 1e-148: tmp = x - (y * a) elif t <= 1.95e+96: tmp = t_1 else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(Float64(1.0 - z) / z))) tmp = 0.0 if (t <= -2.05e+172) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (t <= -4.2e-226) tmp = t_1; elseif (t <= 1e-148) tmp = Float64(x - Float64(y * a)); elseif (t <= 1.95e+96) tmp = t_1; else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / ((1.0 - z) / z)); tmp = 0.0; if (t <= -2.05e+172) tmp = x - (a * (y / t)); elseif (t <= -4.2e-226) tmp = t_1; elseif (t <= 1e-148) tmp = x - (y * a); elseif (t <= 1.95e+96) tmp = t_1; else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(N[(1.0 - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e+172], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-226], t$95$1, If[LessEqual[t, 1e-148], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+96], t$95$1, N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{1 - z}{z}}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+172}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-148}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -2.05e172Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in y around inf 83.3%
if -2.05e172 < t < -4.2000000000000003e-226 or 9.99999999999999936e-149 < t < 1.95e96Initial program 98.5%
associate-/r/99.9%
Simplified99.9%
associate-/r/98.5%
div-inv98.5%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 94.4%
Taylor expanded in y around 0 81.1%
sub-neg81.1%
mul-1-neg81.1%
remove-double-neg81.1%
associate-/l*87.2%
Simplified87.2%
if -4.2000000000000003e-226 < t < 9.99999999999999936e-149Initial program 94.0%
associate-/r/99.9%
Simplified99.9%
associate-/r/94.0%
div-inv93.9%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in z around 0 72.2%
if 1.95e96 < t Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 90.9%
Taylor expanded in y around inf 83.7%
associate-/l*85.8%
Simplified85.8%
Final simplification83.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+113)
(- x a)
(if (<= z -2.8e+39)
(+ x (* a (/ z t)))
(if (<= z -0.0029)
(+ x (* z (/ a (- 1.0 z))))
(if (<= z 7.6e+63) (- x (* a (/ y (+ t 1.0)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+113) {
tmp = x - a;
} else if (z <= -2.8e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0029) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 7.6e+63) {
tmp = x - (a * (y / (t + 1.0)));
} 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 <= (-5d+113)) then
tmp = x - a
else if (z <= (-2.8d+39)) then
tmp = x + (a * (z / t))
else if (z <= (-0.0029d0)) then
tmp = x + (z * (a / (1.0d0 - z)))
else if (z <= 7.6d+63) then
tmp = x - (a * (y / (t + 1.0d0)))
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 <= -5e+113) {
tmp = x - a;
} else if (z <= -2.8e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0029) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 7.6e+63) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e+113: tmp = x - a elif z <= -2.8e+39: tmp = x + (a * (z / t)) elif z <= -0.0029: tmp = x + (z * (a / (1.0 - z))) elif z <= 7.6e+63: tmp = x - (a * (y / (t + 1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+113) tmp = Float64(x - a); elseif (z <= -2.8e+39) tmp = Float64(x + Float64(a * Float64(z / t))); elseif (z <= -0.0029) tmp = Float64(x + Float64(z * Float64(a / Float64(1.0 - z)))); elseif (z <= 7.6e+63) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e+113) tmp = x - a; elseif (z <= -2.8e+39) tmp = x + (a * (z / t)); elseif (z <= -0.0029) tmp = x + (z * (a / (1.0 - z))); elseif (z <= 7.6e+63) tmp = x - (a * (y / (t + 1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+113], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.8e+39], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0029], N[(x + N[(z * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+63], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+113}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+39}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq -0.0029:\\
\;\;\;\;x + z \cdot \frac{a}{1 - z}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+63}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5e113 or 7.6000000000000002e63 < z Initial program 93.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 91.2%
if -5e113 < z < -2.80000000000000001e39Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 72.4%
Taylor expanded in y around 0 79.5%
neg-mul-179.5%
distribute-neg-frac79.5%
Simplified79.5%
if -2.80000000000000001e39 < z < -0.0029Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 92.0%
cancel-sign-sub-inv92.0%
metadata-eval92.0%
*-lft-identity92.0%
+-commutative92.0%
associate-/l*91.9%
associate-/r/92.0%
Simplified92.0%
if -0.0029 < z < 7.6000000000000002e63Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 91.9%
Final simplification90.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* y (/ a z)) a))))
(if (<= z -5.3e+91)
t_1
(if (<= z -1.05e+39)
(+ x (* a (/ z t)))
(if (<= z -0.0046)
(+ x (* z (/ a (- 1.0 z))))
(if (<= z 8.2e-8) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (a / z)) - a);
double tmp;
if (z <= -5.3e+91) {
tmp = t_1;
} else if (z <= -1.05e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0046) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
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 + ((y * (a / z)) - a)
if (z <= (-5.3d+91)) then
tmp = t_1
else if (z <= (-1.05d+39)) then
tmp = x + (a * (z / t))
else if (z <= (-0.0046d0)) then
tmp = x + (z * (a / (1.0d0 - z)))
else if (z <= 8.2d-8) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = t_1
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 / z)) - a);
double tmp;
if (z <= -5.3e+91) {
tmp = t_1;
} else if (z <= -1.05e+39) {
tmp = x + (a * (z / t));
} else if (z <= -0.0046) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (a / z)) - a) tmp = 0 if z <= -5.3e+91: tmp = t_1 elif z <= -1.05e+39: tmp = x + (a * (z / t)) elif z <= -0.0046: tmp = x + (z * (a / (1.0 - z))) elif z <= 8.2e-8: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(a / z)) - a)) tmp = 0.0 if (z <= -5.3e+91) tmp = t_1; elseif (z <= -1.05e+39) tmp = Float64(x + Float64(a * Float64(z / t))); elseif (z <= -0.0046) tmp = Float64(x + Float64(z * Float64(a / Float64(1.0 - z)))); elseif (z <= 8.2e-8) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (a / z)) - a); tmp = 0.0; if (z <= -5.3e+91) tmp = t_1; elseif (z <= -1.05e+39) tmp = x + (a * (z / t)); elseif (z <= -0.0046) tmp = x + (z * (a / (1.0 - z))); elseif (z <= 8.2e-8) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+91], t$95$1, If[LessEqual[z, -1.05e+39], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0046], N[(x + N[(z * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-8], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot \frac{a}{z} - a\right)\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+39}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq -0.0046:\\
\;\;\;\;x + z \cdot \frac{a}{1 - z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-8}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.29999999999999997e91 or 8.20000000000000063e-8 < z Initial program 94.7%
Taylor expanded in z around inf 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
Taylor expanded in y around 0 90.2%
mul-1-neg90.2%
unsub-neg90.2%
*-commutative90.2%
associate-*r/94.3%
Simplified94.3%
if -5.29999999999999997e91 < z < -1.0499999999999999e39Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.5%
Taylor expanded in y around 0 85.3%
neg-mul-185.3%
distribute-neg-frac85.3%
Simplified85.3%
if -1.0499999999999999e39 < z < -0.0045999999999999999Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 92.0%
cancel-sign-sub-inv92.0%
metadata-eval92.0%
*-lft-identity92.0%
+-commutative92.0%
associate-/l*91.9%
associate-/r/92.0%
Simplified92.0%
if -0.0045999999999999999 < z < 8.20000000000000063e-8Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* y (/ a z)) a))))
(if (<= z -5.3e+91)
t_1
(if (<= z -3.4e+39)
(- x (/ (- y z) (/ t a)))
(if (<= z -0.0054)
(+ x (* z (/ a (- 1.0 z))))
(if (<= z 8.2e-8) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * (a / z)) - a);
double tmp;
if (z <= -5.3e+91) {
tmp = t_1;
} else if (z <= -3.4e+39) {
tmp = x - ((y - z) / (t / a));
} else if (z <= -0.0054) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
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 + ((y * (a / z)) - a)
if (z <= (-5.3d+91)) then
tmp = t_1
else if (z <= (-3.4d+39)) then
tmp = x - ((y - z) / (t / a))
else if (z <= (-0.0054d0)) then
tmp = x + (z * (a / (1.0d0 - z)))
else if (z <= 8.2d-8) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = t_1
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 / z)) - a);
double tmp;
if (z <= -5.3e+91) {
tmp = t_1;
} else if (z <= -3.4e+39) {
tmp = x - ((y - z) / (t / a));
} else if (z <= -0.0054) {
tmp = x + (z * (a / (1.0 - z)));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * (a / z)) - a) tmp = 0 if z <= -5.3e+91: tmp = t_1 elif z <= -3.4e+39: tmp = x - ((y - z) / (t / a)) elif z <= -0.0054: tmp = x + (z * (a / (1.0 - z))) elif z <= 8.2e-8: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * Float64(a / z)) - a)) tmp = 0.0 if (z <= -5.3e+91) tmp = t_1; elseif (z <= -3.4e+39) tmp = Float64(x - Float64(Float64(y - z) / Float64(t / a))); elseif (z <= -0.0054) tmp = Float64(x + Float64(z * Float64(a / Float64(1.0 - z)))); elseif (z <= 8.2e-8) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * (a / z)) - a); tmp = 0.0; if (z <= -5.3e+91) tmp = t_1; elseif (z <= -3.4e+39) tmp = x - ((y - z) / (t / a)); elseif (z <= -0.0054) tmp = x + (z * (a / (1.0 - z))); elseif (z <= 8.2e-8) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+91], t$95$1, If[LessEqual[z, -3.4e+39], N[(x - N[(N[(y - z), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0054], N[(x + N[(z * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-8], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot \frac{a}{z} - a\right)\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{y - z}{\frac{t}{a}}\\
\mathbf{elif}\;z \leq -0.0054:\\
\;\;\;\;x + z \cdot \frac{a}{1 - z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-8}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.29999999999999997e91 or 8.20000000000000063e-8 < z Initial program 94.7%
Taylor expanded in z around inf 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
Taylor expanded in y around 0 90.2%
mul-1-neg90.2%
unsub-neg90.2%
*-commutative90.2%
associate-*r/94.3%
Simplified94.3%
if -5.29999999999999997e91 < z < -3.3999999999999999e39Initial program 99.9%
Taylor expanded in t around inf 87.5%
if -3.3999999999999999e39 < z < -0.0054000000000000003Initial program 99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in y around 0 92.0%
cancel-sign-sub-inv92.0%
metadata-eval92.0%
*-lft-identity92.0%
+-commutative92.0%
associate-/l*91.9%
associate-/r/92.0%
Simplified92.0%
if -0.0054000000000000003 < z < 8.20000000000000063e-8Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
Final simplification93.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9e+115) (not (<= t 4.2e+96))) (+ x (* a (/ (- z y) t))) (+ x (* a (/ (- z y) (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9e+115) || !(t <= 4.2e+96)) {
tmp = x + (a * ((z - y) / t));
} 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 <= (-9d+115)) .or. (.not. (t <= 4.2d+96))) then
tmp = x + (a * ((z - y) / t))
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 <= -9e+115) || !(t <= 4.2e+96)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x + (a * ((z - y) / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9e+115) or not (t <= 4.2e+96): tmp = x + (a * ((z - y) / t)) else: tmp = x + (a * ((z - y) / (1.0 - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9e+115) || !(t <= 4.2e+96)) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); 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 <= -9e+115) || ~((t <= 4.2e+96))) tmp = x + (a * ((z - y) / t)); else tmp = x + (a * ((z - y) / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9e+115], N[Not[LessEqual[t, 4.2e+96]], $MachinePrecision]], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $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 -9 \cdot 10^{+115} \lor \neg \left(t \leq 4.2 \cdot 10^{+96}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\end{array}
\end{array}
if t < -8.99999999999999927e115 or 4.2000000000000002e96 < t Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 94.5%
if -8.99999999999999927e115 < t < 4.2000000000000002e96Initial program 97.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 97.5%
Final simplification96.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -0.00058)
(- x a)
(if (<= z -1.4e-143)
t_1
(if (<= z -5.8e-263)
(- x (* a (/ y t)))
(if (<= z 8e-8) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -0.00058) {
tmp = x - a;
} else if (z <= -1.4e-143) {
tmp = t_1;
} else if (z <= -5.8e-263) {
tmp = x - (a * (y / t));
} else if (z <= 8e-8) {
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 - (y * a)
if (z <= (-0.00058d0)) then
tmp = x - a
else if (z <= (-1.4d-143)) then
tmp = t_1
else if (z <= (-5.8d-263)) then
tmp = x - (a * (y / t))
else if (z <= 8d-8) 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 - (y * a);
double tmp;
if (z <= -0.00058) {
tmp = x - a;
} else if (z <= -1.4e-143) {
tmp = t_1;
} else if (z <= -5.8e-263) {
tmp = x - (a * (y / t));
} else if (z <= 8e-8) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -0.00058: tmp = x - a elif z <= -1.4e-143: tmp = t_1 elif z <= -5.8e-263: tmp = x - (a * (y / t)) elif z <= 8e-8: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -0.00058) tmp = Float64(x - a); elseif (z <= -1.4e-143) tmp = t_1; elseif (z <= -5.8e-263) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 8e-8) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -0.00058) tmp = x - a; elseif (z <= -1.4e-143) tmp = t_1; elseif (z <= -5.8e-263) tmp = x - (a * (y / t)); elseif (z <= 8e-8) 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[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00058], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.4e-143], t$95$1, If[LessEqual[z, -5.8e-263], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-8], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -0.00058:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-263}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5.8e-4 or 8.0000000000000002e-8 < z Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.5%
if -5.8e-4 < z < -1.3999999999999999e-143 or -5.80000000000000007e-263 < z < 8.0000000000000002e-8Initial program 98.7%
associate-/r/99.9%
Simplified99.9%
associate-/r/98.7%
div-inv98.7%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 83.1%
Taylor expanded in z around 0 81.3%
if -1.3999999999999999e-143 < z < -5.80000000000000007e-263Initial program 100.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around inf 87.8%
Taylor expanded in y around inf 87.8%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.1e-7) (+ x (/ a (/ (- t (+ z -1.0)) z))) (if (<= z 8.2e-8) (- x (* a (/ y (+ t 1.0)))) (+ x (- (* y (/ a z)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e-7) {
tmp = x + (a / ((t - (z + -1.0)) / z));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x + ((y * (a / z)) - 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.1d-7)) then
tmp = x + (a / ((t - (z + (-1.0d0))) / z))
else if (z <= 8.2d-8) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = x + ((y * (a / z)) - 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.1e-7) {
tmp = x + (a / ((t - (z + -1.0)) / z));
} else if (z <= 8.2e-8) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x + ((y * (a / z)) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.1e-7: tmp = x + (a / ((t - (z + -1.0)) / z)) elif z <= 8.2e-8: tmp = x - (a * (y / (t + 1.0))) else: tmp = x + ((y * (a / z)) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e-7) tmp = Float64(x + Float64(a / Float64(Float64(t - Float64(z + -1.0)) / z))); elseif (z <= 8.2e-8) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = Float64(x + Float64(Float64(y * Float64(a / z)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.1e-7) tmp = x + (a / ((t - (z + -1.0)) / z)); elseif (z <= 8.2e-8) tmp = x - (a * (y / (t + 1.0))); else tmp = x + ((y * (a / z)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e-7], N[(x + N[(a / N[(N[(t - N[(z + -1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-8], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-7}:\\
\;\;\;\;x + \frac{a}{\frac{t - \left(z + -1\right)}{z}}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-8}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \frac{a}{z} - a\right)\\
\end{array}
\end{array}
if z < -1.1000000000000001e-7Initial program 97.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 80.7%
sub-neg80.7%
mul-1-neg80.7%
*-commutative80.7%
associate--l+80.7%
+-commutative80.7%
associate-*r/87.2%
remove-double-neg87.2%
associate-*r/80.7%
*-commutative80.7%
+-commutative80.7%
associate--l+80.7%
associate-/l*89.8%
associate--l+89.8%
+-commutative89.8%
associate-+l-89.8%
sub-neg89.8%
metadata-eval89.8%
+-commutative89.8%
Simplified89.8%
if -1.1000000000000001e-7 < z < 8.20000000000000063e-8Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.3%
if 8.20000000000000063e-8 < z Initial program 94.0%
Taylor expanded in z around inf 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
Taylor expanded in y around 0 87.7%
mul-1-neg87.7%
unsub-neg87.7%
*-commutative87.7%
associate-*r/92.1%
Simplified92.1%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.00132) (not (<= z 8.2e-8))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00132) || !(z <= 8.2e-8)) {
tmp = x - a;
} else {
tmp = x - (y * 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 <= (-0.00132d0)) .or. (.not. (z <= 8.2d-8))) then
tmp = x - a
else
tmp = x - (y * 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 <= -0.00132) || !(z <= 8.2e-8)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.00132) or not (z <= 8.2e-8): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.00132) || !(z <= 8.2e-8)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.00132) || ~((z <= 8.2e-8))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.00132], N[Not[LessEqual[z, 8.2e-8]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00132 \lor \neg \left(z \leq 8.2 \cdot 10^{-8}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -0.00132 or 8.20000000000000063e-8 < z Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.5%
if -0.00132 < z < 8.20000000000000063e-8Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
associate-/r/99.0%
div-inv99.0%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 80.8%
Taylor expanded in z around 0 79.5%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.35e-6) (not (<= z 2.3e+22))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.35e-6) || !(z <= 2.3e+22)) {
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 <= (-2.35d-6)) .or. (.not. (z <= 2.3d+22))) 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 <= -2.35e-6) || !(z <= 2.3e+22)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.35e-6) or not (z <= 2.3e+22): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.35e-6) || !(z <= 2.3e+22)) 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 <= -2.35e-6) || ~((z <= 2.3e+22))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.35e-6], N[Not[LessEqual[z, 2.3e+22]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{-6} \lor \neg \left(z \leq 2.3 \cdot 10^{+22}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.34999999999999995e-6 or 2.3000000000000002e22 < z Initial program 95.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -2.34999999999999995e-6 < z < 2.3000000000000002e22Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 67.4%
Final simplification75.3%
(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 97.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 62.3%
Final simplification62.3%
(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 2023310
(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))))