
(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 17 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 (/ (- y z) (- -1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - z))));
}
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) - (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - z))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 - (t - z))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 - Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 - (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 - \left(t - z\right)}
\end{array}
Initial program 96.1%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (- z y)))))
(if (<= z -1.15e+54)
(- x a)
(if (<= z -0.09)
(- x (* y (/ a t)))
(if (<= z -1.95e-264)
t_1
(if (<= z 2.8e-296)
(/ a (/ (- -1.0 t) y))
(if (<= z 2.15e+16) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z - y));
double tmp;
if (z <= -1.15e+54) {
tmp = x - a;
} else if (z <= -0.09) {
tmp = x - (y * (a / t));
} else if (z <= -1.95e-264) {
tmp = t_1;
} else if (z <= 2.8e-296) {
tmp = a / ((-1.0 - t) / y);
} else if (z <= 2.15e+16) {
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 * (z - y))
if (z <= (-1.15d+54)) then
tmp = x - a
else if (z <= (-0.09d0)) then
tmp = x - (y * (a / t))
else if (z <= (-1.95d-264)) then
tmp = t_1
else if (z <= 2.8d-296) then
tmp = a / (((-1.0d0) - t) / y)
else if (z <= 2.15d+16) 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 * (z - y));
double tmp;
if (z <= -1.15e+54) {
tmp = x - a;
} else if (z <= -0.09) {
tmp = x - (y * (a / t));
} else if (z <= -1.95e-264) {
tmp = t_1;
} else if (z <= 2.8e-296) {
tmp = a / ((-1.0 - t) / y);
} else if (z <= 2.15e+16) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z - y)) tmp = 0 if z <= -1.15e+54: tmp = x - a elif z <= -0.09: tmp = x - (y * (a / t)) elif z <= -1.95e-264: tmp = t_1 elif z <= 2.8e-296: tmp = a / ((-1.0 - t) / y) elif z <= 2.15e+16: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z - y))) tmp = 0.0 if (z <= -1.15e+54) tmp = Float64(x - a); elseif (z <= -0.09) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= -1.95e-264) tmp = t_1; elseif (z <= 2.8e-296) tmp = Float64(a / Float64(Float64(-1.0 - t) / y)); elseif (z <= 2.15e+16) 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 * (z - y)); tmp = 0.0; if (z <= -1.15e+54) tmp = x - a; elseif (z <= -0.09) tmp = x - (y * (a / t)); elseif (z <= -1.95e-264) tmp = t_1; elseif (z <= 2.8e-296) tmp = a / ((-1.0 - t) / y); elseif (z <= 2.15e+16) 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[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+54], N[(x - a), $MachinePrecision], If[LessEqual[z, -0.09], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e-264], t$95$1, If[LessEqual[z, 2.8e-296], N[(a / N[(N[(-1.0 - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+16], t$95$1, N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+54}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -0.09:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-296}:\\
\;\;\;\;\frac{a}{\frac{-1 - t}{y}}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.14999999999999997e54 or 2.15e16 < z Initial program 91.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -1.14999999999999997e54 < z < -0.089999999999999997Initial program 99.9%
Taylor expanded in t around inf 67.5%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-*r/75.9%
Simplified75.9%
if -0.089999999999999997 < z < -1.9499999999999999e-264 or 2.7999999999999999e-296 < z < 2.15e16Initial program 99.0%
Taylor expanded in z around 0 98.4%
Taylor expanded in t around 0 74.8%
if -1.9499999999999999e-264 < z < 2.7999999999999999e-296Initial program 99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
associate-/l*82.8%
distribute-rgt-neg-in82.8%
distribute-neg-frac282.8%
distribute-neg-in82.8%
metadata-eval82.8%
unsub-neg82.8%
Simplified82.8%
clear-num82.9%
un-div-inv83.2%
Applied egg-rr83.2%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (- z y)))))
(if (<= z -2.2e+53)
(- x a)
(if (<= z -0.065)
(- x (* y (/ a t)))
(if (<= z -6.2e-266)
t_1
(if (<= z 4e-295)
(* a (/ y (- -1.0 t)))
(if (<= z 2.15e+16) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z - y));
double tmp;
if (z <= -2.2e+53) {
tmp = x - a;
} else if (z <= -0.065) {
tmp = x - (y * (a / t));
} else if (z <= -6.2e-266) {
tmp = t_1;
} else if (z <= 4e-295) {
tmp = a * (y / (-1.0 - t));
} else if (z <= 2.15e+16) {
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 * (z - y))
if (z <= (-2.2d+53)) then
tmp = x - a
else if (z <= (-0.065d0)) then
tmp = x - (y * (a / t))
else if (z <= (-6.2d-266)) then
tmp = t_1
else if (z <= 4d-295) then
tmp = a * (y / ((-1.0d0) - t))
else if (z <= 2.15d+16) 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 * (z - y));
double tmp;
if (z <= -2.2e+53) {
tmp = x - a;
} else if (z <= -0.065) {
tmp = x - (y * (a / t));
} else if (z <= -6.2e-266) {
tmp = t_1;
} else if (z <= 4e-295) {
tmp = a * (y / (-1.0 - t));
} else if (z <= 2.15e+16) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z - y)) tmp = 0 if z <= -2.2e+53: tmp = x - a elif z <= -0.065: tmp = x - (y * (a / t)) elif z <= -6.2e-266: tmp = t_1 elif z <= 4e-295: tmp = a * (y / (-1.0 - t)) elif z <= 2.15e+16: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z - y))) tmp = 0.0 if (z <= -2.2e+53) tmp = Float64(x - a); elseif (z <= -0.065) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= -6.2e-266) tmp = t_1; elseif (z <= 4e-295) tmp = Float64(a * Float64(y / Float64(-1.0 - t))); elseif (z <= 2.15e+16) 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 * (z - y)); tmp = 0.0; if (z <= -2.2e+53) tmp = x - a; elseif (z <= -0.065) tmp = x - (y * (a / t)); elseif (z <= -6.2e-266) tmp = t_1; elseif (z <= 4e-295) tmp = a * (y / (-1.0 - t)); elseif (z <= 2.15e+16) 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[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+53], N[(x - a), $MachinePrecision], If[LessEqual[z, -0.065], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-266], t$95$1, If[LessEqual[z, 4e-295], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+16], t$95$1, N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+53}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -0.065:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-295}:\\
\;\;\;\;a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.19999999999999999e53 or 2.15e16 < z Initial program 91.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -2.19999999999999999e53 < z < -0.065000000000000002Initial program 99.9%
Taylor expanded in t around inf 67.5%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-*r/75.9%
Simplified75.9%
if -0.065000000000000002 < z < -6.1999999999999999e-266 or 4.00000000000000024e-295 < z < 2.15e16Initial program 99.0%
Taylor expanded in z around 0 98.4%
Taylor expanded in t around 0 74.8%
if -6.1999999999999999e-266 < z < 4.00000000000000024e-295Initial program 99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
associate-/l*82.8%
distribute-rgt-neg-in82.8%
distribute-neg-frac282.8%
distribute-neg-in82.8%
metadata-eval82.8%
unsub-neg82.8%
Simplified82.8%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (/ y (- -1.0 t)))))
(if (<= z -4.4e-184)
(- x a)
(if (<= z 2.9e-279)
t_1
(if (<= z 4e-148)
x
(if (<= z 4.1e-74)
t_1
(if (<= z 2e+34) (+ x (* a (/ z t))) (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * (y / (-1.0 - t));
double tmp;
if (z <= -4.4e-184) {
tmp = x - a;
} else if (z <= 2.9e-279) {
tmp = t_1;
} else if (z <= 4e-148) {
tmp = x;
} else if (z <= 4.1e-74) {
tmp = t_1;
} else if (z <= 2e+34) {
tmp = x + (a * (z / 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) :: t_1
real(8) :: tmp
t_1 = a * (y / ((-1.0d0) - t))
if (z <= (-4.4d-184)) then
tmp = x - a
else if (z <= 2.9d-279) then
tmp = t_1
else if (z <= 4d-148) then
tmp = x
else if (z <= 4.1d-74) then
tmp = t_1
else if (z <= 2d+34) then
tmp = x + (a * (z / 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 t_1 = a * (y / (-1.0 - t));
double tmp;
if (z <= -4.4e-184) {
tmp = x - a;
} else if (z <= 2.9e-279) {
tmp = t_1;
} else if (z <= 4e-148) {
tmp = x;
} else if (z <= 4.1e-74) {
tmp = t_1;
} else if (z <= 2e+34) {
tmp = x + (a * (z / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * (y / (-1.0 - t)) tmp = 0 if z <= -4.4e-184: tmp = x - a elif z <= 2.9e-279: tmp = t_1 elif z <= 4e-148: tmp = x elif z <= 4.1e-74: tmp = t_1 elif z <= 2e+34: tmp = x + (a * (z / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(a * Float64(y / Float64(-1.0 - t))) tmp = 0.0 if (z <= -4.4e-184) tmp = Float64(x - a); elseif (z <= 2.9e-279) tmp = t_1; elseif (z <= 4e-148) tmp = x; elseif (z <= 4.1e-74) tmp = t_1; elseif (z <= 2e+34) tmp = Float64(x + Float64(a * Float64(z / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * (y / (-1.0 - t)); tmp = 0.0; if (z <= -4.4e-184) tmp = x - a; elseif (z <= 2.9e-279) tmp = t_1; elseif (z <= 4e-148) tmp = x; elseif (z <= 4.1e-74) tmp = t_1; elseif (z <= 2e+34) tmp = x + (a * (z / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e-184], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.9e-279], t$95$1, If[LessEqual[z, 4e-148], x, If[LessEqual[z, 4.1e-74], t$95$1, If[LessEqual[z, 2e+34], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y}{-1 - t}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{-184}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-148}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+34}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.39999999999999984e-184 or 1.99999999999999989e34 < z Initial program 93.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 72.2%
if -4.39999999999999984e-184 < z < 2.9e-279 or 3.99999999999999974e-148 < z < 4.10000000000000032e-74Initial program 98.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
distribute-neg-frac268.0%
distribute-neg-in68.0%
metadata-eval68.0%
unsub-neg68.0%
Simplified68.0%
if 2.9e-279 < z < 3.99999999999999974e-148Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around inf 64.7%
if 4.10000000000000032e-74 < z < 1.99999999999999989e34Initial program 99.8%
Taylor expanded in t around inf 61.7%
Taylor expanded in y around 0 68.6%
sub-neg68.6%
mul-1-neg68.6%
remove-double-neg68.6%
associate-/l*68.6%
Simplified68.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (/ y (- -1.0 t)))))
(if (<= z -3.05e-183)
(- x a)
(if (<= z 4.2e-279)
t_1
(if (<= z 2.2e-146)
x
(if (<= z 5.3e-74) t_1 (if (<= z 1.7e+36) x (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * (y / (-1.0 - t));
double tmp;
if (z <= -3.05e-183) {
tmp = x - a;
} else if (z <= 4.2e-279) {
tmp = t_1;
} else if (z <= 2.2e-146) {
tmp = x;
} else if (z <= 5.3e-74) {
tmp = t_1;
} else if (z <= 1.7e+36) {
tmp = x;
} 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 = a * (y / ((-1.0d0) - t))
if (z <= (-3.05d-183)) then
tmp = x - a
else if (z <= 4.2d-279) then
tmp = t_1
else if (z <= 2.2d-146) then
tmp = x
else if (z <= 5.3d-74) then
tmp = t_1
else if (z <= 1.7d+36) then
tmp = x
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 = a * (y / (-1.0 - t));
double tmp;
if (z <= -3.05e-183) {
tmp = x - a;
} else if (z <= 4.2e-279) {
tmp = t_1;
} else if (z <= 2.2e-146) {
tmp = x;
} else if (z <= 5.3e-74) {
tmp = t_1;
} else if (z <= 1.7e+36) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * (y / (-1.0 - t)) tmp = 0 if z <= -3.05e-183: tmp = x - a elif z <= 4.2e-279: tmp = t_1 elif z <= 2.2e-146: tmp = x elif z <= 5.3e-74: tmp = t_1 elif z <= 1.7e+36: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(a * Float64(y / Float64(-1.0 - t))) tmp = 0.0 if (z <= -3.05e-183) tmp = Float64(x - a); elseif (z <= 4.2e-279) tmp = t_1; elseif (z <= 2.2e-146) tmp = x; elseif (z <= 5.3e-74) tmp = t_1; elseif (z <= 1.7e+36) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * (y / (-1.0 - t)); tmp = 0.0; if (z <= -3.05e-183) tmp = x - a; elseif (z <= 4.2e-279) tmp = t_1; elseif (z <= 2.2e-146) tmp = x; elseif (z <= 5.3e-74) tmp = t_1; elseif (z <= 1.7e+36) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.05e-183], N[(x - a), $MachinePrecision], If[LessEqual[z, 4.2e-279], t$95$1, If[LessEqual[z, 2.2e-146], x, If[LessEqual[z, 5.3e-74], t$95$1, If[LessEqual[z, 1.7e+36], x, N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y}{-1 - t}\\
\mathbf{if}\;z \leq -3.05 \cdot 10^{-183}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-146}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.0500000000000001e-183 or 1.6999999999999999e36 < z Initial program 93.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 72.2%
if -3.0500000000000001e-183 < z < 4.20000000000000011e-279 or 2.2e-146 < z < 5.29999999999999987e-74Initial program 98.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in y around inf 56.8%
mul-1-neg56.8%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
distribute-neg-frac268.0%
distribute-neg-in68.0%
metadata-eval68.0%
unsub-neg68.0%
Simplified68.0%
if 4.20000000000000011e-279 < z < 2.2e-146 or 5.29999999999999987e-74 < z < 1.6999999999999999e36Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (- z y)))))
(if (<= z -460.0)
(- x a)
(if (<= z -6.2e-266)
t_1
(if (<= z 1.7e-295)
(* a (/ y (- -1.0 t)))
(if (<= z 2.15e+16) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * (z - y));
double tmp;
if (z <= -460.0) {
tmp = x - a;
} else if (z <= -6.2e-266) {
tmp = t_1;
} else if (z <= 1.7e-295) {
tmp = a * (y / (-1.0 - t));
} else if (z <= 2.15e+16) {
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 * (z - y))
if (z <= (-460.0d0)) then
tmp = x - a
else if (z <= (-6.2d-266)) then
tmp = t_1
else if (z <= 1.7d-295) then
tmp = a * (y / ((-1.0d0) - t))
else if (z <= 2.15d+16) 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 * (z - y));
double tmp;
if (z <= -460.0) {
tmp = x - a;
} else if (z <= -6.2e-266) {
tmp = t_1;
} else if (z <= 1.7e-295) {
tmp = a * (y / (-1.0 - t));
} else if (z <= 2.15e+16) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * (z - y)) tmp = 0 if z <= -460.0: tmp = x - a elif z <= -6.2e-266: tmp = t_1 elif z <= 1.7e-295: tmp = a * (y / (-1.0 - t)) elif z <= 2.15e+16: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(z - y))) tmp = 0.0 if (z <= -460.0) tmp = Float64(x - a); elseif (z <= -6.2e-266) tmp = t_1; elseif (z <= 1.7e-295) tmp = Float64(a * Float64(y / Float64(-1.0 - t))); elseif (z <= 2.15e+16) 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 * (z - y)); tmp = 0.0; if (z <= -460.0) tmp = x - a; elseif (z <= -6.2e-266) tmp = t_1; elseif (z <= 1.7e-295) tmp = a * (y / (-1.0 - t)); elseif (z <= 2.15e+16) 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[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -460.0], N[(x - a), $MachinePrecision], If[LessEqual[z, -6.2e-266], t$95$1, If[LessEqual[z, 1.7e-295], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+16], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -460:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-295}:\\
\;\;\;\;a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -460 or 2.15e16 < z Initial program 92.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.8%
if -460 < z < -6.1999999999999999e-266 or 1.70000000000000004e-295 < z < 2.15e16Initial program 99.0%
Taylor expanded in z around 0 98.5%
Taylor expanded in t around 0 73.0%
if -6.1999999999999999e-266 < z < 1.70000000000000004e-295Initial program 99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around inf 52.4%
mul-1-neg52.4%
associate-/l*82.8%
distribute-rgt-neg-in82.8%
distribute-neg-frac282.8%
distribute-neg-in82.8%
metadata-eval82.8%
unsub-neg82.8%
Simplified82.8%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.25e+17)
(+ x (/ (- y z) (/ z a)))
(if (<= z 3.7e-27)
(+ x (/ a (/ (- -1.0 t) y)))
(if (<= z 7.5e+156) (+ x (/ (* z a) (- t (+ z -1.0)))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e+17) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 3.7e-27) {
tmp = x + (a / ((-1.0 - t) / y));
} else if (z <= 7.5e+156) {
tmp = x + ((z * a) / (t - (z + -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 <= (-1.25d+17)) then
tmp = x + ((y - z) / (z / a))
else if (z <= 3.7d-27) then
tmp = x + (a / (((-1.0d0) - t) / y))
else if (z <= 7.5d+156) then
tmp = x + ((z * a) / (t - (z + (-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 <= -1.25e+17) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 3.7e-27) {
tmp = x + (a / ((-1.0 - t) / y));
} else if (z <= 7.5e+156) {
tmp = x + ((z * a) / (t - (z + -1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.25e+17: tmp = x + ((y - z) / (z / a)) elif z <= 3.7e-27: tmp = x + (a / ((-1.0 - t) / y)) elif z <= 7.5e+156: tmp = x + ((z * a) / (t - (z + -1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e+17) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); elseif (z <= 3.7e-27) tmp = Float64(x + Float64(a / Float64(Float64(-1.0 - t) / y))); elseif (z <= 7.5e+156) tmp = Float64(x + Float64(Float64(z * a) / Float64(t - Float64(z + -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 <= -1.25e+17) tmp = x + ((y - z) / (z / a)); elseif (z <= 3.7e-27) tmp = x + (a / ((-1.0 - t) / y)); elseif (z <= 7.5e+156) tmp = x + ((z * a) / (t - (z + -1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+17], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-27], N[(x + N[(a / N[(N[(-1.0 - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+156], N[(x + N[(N[(z * a), $MachinePrecision] / N[(t - N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+17}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-27}:\\
\;\;\;\;x + \frac{a}{\frac{-1 - t}{y}}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+156}:\\
\;\;\;\;x + \frac{z \cdot a}{t - \left(z + -1\right)}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.25e17Initial program 93.5%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
distribute-neg-frac84.6%
Simplified84.6%
if -1.25e17 < z < 3.70000000000000029e-27Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 95.6%
if 3.70000000000000029e-27 < z < 7.50000000000000026e156Initial program 92.2%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 85.4%
sub-neg85.4%
mul-1-neg85.4%
remove-double-neg85.4%
associate--l+85.4%
+-commutative85.4%
associate-+l-85.4%
sub-neg85.4%
metadata-eval85.4%
Simplified85.4%
if 7.50000000000000026e156 < z Initial program 92.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 89.6%
Final simplification90.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e+17)
(- x a)
(if (<= z -2.1e-265)
x
(if (<= z 1e-297) (* y (/ (- a) t)) (if (<= z 1.3e+37) x (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+17) {
tmp = x - a;
} else if (z <= -2.1e-265) {
tmp = x;
} else if (z <= 1e-297) {
tmp = y * (-a / t);
} else if (z <= 1.3e+37) {
tmp = x;
} 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.2d+17)) then
tmp = x - a
else if (z <= (-2.1d-265)) then
tmp = x
else if (z <= 1d-297) then
tmp = y * (-a / t)
else if (z <= 1.3d+37) then
tmp = x
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.2e+17) {
tmp = x - a;
} else if (z <= -2.1e-265) {
tmp = x;
} else if (z <= 1e-297) {
tmp = y * (-a / t);
} else if (z <= 1.3e+37) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+17: tmp = x - a elif z <= -2.1e-265: tmp = x elif z <= 1e-297: tmp = y * (-a / t) elif z <= 1.3e+37: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+17) tmp = Float64(x - a); elseif (z <= -2.1e-265) tmp = x; elseif (z <= 1e-297) tmp = Float64(y * Float64(Float64(-a) / t)); elseif (z <= 1.3e+37) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+17) tmp = x - a; elseif (z <= -2.1e-265) tmp = x; elseif (z <= 1e-297) tmp = y * (-a / t); elseif (z <= 1.3e+37) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+17], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.1e-265], x, If[LessEqual[z, 1e-297], N[(y * N[((-a) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+37], x, N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+17}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-265}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 10^{-297}:\\
\;\;\;\;y \cdot \frac{-a}{t}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.2e17 or 1.3e37 < z Initial program 91.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -1.2e17 < z < -2.10000000000000004e-265 or 1.00000000000000004e-297 < z < 1.3e37Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 52.7%
if -2.10000000000000004e-265 < z < 1.00000000000000004e-297Initial program 99.8%
Taylor expanded in t around inf 64.1%
Taylor expanded in y around inf 31.8%
*-commutative31.8%
associate-*r/64.0%
Simplified64.0%
Taylor expanded in x around 0 23.6%
mul-1-neg23.6%
*-commutative23.6%
associate-*r/55.9%
*-commutative55.9%
distribute-rgt-neg-in55.9%
Simplified55.9%
Final simplification64.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e+16)
(- x a)
(if (<= z -2.2e-265)
x
(if (<= z 3.45e-299) (* a (/ y (- t))) (if (<= z 1.3e+37) x (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+16) {
tmp = x - a;
} else if (z <= -2.2e-265) {
tmp = x;
} else if (z <= 3.45e-299) {
tmp = a * (y / -t);
} else if (z <= 1.3e+37) {
tmp = x;
} 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 <= (-6.8d+16)) then
tmp = x - a
else if (z <= (-2.2d-265)) then
tmp = x
else if (z <= 3.45d-299) then
tmp = a * (y / -t)
else if (z <= 1.3d+37) then
tmp = x
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 <= -6.8e+16) {
tmp = x - a;
} else if (z <= -2.2e-265) {
tmp = x;
} else if (z <= 3.45e-299) {
tmp = a * (y / -t);
} else if (z <= 1.3e+37) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e+16: tmp = x - a elif z <= -2.2e-265: tmp = x elif z <= 3.45e-299: tmp = a * (y / -t) elif z <= 1.3e+37: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+16) tmp = Float64(x - a); elseif (z <= -2.2e-265) tmp = x; elseif (z <= 3.45e-299) tmp = Float64(a * Float64(y / Float64(-t))); elseif (z <= 1.3e+37) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e+16) tmp = x - a; elseif (z <= -2.2e-265) tmp = x; elseif (z <= 3.45e-299) tmp = a * (y / -t); elseif (z <= 1.3e+37) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+16], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.2e-265], x, If[LessEqual[z, 3.45e-299], N[(a * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+37], x, N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-265}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{-299}:\\
\;\;\;\;a \cdot \frac{y}{-t}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.8e16 or 1.3e37 < z Initial program 91.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -6.8e16 < z < -2.2000000000000001e-265 or 3.4500000000000001e-299 < z < 1.3e37Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 52.7%
if -2.2000000000000001e-265 < z < 3.4500000000000001e-299Initial program 99.8%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in y around inf 54.6%
mul-1-neg54.6%
associate-/l*86.5%
distribute-rgt-neg-in86.5%
associate--l+86.5%
+-commutative86.5%
distribute-neg-frac286.5%
+-commutative86.5%
distribute-neg-in86.5%
metadata-eval86.5%
unsub-neg86.5%
Simplified86.5%
Taylor expanded in t around inf 55.6%
associate-*r/55.6%
neg-mul-155.6%
Simplified55.6%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e+16)
(- x a)
(if (<= z -2.45e-194)
x
(if (<= z 9e-306) (* y (- a)) (if (<= z 1.85e+34) x (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+16) {
tmp = x - a;
} else if (z <= -2.45e-194) {
tmp = x;
} else if (z <= 9e-306) {
tmp = y * -a;
} else if (z <= 1.85e+34) {
tmp = x;
} 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 <= (-6.8d+16)) then
tmp = x - a
else if (z <= (-2.45d-194)) then
tmp = x
else if (z <= 9d-306) then
tmp = y * -a
else if (z <= 1.85d+34) then
tmp = x
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 <= -6.8e+16) {
tmp = x - a;
} else if (z <= -2.45e-194) {
tmp = x;
} else if (z <= 9e-306) {
tmp = y * -a;
} else if (z <= 1.85e+34) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e+16: tmp = x - a elif z <= -2.45e-194: tmp = x elif z <= 9e-306: tmp = y * -a elif z <= 1.85e+34: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+16) tmp = Float64(x - a); elseif (z <= -2.45e-194) tmp = x; elseif (z <= 9e-306) tmp = Float64(y * Float64(-a)); elseif (z <= 1.85e+34) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e+16) tmp = x - a; elseif (z <= -2.45e-194) tmp = x; elseif (z <= 9e-306) tmp = y * -a; elseif (z <= 1.85e+34) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+16], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.45e-194], x, If[LessEqual[z, 9e-306], N[(y * (-a)), $MachinePrecision], If[LessEqual[z, 1.85e+34], x, N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+16}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-194}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \left(-a\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.8e16 or 1.85000000000000004e34 < z Initial program 91.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -6.8e16 < z < -2.45000000000000002e-194 or 9.00000000000000009e-306 < z < 1.85000000000000004e34Initial program 99.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 53.6%
if -2.45000000000000002e-194 < z < 9.00000000000000009e-306Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around inf 59.2%
mul-1-neg59.2%
associate-/l*76.4%
distribute-rgt-neg-in76.4%
distribute-neg-frac276.4%
distribute-neg-in76.4%
metadata-eval76.4%
unsub-neg76.4%
Simplified76.4%
Taylor expanded in t around 0 45.6%
neg-mul-145.6%
distribute-rgt-neg-in45.6%
Simplified45.6%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+31) (+ x (/ (- y z) (/ z a))) (if (<= z 7e+42) (+ x (/ (- y z) (/ (- -1.0 t) a))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+31) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 7e+42) {
tmp = x + ((y - z) / ((-1.0 - t) / 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.8d+31)) then
tmp = x + ((y - z) / (z / a))
else if (z <= 7d+42) then
tmp = x + ((y - z) / (((-1.0d0) - t) / 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.8e+31) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 7e+42) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+31: tmp = x + ((y - z) / (z / a)) elif z <= 7e+42: tmp = x + ((y - z) / ((-1.0 - t) / a)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+31) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); elseif (z <= 7e+42) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / 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.8e+31) tmp = x + ((y - z) / (z / a)); elseif (z <= 7e+42) tmp = x + ((y - z) / ((-1.0 - t) / a)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+31], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+42], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+31}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.8000000000000001e31Initial program 93.0%
Taylor expanded in z around inf 85.1%
mul-1-neg85.1%
distribute-neg-frac85.1%
Simplified85.1%
if -3.8000000000000001e31 < z < 7.00000000000000047e42Initial program 99.2%
Taylor expanded in z around 0 96.3%
if 7.00000000000000047e42 < z Initial program 88.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.3%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e+52) (not (<= z 3.2e+76))) (- x a) (+ x (/ a (/ (- -1.0 t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+52) || !(z <= 3.2e+76)) {
tmp = x - a;
} else {
tmp = x + (a / ((-1.0 - 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) :: tmp
if ((z <= (-8.5d+52)) .or. (.not. (z <= 3.2d+76))) then
tmp = x - a
else
tmp = x + (a / (((-1.0d0) - t) / 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 <= -8.5e+52) || !(z <= 3.2e+76)) {
tmp = x - a;
} else {
tmp = x + (a / ((-1.0 - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+52) or not (z <= 3.2e+76): tmp = x - a else: tmp = x + (a / ((-1.0 - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+52) || !(z <= 3.2e+76)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a / Float64(Float64(-1.0 - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.5e+52) || ~((z <= 3.2e+76))) tmp = x - a; else tmp = x + (a / ((-1.0 - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+52], N[Not[LessEqual[z, 3.2e+76]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a / N[(N[(-1.0 - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+52} \lor \neg \left(z \leq 3.2 \cdot 10^{+76}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{-1 - t}{y}}\\
\end{array}
\end{array}
if z < -8.49999999999999994e52 or 3.19999999999999976e76 < z Initial program 90.3%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 85.2%
if -8.49999999999999994e52 < z < 3.19999999999999976e76Initial program 99.3%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 90.1%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.5e+16) (+ x (/ (- y z) (/ z a))) (if (<= z 6.9e+72) (+ x (/ a (/ (- -1.0 t) y))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+16) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 6.9e+72) {
tmp = x + (a / ((-1.0 - t) / y));
} 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 <= (-8.5d+16)) then
tmp = x + ((y - z) / (z / a))
else if (z <= 6.9d+72) then
tmp = x + (a / (((-1.0d0) - t) / y))
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 <= -8.5e+16) {
tmp = x + ((y - z) / (z / a));
} else if (z <= 6.9e+72) {
tmp = x + (a / ((-1.0 - t) / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e+16: tmp = x + ((y - z) / (z / a)) elif z <= 6.9e+72: tmp = x + (a / ((-1.0 - t) / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+16) tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); elseif (z <= 6.9e+72) tmp = Float64(x + Float64(a / Float64(Float64(-1.0 - t) / y))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e+16) tmp = x + ((y - z) / (z / a)); elseif (z <= 6.9e+72) tmp = x + (a / ((-1.0 - t) / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+16], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.9e+72], N[(x + N[(a / N[(N[(-1.0 - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{+72}:\\
\;\;\;\;x + \frac{a}{\frac{-1 - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.5e16Initial program 93.5%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
distribute-neg-frac84.6%
Simplified84.6%
if -8.5e16 < z < 6.90000000000000034e72Initial program 99.2%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 91.5%
if 6.90000000000000034e72 < z Initial program 86.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.4%
Final simplification88.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+18) (not (<= z 1.35e+34))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+18) || !(z <= 1.35e+34)) {
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 <= (-1.7d+18)) .or. (.not. (z <= 1.35d+34))) 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 <= -1.7e+18) || !(z <= 1.35e+34)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+18) or not (z <= 1.35e+34): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+18) || !(z <= 1.35e+34)) 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 <= -1.7e+18) || ~((z <= 1.35e+34))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+18], N[Not[LessEqual[z, 1.35e+34]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+18} \lor \neg \left(z \leq 1.35 \cdot 10^{+34}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.7e18 or 1.35e34 < z Initial program 91.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 81.2%
if -1.7e18 < z < 1.35e34Initial program 99.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around inf 47.3%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (- x (* (/ a (- -1.0 (- t z))) (- z y))))
double code(double x, double y, double z, double t, double a) {
return x - ((a / (-1.0 - (t - z))) * (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) - (t - z))) * (z - y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((a / (-1.0 - (t - z))) * (z - y));
}
def code(x, y, z, t, a): return x - ((a / (-1.0 - (t - z))) * (z - y))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(a / Float64(-1.0 - Float64(t - z))) * Float64(z - y))) end
function tmp = code(x, y, z, t, a) tmp = x - ((a / (-1.0 - (t - z))) * (z - y)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(a / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{a}{-1 - \left(t - z\right)} \cdot \left(z - y\right)
\end{array}
Initial program 96.1%
clear-num96.0%
associate-/r/96.0%
clear-num96.5%
Applied egg-rr96.5%
Final simplification96.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.75e+100) (not (<= a 5.2e+180))) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.75e+100) || !(a <= 5.2e+180)) {
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 <= (-2.75d+100)) .or. (.not. (a <= 5.2d+180))) 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 <= -2.75e+100) || !(a <= 5.2e+180)) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.75e+100) or not (a <= 5.2e+180): tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.75e+100) || !(a <= 5.2e+180)) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.75e+100) || ~((a <= 5.2e+180))) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.75e+100], N[Not[LessEqual[a, 5.2e+180]], $MachinePrecision]], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{+100} \lor \neg \left(a \leq 5.2 \cdot 10^{+180}\right):\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.7500000000000001e100 or 5.20000000000000042e180 < a Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in x around 0 48.7%
mul-1-neg48.7%
associate--l+48.7%
+-commutative48.7%
associate-*r/85.3%
distribute-rgt-neg-in85.3%
distribute-neg-frac285.3%
+-commutative85.3%
distribute-neg-in85.3%
metadata-eval85.3%
unsub-neg85.3%
Simplified85.3%
Taylor expanded in z around inf 31.8%
neg-mul-131.8%
Simplified31.8%
if -2.7500000000000001e100 < a < 5.20000000000000042e180Initial program 94.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 59.5%
Final simplification51.8%
(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.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 47.5%
(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 2024085
(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))))