
(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 13 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 (- 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.5%
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 -2.8e+81)
(- x a)
(if (<= z -5.6e-27)
(+ x (/ (* y a) z))
(if (<= z -2.15e-120)
(- x (* y (/ a t)))
(if (<= z -6.8e-233)
t_1
(if (<= z 8e-260)
(- x (/ a (/ t y)))
(if (<= z 4.5e-82)
t_1
(if (<= z 51.0) (- x (/ y (/ t a))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -2.8e+81) {
tmp = x - a;
} else if (z <= -5.6e-27) {
tmp = x + ((y * a) / z);
} else if (z <= -2.15e-120) {
tmp = x - (y * (a / t));
} else if (z <= -6.8e-233) {
tmp = t_1;
} else if (z <= 8e-260) {
tmp = x - (a / (t / y));
} else if (z <= 4.5e-82) {
tmp = t_1;
} else if (z <= 51.0) {
tmp = x - (y / (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) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (z <= (-2.8d+81)) then
tmp = x - a
else if (z <= (-5.6d-27)) then
tmp = x + ((y * a) / z)
else if (z <= (-2.15d-120)) then
tmp = x - (y * (a / t))
else if (z <= (-6.8d-233)) then
tmp = t_1
else if (z <= 8d-260) then
tmp = x - (a / (t / y))
else if (z <= 4.5d-82) then
tmp = t_1
else if (z <= 51.0d0) then
tmp = x - (y / (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 t_1 = x - (y * a);
double tmp;
if (z <= -2.8e+81) {
tmp = x - a;
} else if (z <= -5.6e-27) {
tmp = x + ((y * a) / z);
} else if (z <= -2.15e-120) {
tmp = x - (y * (a / t));
} else if (z <= -6.8e-233) {
tmp = t_1;
} else if (z <= 8e-260) {
tmp = x - (a / (t / y));
} else if (z <= 4.5e-82) {
tmp = t_1;
} else if (z <= 51.0) {
tmp = x - (y / (t / a));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -2.8e+81: tmp = x - a elif z <= -5.6e-27: tmp = x + ((y * a) / z) elif z <= -2.15e-120: tmp = x - (y * (a / t)) elif z <= -6.8e-233: tmp = t_1 elif z <= 8e-260: tmp = x - (a / (t / y)) elif z <= 4.5e-82: tmp = t_1 elif z <= 51.0: tmp = x - (y / (t / a)) 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 <= -2.8e+81) tmp = Float64(x - a); elseif (z <= -5.6e-27) tmp = Float64(x + Float64(Float64(y * a) / z)); elseif (z <= -2.15e-120) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= -6.8e-233) tmp = t_1; elseif (z <= 8e-260) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (z <= 4.5e-82) tmp = t_1; elseif (z <= 51.0) tmp = Float64(x - Float64(y / Float64(t / a))); 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 <= -2.8e+81) tmp = x - a; elseif (z <= -5.6e-27) tmp = x + ((y * a) / z); elseif (z <= -2.15e-120) tmp = x - (y * (a / t)); elseif (z <= -6.8e-233) tmp = t_1; elseif (z <= 8e-260) tmp = x - (a / (t / y)); elseif (z <= 4.5e-82) tmp = t_1; elseif (z <= 51.0) tmp = x - (y / (t / a)); 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, -2.8e+81], N[(x - a), $MachinePrecision], If[LessEqual[z, -5.6e-27], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-120], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-233], t$95$1, If[LessEqual[z, 8e-260], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-82], t$95$1, If[LessEqual[z, 51.0], N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+81}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-27}:\\
\;\;\;\;x + \frac{y \cdot a}{z}\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-120}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-260}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 51:\\
\;\;\;\;x - \frac{y}{\frac{t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.79999999999999995e81 or 51 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -2.79999999999999995e81 < z < -5.5999999999999999e-27Initial program 100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
distribute-neg-frac269.9%
Simplified69.9%
Taylor expanded in y around inf 68.1%
mul-1-neg68.1%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
Simplified68.0%
sub-neg68.0%
distribute-rgt-neg-out68.0%
remove-double-neg68.0%
div-inv68.0%
associate-*r*68.0%
add-sqr-sqrt31.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod33.3%
add-sqr-sqrt42.8%
div-inv42.8%
add-sqr-sqrt33.3%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod31.0%
add-sqr-sqrt68.1%
*-commutative68.1%
Applied egg-rr68.1%
if -5.5999999999999999e-27 < z < -2.14999999999999991e-120Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 72.6%
Taylor expanded in y around inf 68.4%
*-commutative68.4%
clear-num68.3%
un-div-inv68.3%
Applied egg-rr68.3%
associate-/r/68.4%
Simplified68.4%
if -2.14999999999999991e-120 < z < -6.8000000000000004e-233 or 7.99999999999999969e-260 < z < 4.4999999999999998e-82Initial program 98.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.0%
*-commutative94.0%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in t around 0 88.0%
if -6.8000000000000004e-233 < z < 7.99999999999999969e-260Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in y around inf 99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
if 4.4999999999999998e-82 < z < 51Initial program 100.0%
associate-+l-100.0%
div-sub100.0%
sub-neg100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 90.1%
Taylor expanded in t around inf 90.0%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -3e+84)
(- x a)
(if (<= z -3.7e-25)
(+ x (/ (* y a) z))
(if (<= z -2.65e-117)
(- x (* y (/ a t)))
(if (<= z -1.65e-232)
t_1
(if (<= z 1.35e-260)
(- x (/ a (/ t y)))
(if (<= z 4.7e-82)
t_1
(if (<= z 8.5) (- x (* a (/ y t))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -3e+84) {
tmp = x - a;
} else if (z <= -3.7e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -2.65e-117) {
tmp = x - (y * (a / t));
} else if (z <= -1.65e-232) {
tmp = t_1;
} else if (z <= 1.35e-260) {
tmp = x - (a / (t / y));
} else if (z <= 4.7e-82) {
tmp = t_1;
} else if (z <= 8.5) {
tmp = x - (a * (y / 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 = x - (y * a)
if (z <= (-3d+84)) then
tmp = x - a
else if (z <= (-3.7d-25)) then
tmp = x + ((y * a) / z)
else if (z <= (-2.65d-117)) then
tmp = x - (y * (a / t))
else if (z <= (-1.65d-232)) then
tmp = t_1
else if (z <= 1.35d-260) then
tmp = x - (a / (t / y))
else if (z <= 4.7d-82) then
tmp = t_1
else if (z <= 8.5d0) then
tmp = x - (a * (y / 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 = x - (y * a);
double tmp;
if (z <= -3e+84) {
tmp = x - a;
} else if (z <= -3.7e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -2.65e-117) {
tmp = x - (y * (a / t));
} else if (z <= -1.65e-232) {
tmp = t_1;
} else if (z <= 1.35e-260) {
tmp = x - (a / (t / y));
} else if (z <= 4.7e-82) {
tmp = t_1;
} else if (z <= 8.5) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -3e+84: tmp = x - a elif z <= -3.7e-25: tmp = x + ((y * a) / z) elif z <= -2.65e-117: tmp = x - (y * (a / t)) elif z <= -1.65e-232: tmp = t_1 elif z <= 1.35e-260: tmp = x - (a / (t / y)) elif z <= 4.7e-82: tmp = t_1 elif z <= 8.5: tmp = x - (a * (y / t)) 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 <= -3e+84) tmp = Float64(x - a); elseif (z <= -3.7e-25) tmp = Float64(x + Float64(Float64(y * a) / z)); elseif (z <= -2.65e-117) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= -1.65e-232) tmp = t_1; elseif (z <= 1.35e-260) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (z <= 4.7e-82) tmp = t_1; elseif (z <= 8.5) tmp = Float64(x - Float64(a * Float64(y / t))); 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 <= -3e+84) tmp = x - a; elseif (z <= -3.7e-25) tmp = x + ((y * a) / z); elseif (z <= -2.65e-117) tmp = x - (y * (a / t)); elseif (z <= -1.65e-232) tmp = t_1; elseif (z <= 1.35e-260) tmp = x - (a / (t / y)); elseif (z <= 4.7e-82) tmp = t_1; elseif (z <= 8.5) tmp = x - (a * (y / t)); 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, -3e+84], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.7e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-117], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-232], t$95$1, If[LessEqual[z, 1.35e-260], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-82], t$95$1, If[LessEqual[z, 8.5], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -3 \cdot 10^{+84}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y \cdot a}{z}\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-260}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.99999999999999996e84 or 8.5 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -2.99999999999999996e84 < z < -3.70000000000000009e-25Initial program 100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
distribute-neg-frac269.9%
Simplified69.9%
Taylor expanded in y around inf 68.1%
mul-1-neg68.1%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
Simplified68.0%
sub-neg68.0%
distribute-rgt-neg-out68.0%
remove-double-neg68.0%
div-inv68.0%
associate-*r*68.0%
add-sqr-sqrt31.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod33.3%
add-sqr-sqrt42.8%
div-inv42.8%
add-sqr-sqrt33.3%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod31.0%
add-sqr-sqrt68.1%
*-commutative68.1%
Applied egg-rr68.1%
if -3.70000000000000009e-25 < z < -2.64999999999999993e-117Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 72.6%
Taylor expanded in y around inf 68.4%
*-commutative68.4%
clear-num68.3%
un-div-inv68.3%
Applied egg-rr68.3%
associate-/r/68.4%
Simplified68.4%
if -2.64999999999999993e-117 < z < -1.64999999999999993e-232 or 1.35000000000000003e-260 < z < 4.7000000000000001e-82Initial program 98.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.0%
*-commutative94.0%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in t around 0 88.0%
if -1.64999999999999993e-232 < z < 1.35000000000000003e-260Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in y around inf 99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
if 4.7000000000000001e-82 < z < 8.5Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 94.8%
Taylor expanded in y around inf 89.9%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ a t)))) (t_2 (- x (* y a))))
(if (<= z -8.2e+83)
(- x a)
(if (<= z -3.8e-25)
(+ x (/ (* y a) z))
(if (<= z -2.65e-117)
t_1
(if (<= z -1.25e-263)
t_2
(if (<= z 1.36e-260)
t_1
(if (<= z 1.55e-85)
t_2
(if (<= z 210.0) (- x (* a (/ y t))) (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (a / t));
double t_2 = x - (y * a);
double tmp;
if (z <= -8.2e+83) {
tmp = x - a;
} else if (z <= -3.8e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -2.65e-117) {
tmp = t_1;
} else if (z <= -1.25e-263) {
tmp = t_2;
} else if (z <= 1.36e-260) {
tmp = t_1;
} else if (z <= 1.55e-85) {
tmp = t_2;
} else if (z <= 210.0) {
tmp = x - (a * (y / 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) :: t_2
real(8) :: tmp
t_1 = x - (y * (a / t))
t_2 = x - (y * a)
if (z <= (-8.2d+83)) then
tmp = x - a
else if (z <= (-3.8d-25)) then
tmp = x + ((y * a) / z)
else if (z <= (-2.65d-117)) then
tmp = t_1
else if (z <= (-1.25d-263)) then
tmp = t_2
else if (z <= 1.36d-260) then
tmp = t_1
else if (z <= 1.55d-85) then
tmp = t_2
else if (z <= 210.0d0) then
tmp = x - (a * (y / 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 = x - (y * (a / t));
double t_2 = x - (y * a);
double tmp;
if (z <= -8.2e+83) {
tmp = x - a;
} else if (z <= -3.8e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -2.65e-117) {
tmp = t_1;
} else if (z <= -1.25e-263) {
tmp = t_2;
} else if (z <= 1.36e-260) {
tmp = t_1;
} else if (z <= 1.55e-85) {
tmp = t_2;
} else if (z <= 210.0) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (a / t)) t_2 = x - (y * a) tmp = 0 if z <= -8.2e+83: tmp = x - a elif z <= -3.8e-25: tmp = x + ((y * a) / z) elif z <= -2.65e-117: tmp = t_1 elif z <= -1.25e-263: tmp = t_2 elif z <= 1.36e-260: tmp = t_1 elif z <= 1.55e-85: tmp = t_2 elif z <= 210.0: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(a / t))) t_2 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -8.2e+83) tmp = Float64(x - a); elseif (z <= -3.8e-25) tmp = Float64(x + Float64(Float64(y * a) / z)); elseif (z <= -2.65e-117) tmp = t_1; elseif (z <= -1.25e-263) tmp = t_2; elseif (z <= 1.36e-260) tmp = t_1; elseif (z <= 1.55e-85) tmp = t_2; elseif (z <= 210.0) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (a / t)); t_2 = x - (y * a); tmp = 0.0; if (z <= -8.2e+83) tmp = x - a; elseif (z <= -3.8e-25) tmp = x + ((y * a) / z); elseif (z <= -2.65e-117) tmp = t_1; elseif (z <= -1.25e-263) tmp = t_2; elseif (z <= 1.36e-260) tmp = t_1; elseif (z <= 1.55e-85) tmp = t_2; elseif (z <= 210.0) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+83], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.8e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-117], t$95$1, If[LessEqual[z, -1.25e-263], t$95$2, If[LessEqual[z, 1.36e-260], t$95$1, If[LessEqual[z, 1.55e-85], t$95$2, If[LessEqual[z, 210.0], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
t_2 := x - y \cdot a\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+83}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y \cdot a}{z}\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 210:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.2000000000000002e83 or 210 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -8.2000000000000002e83 < z < -3.7999999999999998e-25Initial program 100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
distribute-neg-frac269.9%
Simplified69.9%
Taylor expanded in y around inf 68.1%
mul-1-neg68.1%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
Simplified68.0%
sub-neg68.0%
distribute-rgt-neg-out68.0%
remove-double-neg68.0%
div-inv68.0%
associate-*r*68.0%
add-sqr-sqrt31.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod33.3%
add-sqr-sqrt42.8%
div-inv42.8%
add-sqr-sqrt33.3%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod31.0%
add-sqr-sqrt68.1%
*-commutative68.1%
Applied egg-rr68.1%
if -3.7999999999999998e-25 < z < -2.64999999999999993e-117 or -1.25000000000000002e-263 < z < 1.36e-260Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 79.2%
*-commutative79.2%
clear-num79.1%
un-div-inv79.2%
Applied egg-rr79.2%
associate-/r/79.2%
Simplified79.2%
if -2.64999999999999993e-117 < z < -1.25000000000000002e-263 or 1.36e-260 < z < 1.5500000000000001e-85Initial program 98.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.4%
*-commutative94.4%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in t around 0 88.7%
if 1.5500000000000001e-85 < z < 210Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 94.8%
Taylor expanded in y around inf 89.9%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ a t)))) (t_2 (- x (* y a))))
(if (<= z -2.05e+83)
(- x a)
(if (<= z -1.55e-25)
(+ x (/ (* y a) z))
(if (<= z -3.5e-118)
t_1
(if (<= z -1.52e-263)
t_2
(if (<= z 1e-259)
t_1
(if (<= z 3e-78) t_2 (if (<= z 175.0) t_1 (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (a / t));
double t_2 = x - (y * a);
double tmp;
if (z <= -2.05e+83) {
tmp = x - a;
} else if (z <= -1.55e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -3.5e-118) {
tmp = t_1;
} else if (z <= -1.52e-263) {
tmp = t_2;
} else if (z <= 1e-259) {
tmp = t_1;
} else if (z <= 3e-78) {
tmp = t_2;
} else if (z <= 175.0) {
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) :: t_2
real(8) :: tmp
t_1 = x - (y * (a / t))
t_2 = x - (y * a)
if (z <= (-2.05d+83)) then
tmp = x - a
else if (z <= (-1.55d-25)) then
tmp = x + ((y * a) / z)
else if (z <= (-3.5d-118)) then
tmp = t_1
else if (z <= (-1.52d-263)) then
tmp = t_2
else if (z <= 1d-259) then
tmp = t_1
else if (z <= 3d-78) then
tmp = t_2
else if (z <= 175.0d0) 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 / t));
double t_2 = x - (y * a);
double tmp;
if (z <= -2.05e+83) {
tmp = x - a;
} else if (z <= -1.55e-25) {
tmp = x + ((y * a) / z);
} else if (z <= -3.5e-118) {
tmp = t_1;
} else if (z <= -1.52e-263) {
tmp = t_2;
} else if (z <= 1e-259) {
tmp = t_1;
} else if (z <= 3e-78) {
tmp = t_2;
} else if (z <= 175.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (a / t)) t_2 = x - (y * a) tmp = 0 if z <= -2.05e+83: tmp = x - a elif z <= -1.55e-25: tmp = x + ((y * a) / z) elif z <= -3.5e-118: tmp = t_1 elif z <= -1.52e-263: tmp = t_2 elif z <= 1e-259: tmp = t_1 elif z <= 3e-78: tmp = t_2 elif z <= 175.0: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(a / t))) t_2 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -2.05e+83) tmp = Float64(x - a); elseif (z <= -1.55e-25) tmp = Float64(x + Float64(Float64(y * a) / z)); elseif (z <= -3.5e-118) tmp = t_1; elseif (z <= -1.52e-263) tmp = t_2; elseif (z <= 1e-259) tmp = t_1; elseif (z <= 3e-78) tmp = t_2; elseif (z <= 175.0) 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 / t)); t_2 = x - (y * a); tmp = 0.0; if (z <= -2.05e+83) tmp = x - a; elseif (z <= -1.55e-25) tmp = x + ((y * a) / z); elseif (z <= -3.5e-118) tmp = t_1; elseif (z <= -1.52e-263) tmp = t_2; elseif (z <= 1e-259) tmp = t_1; elseif (z <= 3e-78) tmp = t_2; elseif (z <= 175.0) 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 * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+83], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.55e-25], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-118], t$95$1, If[LessEqual[z, -1.52e-263], t$95$2, If[LessEqual[z, 1e-259], t$95$1, If[LessEqual[z, 3e-78], t$95$2, If[LessEqual[z, 175.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
t_2 := x - y \cdot a\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+83}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-25}:\\
\;\;\;\;x + \frac{y \cdot a}{z}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 175:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.05e83 or 175 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -2.05e83 < z < -1.54999999999999997e-25Initial program 100.0%
Taylor expanded in z around inf 69.9%
mul-1-neg69.9%
distribute-neg-frac269.9%
Simplified69.9%
Taylor expanded in y around inf 68.1%
mul-1-neg68.1%
associate-/l*68.0%
distribute-rgt-neg-in68.0%
Simplified68.0%
sub-neg68.0%
distribute-rgt-neg-out68.0%
remove-double-neg68.0%
div-inv68.0%
associate-*r*68.0%
add-sqr-sqrt31.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod33.3%
add-sqr-sqrt42.8%
div-inv42.8%
add-sqr-sqrt33.3%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod31.0%
add-sqr-sqrt68.1%
*-commutative68.1%
Applied egg-rr68.1%
if -1.54999999999999997e-25 < z < -3.5e-118 or -1.52000000000000005e-263 < z < 1.0000000000000001e-259 or 2.99999999999999988e-78 < z < 175Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 86.7%
Taylor expanded in y around inf 83.2%
*-commutative83.2%
clear-num83.1%
un-div-inv83.1%
Applied egg-rr83.1%
associate-/r/83.2%
Simplified83.2%
if -3.5e-118 < z < -1.52000000000000005e-263 or 1.0000000000000001e-259 < z < 2.99999999999999988e-78Initial program 98.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.4%
*-commutative94.4%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in t around 0 88.7%
Final simplification81.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4e+27) (not (<= t 6e+89))) (+ x (* a (/ (- z y) t))) (- x (* a (/ (- y z) (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4e+27) || !(t <= 6e+89)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (a * ((y - z) / (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 <= (-4d+27)) .or. (.not. (t <= 6d+89))) then
tmp = x + (a * ((z - y) / t))
else
tmp = x - (a * ((y - z) / (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 <= -4e+27) || !(t <= 6e+89)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (a * ((y - z) / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4e+27) or not (t <= 6e+89): tmp = x + (a * ((z - y) / t)) else: tmp = x - (a * ((y - z) / (1.0 - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4e+27) || !(t <= 6e+89)) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4e+27) || ~((t <= 6e+89))) tmp = x + (a * ((z - y) / t)); else tmp = x - (a * ((y - z) / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4e+27], N[Not[LessEqual[t, 6e+89]], $MachinePrecision]], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+27} \lor \neg \left(t \leq 6 \cdot 10^{+89}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\end{array}
\end{array}
if t < -4.0000000000000001e27 or 6.00000000000000025e89 < t Initial program 95.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 93.1%
if -4.0000000000000001e27 < t < 6.00000000000000025e89Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 98.5%
Final simplification96.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4e+70) (not (<= z 2.9e+155))) (- x (- a (* y (/ a z)))) (+ x (* y (/ a (+ -1.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4e+70) || !(z <= 2.9e+155)) {
tmp = x - (a - (y * (a / z)));
} else {
tmp = x + (y * (a / (-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 ((z <= (-4d+70)) .or. (.not. (z <= 2.9d+155))) then
tmp = x - (a - (y * (a / z)))
else
tmp = x + (y * (a / ((-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 ((z <= -4e+70) || !(z <= 2.9e+155)) {
tmp = x - (a - (y * (a / z)));
} else {
tmp = x + (y * (a / (-1.0 + (z - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4e+70) or not (z <= 2.9e+155): tmp = x - (a - (y * (a / z))) else: tmp = x + (y * (a / (-1.0 + (z - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4e+70) || !(z <= 2.9e+155)) tmp = Float64(x - Float64(a - Float64(y * Float64(a / z)))); else tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 + Float64(z - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4e+70) || ~((z <= 2.9e+155))) tmp = x - (a - (y * (a / z))); else tmp = x + (y * (a / (-1.0 + (z - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4e+70], N[Not[LessEqual[z, 2.9e+155]], $MachinePrecision]], N[(x - N[(a - N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(a / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+70} \lor \neg \left(z \leq 2.9 \cdot 10^{+155}\right):\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{a}{-1 + \left(z - t\right)}\\
\end{array}
\end{array}
if z < -4.00000000000000029e70 or 2.8999999999999999e155 < z Initial program 90.7%
Taylor expanded in z around inf 86.1%
mul-1-neg86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in y around 0 81.9%
mul-1-neg81.9%
*-commutative81.9%
associate-*r/89.8%
unsub-neg89.8%
Simplified89.8%
if -4.00000000000000029e70 < z < 2.8999999999999999e155Initial program 99.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 85.7%
*-commutative85.7%
associate--l+85.7%
+-commutative85.7%
associate-*r/92.2%
+-commutative92.2%
associate--l+92.2%
associate--l+92.2%
Simplified92.2%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+72)
(- x (- a (* y (/ a z))))
(if (<= z 4e+89)
(+ x (* y (/ a (+ -1.0 (- z t)))))
(- x (* a (/ z (+ z (- -1.0 t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+72) {
tmp = x - (a - (y * (a / z)));
} else if (z <= 4e+89) {
tmp = x + (y * (a / (-1.0 + (z - t))));
} else {
tmp = x - (a * (z / (z + (-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 <= (-2.3d+72)) then
tmp = x - (a - (y * (a / z)))
else if (z <= 4d+89) then
tmp = x + (y * (a / ((-1.0d0) + (z - t))))
else
tmp = x - (a * (z / (z + ((-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 <= -2.3e+72) {
tmp = x - (a - (y * (a / z)));
} else if (z <= 4e+89) {
tmp = x + (y * (a / (-1.0 + (z - t))));
} else {
tmp = x - (a * (z / (z + (-1.0 - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+72: tmp = x - (a - (y * (a / z))) elif z <= 4e+89: tmp = x + (y * (a / (-1.0 + (z - t)))) else: tmp = x - (a * (z / (z + (-1.0 - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+72) tmp = Float64(x - Float64(a - Float64(y * Float64(a / z)))); elseif (z <= 4e+89) tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 + Float64(z - t))))); else tmp = Float64(x - Float64(a * Float64(z / Float64(z + Float64(-1.0 - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+72) tmp = x - (a - (y * (a / z))); elseif (z <= 4e+89) tmp = x + (y * (a / (-1.0 + (z - t)))); else tmp = x - (a * (z / (z + (-1.0 - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+72], N[(x - N[(a - N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+89], N[(x + N[(y * N[(a / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+89}:\\
\;\;\;\;x + y \cdot \frac{a}{-1 + \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{z + \left(-1 - t\right)}\\
\end{array}
\end{array}
if z < -2.3e72Initial program 90.2%
Taylor expanded in z around inf 86.3%
mul-1-neg86.3%
distribute-neg-frac286.3%
Simplified86.3%
Taylor expanded in y around 0 84.7%
mul-1-neg84.7%
*-commutative84.7%
associate-*r/92.4%
unsub-neg92.4%
Simplified92.4%
if -2.3e72 < z < 3.99999999999999998e89Initial program 99.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 86.8%
*-commutative86.8%
associate--l+86.8%
+-commutative86.8%
associate-*r/93.8%
+-commutative93.8%
associate--l+93.8%
associate--l+93.8%
Simplified93.8%
if 3.99999999999999998e89 < z Initial program 94.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 90.4%
mul-1-neg90.4%
associate--l+90.4%
+-commutative90.4%
distribute-neg-frac290.4%
+-commutative90.4%
distribute-neg-in90.4%
metadata-eval90.4%
unsub-neg90.4%
associate--r-90.4%
Simplified90.4%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e+18) (not (<= z 7.8))) (- x (- a (* y (/ a z)))) (- x (* y (/ a (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+18) || !(z <= 7.8)) {
tmp = x - (a - (y * (a / z)));
} else {
tmp = x - (y * (a / (t + 1.0)));
}
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+18)) .or. (.not. (z <= 7.8d0))) then
tmp = x - (a - (y * (a / z)))
else
tmp = x - (y * (a / (t + 1.0d0)))
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+18) || !(z <= 7.8)) {
tmp = x - (a - (y * (a / z)));
} else {
tmp = x - (y * (a / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e+18) or not (z <= 7.8): tmp = x - (a - (y * (a / z))) else: tmp = x - (y * (a / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e+18) || !(z <= 7.8)) tmp = Float64(x - Float64(a - Float64(y * Float64(a / z)))); else tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.1e+18) || ~((z <= 7.8))) tmp = x - (a - (y * (a / z))); else tmp = x - (y * (a / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e+18], N[Not[LessEqual[z, 7.8]], $MachinePrecision]], N[(x - N[(a - N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+18} \lor \neg \left(z \leq 7.8\right):\\
\;\;\;\;x - \left(a - y \cdot \frac{a}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\end{array}
\end{array}
if z < -1.1e18 or 7.79999999999999982 < z Initial program 93.8%
Taylor expanded in z around inf 83.2%
mul-1-neg83.2%
distribute-neg-frac283.2%
Simplified83.2%
Taylor expanded in y around 0 78.9%
mul-1-neg78.9%
*-commutative78.9%
associate-*r/85.6%
unsub-neg85.6%
Simplified85.6%
if -1.1e18 < z < 7.79999999999999982Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.2%
*-commutative87.2%
associate-/l*94.9%
Simplified94.9%
Final simplification90.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.6e+84) (not (<= z 210.0))) (- x a) (- x (* y (/ a (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e+84) || !(z <= 210.0)) {
tmp = x - a;
} else {
tmp = x - (y * (a / (t + 1.0)));
}
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.6d+84)) .or. (.not. (z <= 210.0d0))) then
tmp = x - a
else
tmp = x - (y * (a / (t + 1.0d0)))
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.6e+84) || !(z <= 210.0)) {
tmp = x - a;
} else {
tmp = x - (y * (a / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.6e+84) or not (z <= 210.0): tmp = x - a else: tmp = x - (y * (a / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.6e+84) || !(z <= 210.0)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.6e+84) || ~((z <= 210.0))) tmp = x - a; else tmp = x - (y * (a / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.6e+84], N[Not[LessEqual[z, 210.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+84} \lor \neg \left(z \leq 210\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\end{array}
\end{array}
if z < -3.5999999999999999e84 or 210 < z Initial program 92.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -3.5999999999999999e84 < z < 210Initial program 99.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 83.9%
*-commutative83.9%
associate-/l*91.1%
Simplified91.1%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.6e+82) (not (<= z 3.6e-11))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.6e+82) || !(z <= 3.6e-11)) {
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 <= (-1.6d+82)) .or. (.not. (z <= 3.6d-11))) 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 <= -1.6e+82) || !(z <= 3.6e-11)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.6e+82) or not (z <= 3.6e-11): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.6e+82) || !(z <= 3.6e-11)) 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 <= -1.6e+82) || ~((z <= 3.6e-11))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.6e+82], N[Not[LessEqual[z, 3.6e-11]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+82} \lor \neg \left(z \leq 3.6 \cdot 10^{-11}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -1.59999999999999987e82 or 3.59999999999999985e-11 < z Initial program 92.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.7%
if -1.59999999999999987e82 < z < 3.59999999999999985e-11Initial program 99.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.2%
*-commutative84.2%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around 0 72.1%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.05e+15) (not (<= z 1600000000.0))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+15) || !(z <= 1600000000.0)) {
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.05d+15)) .or. (.not. (z <= 1600000000.0d0))) 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.05e+15) || !(z <= 1600000000.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.05e+15) or not (z <= 1600000000.0): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.05e+15) || !(z <= 1600000000.0)) 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.05e+15) || ~((z <= 1600000000.0))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.05e+15], N[Not[LessEqual[z, 1600000000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+15} \lor \neg \left(z \leq 1600000000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.05e15 or 1.6e9 < z Initial program 93.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.7%
if -2.05e15 < z < 1.6e9Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 87.6%
*-commutative87.6%
associate--l+87.6%
+-commutative87.6%
associate-*r/95.1%
+-commutative95.1%
associate--l+95.1%
associate--l+95.1%
Simplified95.1%
Taylor expanded in x around inf 55.8%
Final simplification64.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 96.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.4%
*-commutative75.4%
associate--l+75.4%
+-commutative75.4%
associate-*r/80.9%
+-commutative80.9%
associate--l+80.9%
associate--l+80.9%
Simplified80.9%
Taylor expanded in x around inf 52.6%
(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 2024086
(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))))