
(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 18 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 (/ (- 1.0 (- z t)) (- z y)))))
double code(double x, double y, double z, double t, double a) {
return x + (a / ((1.0 - (z - t)) / (z - y)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (a / ((1.0d0 - (z - t)) / (z - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a / ((1.0 - (z - t)) / (z - y)));
}
def code(x, y, z, t, a): return x + (a / ((1.0 - (z - t)) / (z - y)))
function code(x, y, z, t, a) return Float64(x + Float64(a / Float64(Float64(1.0 - Float64(z - t)) / Float64(z - y)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a / ((1.0 - (z - t)) / (z - y))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a / N[(N[(1.0 - N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{a}{\frac{1 - \left(z - t\right)}{z - y}}
\end{array}
Initial program 96.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+168)
(- x a)
(if (<= z -5.5e-56)
(+ x (* a (/ y z)))
(if (<= z -7.6e-91)
(- x (* a (/ y t)))
(if (<= z -6.2e-183)
(- x (* a y))
(if (<= z 8.6e+105) (- x (/ a (/ t y))) (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+168) {
tmp = x - a;
} else if (z <= -5.5e-56) {
tmp = x + (a * (y / z));
} else if (z <= -7.6e-91) {
tmp = x - (a * (y / t));
} else if (z <= -6.2e-183) {
tmp = x - (a * y);
} else if (z <= 8.6e+105) {
tmp = x - (a / (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 <= (-1.05d+168)) then
tmp = x - a
else if (z <= (-5.5d-56)) then
tmp = x + (a * (y / z))
else if (z <= (-7.6d-91)) then
tmp = x - (a * (y / t))
else if (z <= (-6.2d-183)) then
tmp = x - (a * y)
else if (z <= 8.6d+105) then
tmp = x - (a / (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 <= -1.05e+168) {
tmp = x - a;
} else if (z <= -5.5e-56) {
tmp = x + (a * (y / z));
} else if (z <= -7.6e-91) {
tmp = x - (a * (y / t));
} else if (z <= -6.2e-183) {
tmp = x - (a * y);
} else if (z <= 8.6e+105) {
tmp = x - (a / (t / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+168: tmp = x - a elif z <= -5.5e-56: tmp = x + (a * (y / z)) elif z <= -7.6e-91: tmp = x - (a * (y / t)) elif z <= -6.2e-183: tmp = x - (a * y) elif z <= 8.6e+105: tmp = x - (a / (t / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+168) tmp = Float64(x - a); elseif (z <= -5.5e-56) tmp = Float64(x + Float64(a * Float64(y / z))); elseif (z <= -7.6e-91) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= -6.2e-183) tmp = Float64(x - Float64(a * y)); elseif (z <= 8.6e+105) tmp = Float64(x - Float64(a / Float64(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 <= -1.05e+168) tmp = x - a; elseif (z <= -5.5e-56) tmp = x + (a * (y / z)); elseif (z <= -7.6e-91) tmp = x - (a * (y / t)); elseif (z <= -6.2e-183) tmp = x - (a * y); elseif (z <= 8.6e+105) tmp = x - (a / (t / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+168], N[(x - a), $MachinePrecision], If[LessEqual[z, -5.5e-56], N[(x + N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.6e-91], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-183], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e+105], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+168}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-56}:\\
\;\;\;\;x + a \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-91}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-183}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+105}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.05000000000000001e168 or 8.6000000000000003e105 < z Initial program 94.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 92.8%
if -1.05000000000000001e168 < z < -5.4999999999999999e-56Initial program 97.8%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in y around inf 72.6%
Taylor expanded in z around inf 52.3%
associate-*r/52.3%
*-commutative52.3%
neg-mul-152.3%
distribute-lft-neg-in52.3%
neg-mul-152.3%
*-rgt-identity52.3%
times-frac59.9%
neg-mul-159.9%
/-rgt-identity59.9%
Simplified59.9%
if -5.4999999999999999e-56 < z < -7.59999999999999957e-91Initial program 77.0%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in y around inf 75.6%
Taylor expanded in t around inf 75.6%
if -7.59999999999999957e-91 < z < -6.19999999999999999e-183Initial program 99.8%
Taylor expanded in t around 0 79.6%
Taylor expanded in z around 0 74.5%
if -6.19999999999999999e-183 < z < 8.6000000000000003e105Initial program 98.1%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 91.9%
Taylor expanded in t around inf 83.5%
*-commutative83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.1e+25)
(- x a)
(if (<= z -3.65e-109)
(- x (* a (/ y t)))
(if (<= z -3.5e-121)
(+ x (* a (/ z (- 1.0 z))))
(if (<= z -1.35e-175)
(- x (* a y))
(if (<= z 2.3e+104) (- x (/ a (/ t y))) (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e+25) {
tmp = x - a;
} else if (z <= -3.65e-109) {
tmp = x - (a * (y / t));
} else if (z <= -3.5e-121) {
tmp = x + (a * (z / (1.0 - z)));
} else if (z <= -1.35e-175) {
tmp = x - (a * y);
} else if (z <= 2.3e+104) {
tmp = x - (a / (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 <= (-2.1d+25)) then
tmp = x - a
else if (z <= (-3.65d-109)) then
tmp = x - (a * (y / t))
else if (z <= (-3.5d-121)) then
tmp = x + (a * (z / (1.0d0 - z)))
else if (z <= (-1.35d-175)) then
tmp = x - (a * y)
else if (z <= 2.3d+104) then
tmp = x - (a / (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 <= -2.1e+25) {
tmp = x - a;
} else if (z <= -3.65e-109) {
tmp = x - (a * (y / t));
} else if (z <= -3.5e-121) {
tmp = x + (a * (z / (1.0 - z)));
} else if (z <= -1.35e-175) {
tmp = x - (a * y);
} else if (z <= 2.3e+104) {
tmp = x - (a / (t / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.1e+25: tmp = x - a elif z <= -3.65e-109: tmp = x - (a * (y / t)) elif z <= -3.5e-121: tmp = x + (a * (z / (1.0 - z))) elif z <= -1.35e-175: tmp = x - (a * y) elif z <= 2.3e+104: tmp = x - (a / (t / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e+25) tmp = Float64(x - a); elseif (z <= -3.65e-109) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= -3.5e-121) tmp = Float64(x + Float64(a * Float64(z / Float64(1.0 - z)))); elseif (z <= -1.35e-175) tmp = Float64(x - Float64(a * y)); elseif (z <= 2.3e+104) tmp = Float64(x - Float64(a / Float64(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 <= -2.1e+25) tmp = x - a; elseif (z <= -3.65e-109) tmp = x - (a * (y / t)); elseif (z <= -3.5e-121) tmp = x + (a * (z / (1.0 - z))); elseif (z <= -1.35e-175) tmp = x - (a * y); elseif (z <= 2.3e+104) tmp = x - (a / (t / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e+25], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.65e-109], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-121], N[(x + N[(a * N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e-175], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+104], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+25}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3.65 \cdot 10^{-109}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-121}:\\
\;\;\;\;x + a \cdot \frac{z}{1 - z}\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-175}:\\
\;\;\;\;x - a \cdot y\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+104}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.0999999999999999e25 or 2.29999999999999985e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
if -2.0999999999999999e25 < z < -3.6500000000000002e-109Initial program 90.2%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in y around inf 81.7%
Taylor expanded in t around inf 71.2%
if -3.6500000000000002e-109 < z < -3.49999999999999993e-121Initial program 99.5%
Taylor expanded in t around 0 99.5%
Taylor expanded in y around 0 100.0%
sub-neg100.0%
mul-1-neg100.0%
remove-double-neg100.0%
associate-/l*100.0%
Simplified100.0%
if -3.49999999999999993e-121 < z < -1.34999999999999999e-175Initial program 99.9%
Taylor expanded in t around 0 84.7%
Taylor expanded in z around 0 84.7%
if -1.34999999999999999e-175 < z < 2.29999999999999985e104Initial program 98.1%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 91.9%
Taylor expanded in t around inf 83.5%
*-commutative83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+100)
(- x a)
(if (<= z -1.32e+57)
(+ x (/ a (/ t (- z y))))
(if (<= z -1.55e+34)
(+ x (* a (/ y z)))
(if (<= z 9.6e+105) (+ x (* a (/ y (- -1.0 t)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -1.32e+57) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -1.55e+34) {
tmp = x + (a * (y / z));
} else if (z <= 9.6e+105) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d+100)) then
tmp = x - a
else if (z <= (-1.32d+57)) then
tmp = x + (a / (t / (z - y)))
else if (z <= (-1.55d+34)) then
tmp = x + (a * (y / z))
else if (z <= 9.6d+105) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -1.32e+57) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -1.55e+34) {
tmp = x + (a * (y / z));
} else if (z <= 9.6e+105) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+100: tmp = x - a elif z <= -1.32e+57: tmp = x + (a / (t / (z - y))) elif z <= -1.55e+34: tmp = x + (a * (y / z)) elif z <= 9.6e+105: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+100) tmp = Float64(x - a); elseif (z <= -1.32e+57) tmp = Float64(x + Float64(a / Float64(t / Float64(z - y)))); elseif (z <= -1.55e+34) tmp = Float64(x + Float64(a * Float64(y / z))); elseif (z <= 9.6e+105) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+100) tmp = x - a; elseif (z <= -1.32e+57) tmp = x + (a / (t / (z - y))); elseif (z <= -1.55e+34) tmp = x + (a * (y / z)); elseif (z <= 9.6e+105) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+100], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.32e+57], N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e+34], N[(x + N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+105], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.32 \cdot 10^{+57}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+34}:\\
\;\;\;\;x + a \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+105}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45e100 or 9.599999999999999e105 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -1.45e100 < z < -1.32000000000000001e57Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 76.8%
if -1.32000000000000001e57 < z < -1.54999999999999989e34Initial program 99.7%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in y around inf 70.0%
Taylor expanded in z around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
neg-mul-170.4%
distribute-lft-neg-in70.4%
neg-mul-170.4%
*-rgt-identity70.4%
times-frac70.4%
neg-mul-170.4%
/-rgt-identity70.4%
Simplified70.4%
if -1.54999999999999989e34 < z < 9.599999999999999e105Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 86.4%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+100)
(- x a)
(if (<= z -2.9e+57)
(+ x (/ (- z y) (/ t a)))
(if (<= z -3.4e+33)
(+ x (* a (/ y z)))
(if (<= z 2.25e+104) (+ x (* a (/ y (- -1.0 t)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -2.9e+57) {
tmp = x + ((z - y) / (t / a));
} else if (z <= -3.4e+33) {
tmp = x + (a * (y / z));
} else if (z <= 2.25e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d+100)) then
tmp = x - a
else if (z <= (-2.9d+57)) then
tmp = x + ((z - y) / (t / a))
else if (z <= (-3.4d+33)) then
tmp = x + (a * (y / z))
else if (z <= 2.25d+104) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+100) {
tmp = x - a;
} else if (z <= -2.9e+57) {
tmp = x + ((z - y) / (t / a));
} else if (z <= -3.4e+33) {
tmp = x + (a * (y / z));
} else if (z <= 2.25e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+100: tmp = x - a elif z <= -2.9e+57: tmp = x + ((z - y) / (t / a)) elif z <= -3.4e+33: tmp = x + (a * (y / z)) elif z <= 2.25e+104: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+100) tmp = Float64(x - a); elseif (z <= -2.9e+57) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); elseif (z <= -3.4e+33) tmp = Float64(x + Float64(a * Float64(y / z))); elseif (z <= 2.25e+104) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+100) tmp = x - a; elseif (z <= -2.9e+57) tmp = x + ((z - y) / (t / a)); elseif (z <= -3.4e+33) tmp = x + (a * (y / z)); elseif (z <= 2.25e+104) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+100], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.9e+57], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e+33], N[(x + N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+104], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+100}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{+57}:\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+33}:\\
\;\;\;\;x + a \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+104}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45e100 or 2.2499999999999999e104 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 87.6%
if -1.45e100 < z < -2.9000000000000002e57Initial program 100.0%
Taylor expanded in t around inf 77.0%
if -2.9000000000000002e57 < z < -3.3999999999999999e33Initial program 99.7%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in y around inf 70.0%
Taylor expanded in z around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
neg-mul-170.4%
distribute-lft-neg-in70.4%
neg-mul-170.4%
*-rgt-identity70.4%
times-frac70.4%
neg-mul-170.4%
/-rgt-identity70.4%
Simplified70.4%
if -3.3999999999999999e33 < z < 2.2499999999999999e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 86.4%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ z (- -1.0 t))))
(if (or (<= y -1.5e+46) (not (<= y 7.5e+26)))
(+ x (* a (/ y t_1)))
(- x (* a (/ z t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z + (-1.0 - t);
double tmp;
if ((y <= -1.5e+46) || !(y <= 7.5e+26)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (a * (z / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z + ((-1.0d0) - t)
if ((y <= (-1.5d+46)) .or. (.not. (y <= 7.5d+26))) then
tmp = x + (a * (y / t_1))
else
tmp = x - (a * (z / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z + (-1.0 - t);
double tmp;
if ((y <= -1.5e+46) || !(y <= 7.5e+26)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (a * (z / t_1));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z + (-1.0 - t) tmp = 0 if (y <= -1.5e+46) or not (y <= 7.5e+26): tmp = x + (a * (y / t_1)) else: tmp = x - (a * (z / t_1)) return tmp
function code(x, y, z, t, a) t_1 = Float64(z + Float64(-1.0 - t)) tmp = 0.0 if ((y <= -1.5e+46) || !(y <= 7.5e+26)) tmp = Float64(x + Float64(a * Float64(y / t_1))); else tmp = Float64(x - Float64(a * Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z + (-1.0 - t); tmp = 0.0; if ((y <= -1.5e+46) || ~((y <= 7.5e+26))) tmp = x + (a * (y / t_1)); else tmp = x - (a * (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -1.5e+46], N[Not[LessEqual[y, 7.5e+26]], $MachinePrecision]], N[(x + N[(a * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(-1 - t\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+46} \lor \neg \left(y \leq 7.5 \cdot 10^{+26}\right):\\
\;\;\;\;x + a \cdot \frac{y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{t\_1}\\
\end{array}
\end{array}
if y < -1.50000000000000012e46 or 7.49999999999999941e26 < y Initial program 95.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 87.8%
if -1.50000000000000012e46 < y < 7.49999999999999941e26Initial program 97.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 92.6%
mul-1-neg92.6%
associate--l+92.6%
+-commutative92.6%
distribute-neg-frac292.6%
+-commutative92.6%
distribute-neg-in92.6%
metadata-eval92.6%
unsub-neg92.6%
associate--r-92.6%
Simplified92.6%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.9e+24)
(- x (/ a (/ z (- z y))))
(if (<= z 2e+104)
(+ x (* a (/ y (+ z (- -1.0 t)))))
(- x (* a (/ (- z y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+24) {
tmp = x - (a / (z / (z - y)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (z + (-1.0 - t))));
} else {
tmp = x - (a * ((z - y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.9d+24)) then
tmp = x - (a / (z / (z - y)))
else if (z <= 2d+104) then
tmp = x + (a * (y / (z + ((-1.0d0) - t))))
else
tmp = x - (a * ((z - y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+24) {
tmp = x - (a / (z / (z - y)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (z + (-1.0 - t))));
} else {
tmp = x - (a * ((z - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e+24: tmp = x - (a / (z / (z - y))) elif z <= 2e+104: tmp = x + (a * (y / (z + (-1.0 - t)))) else: tmp = x - (a * ((z - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e+24) tmp = Float64(x - Float64(a / Float64(z / Float64(z - y)))); elseif (z <= 2e+104) tmp = Float64(x + Float64(a * Float64(y / Float64(z + Float64(-1.0 - t))))); else tmp = Float64(x - Float64(a * Float64(Float64(z - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e+24) tmp = x - (a / (z / (z - y))); elseif (z <= 2e+104) tmp = x + (a * (y / (z + (-1.0 - t)))); else tmp = x - (a * ((z - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+24], N[(x - N[(a / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+104], N[(x + N[(a * N[(y / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+24}:\\
\;\;\;\;x - \frac{a}{\frac{z}{z - y}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+104}:\\
\;\;\;\;x + a \cdot \frac{y}{z + \left(-1 - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -3.8999999999999998e24Initial program 93.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
Simplified84.6%
if -3.8999999999999998e24 < z < 2e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 90.1%
if 2e104 < z Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.9%
mul-1-neg97.9%
Simplified97.9%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.5e+93) (not (<= z 1.04e+108))) (- x a) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e+93) || !(z <= 1.04e+108)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-5.5d+93)) .or. (.not. (z <= 1.04d+108))) then
tmp = x - a
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e+93) || !(z <= 1.04e+108)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.5e+93) or not (z <= 1.04e+108): tmp = x - a else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.5e+93) || !(z <= 1.04e+108)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.5e+93) || ~((z <= 1.04e+108))) tmp = x - a; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.5e+93], N[Not[LessEqual[z, 1.04e+108]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+93} \lor \neg \left(z \leq 1.04 \cdot 10^{+108}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -5.5000000000000003e93 or 1.04e108 < z Initial program 94.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.8%
if -5.5000000000000003e93 < z < 1.04e108Initial program 97.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 82.9%
Final simplification83.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+22) (not (<= z 2.5e+104))) (- x (* a (/ (- z y) z))) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+22) || !(z <= 2.5e+104)) {
tmp = x - (a * ((z - y) / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8d+22)) .or. (.not. (z <= 2.5d+104))) then
tmp = x - (a * ((z - y) / z))
else
tmp = x + (a * (y / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+22) || !(z <= 2.5e+104)) {
tmp = x - (a * ((z - y) / z));
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+22) or not (z <= 2.5e+104): tmp = x - (a * ((z - y) / z)) else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+22) || !(z <= 2.5e+104)) tmp = Float64(x - Float64(a * Float64(Float64(z - y) / z))); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e+22) || ~((z <= 2.5e+104))) tmp = x - (a * ((z - y) / z)); else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+22], N[Not[LessEqual[z, 2.5e+104]], $MachinePrecision]], N[(x - N[(a * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+22} \lor \neg \left(z \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;x - a \cdot \frac{z - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -8e22 or 2.4999999999999998e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 89.4%
mul-1-neg89.4%
Simplified89.4%
if -8e22 < z < 2.4999999999999998e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 87.0%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.5e+30) (- x (/ a (/ z (- z y)))) (if (<= z 2e+104) (+ x (* a (/ y (- -1.0 t)))) (- x (* a (/ (- z y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+30) {
tmp = x - (a / (z / (z - y)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - (a * ((z - y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.5d+30)) then
tmp = x - (a / (z / (z - y)))
else if (z <= 2d+104) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else
tmp = x - (a * ((z - y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+30) {
tmp = x - (a / (z / (z - y)));
} else if (z <= 2e+104) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - (a * ((z - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+30: tmp = x - (a / (z / (z - y))) elif z <= 2e+104: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - (a * ((z - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+30) tmp = Float64(x - Float64(a / Float64(z / Float64(z - y)))); elseif (z <= 2e+104) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - Float64(a * Float64(Float64(z - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+30) tmp = x - (a / (z / (z - y))); elseif (z <= 2e+104) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - (a * ((z - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+30], N[(x - N[(a / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+104], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+30}:\\
\;\;\;\;x - \frac{a}{\frac{z}{z - y}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+104}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -2.4999999999999999e30Initial program 93.7%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
Simplified84.6%
if -2.4999999999999999e30 < z < 2e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 87.0%
if 2e104 < z Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 97.9%
mul-1-neg97.9%
Simplified97.9%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.25e+26) (not (<= z 2.5e+104))) (- x a) (- x (* a (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.25e+26) || !(z <= 2.5e+104)) {
tmp = x - a;
} else {
tmp = x - (a * (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.25d+26)) .or. (.not. (z <= 2.5d+104))) then
tmp = x - a
else
tmp = x - (a * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.25e+26) || !(z <= 2.5e+104)) {
tmp = x - a;
} else {
tmp = x - (a * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.25e+26) or not (z <= 2.5e+104): tmp = x - a else: tmp = x - (a * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.25e+26) || !(z <= 2.5e+104)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.25e+26) || ~((z <= 2.5e+104))) tmp = x - a; else tmp = x - (a * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.25e+26], N[Not[LessEqual[z, 2.5e+104]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+26} \lor \neg \left(z \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -2.24999999999999989e26 or 2.4999999999999998e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
if -2.24999999999999989e26 < z < 2.4999999999999998e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 90.1%
Taylor expanded in t around inf 78.4%
Final simplification78.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.15e+33) (not (<= z 5.1e+104))) (- x a) (- x (/ a (/ t y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e+33) || !(z <= 5.1e+104)) {
tmp = x - a;
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.15d+33)) .or. (.not. (z <= 5.1d+104))) then
tmp = x - a
else
tmp = x - (a / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e+33) || !(z <= 5.1e+104)) {
tmp = x - a;
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.15e+33) or not (z <= 5.1e+104): tmp = x - a else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.15e+33) || !(z <= 5.1e+104)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.15e+33) || ~((z <= 5.1e+104))) tmp = x - a; else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.15e+33], N[Not[LessEqual[z, 5.1e+104]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+33} \lor \neg \left(z \leq 5.1 \cdot 10^{+104}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -2.15000000000000014e33 or 5.1000000000000002e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.6%
if -2.15000000000000014e33 < z < 5.1000000000000002e104Initial program 97.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around inf 90.1%
Taylor expanded in t around inf 78.4%
*-commutative78.4%
clear-num78.4%
un-div-inv78.4%
Applied egg-rr78.4%
Final simplification78.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+14) (not (<= z 1.62e+97))) (- x a) (- x (* a y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+14) || !(z <= 1.62e+97)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.5d+14)) .or. (.not. (z <= 1.62d+97))) then
tmp = x - a
else
tmp = x - (a * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+14) || !(z <= 1.62e+97)) {
tmp = x - a;
} else {
tmp = x - (a * y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+14) or not (z <= 1.62e+97): tmp = x - a else: tmp = x - (a * y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+14) || !(z <= 1.62e+97)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e+14) || ~((z <= 1.62e+97))) tmp = x - a; else tmp = x - (a * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+14], N[Not[LessEqual[z, 1.62e+97]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+14} \lor \neg \left(z \leq 1.62 \cdot 10^{+97}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot y\\
\end{array}
\end{array}
if z < -4.5e14 or 1.62e97 < z Initial program 96.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -4.5e14 < z < 1.62e97Initial program 97.2%
Taylor expanded in t around 0 67.7%
Taylor expanded in z around 0 65.5%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e+16) (not (<= z 2e+104))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+16) || !(z <= 2e+104)) {
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.2d+16)) .or. (.not. (z <= 2d+104))) 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.2e+16) || !(z <= 2e+104)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e+16) or not (z <= 2e+104): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e+16) || !(z <= 2e+104)) 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.2e+16) || ~((z <= 2e+104))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e+16], N[Not[LessEqual[z, 2e+104]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+16} \lor \neg \left(z \leq 2 \cdot 10^{+104}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2e16 or 2e104 < z Initial program 95.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -1.2e16 < z < 2e104Initial program 97.3%
Taylor expanded in t around inf 78.9%
Taylor expanded in x around inf 57.1%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (- x (* (- y z) (/ a (- 1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (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 - ((y - z) * (a / (1.0d0 - (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) * (a / (1.0 - (z - t))));
}
def code(x, y, z, t, a): return x - ((y - z) * (a / (1.0 - (z - t))))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) * (a / (1.0 - (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(y - z\right) \cdot \frac{a}{1 - \left(z - t\right)}
\end{array}
Initial program 96.7%
clear-num96.7%
associate-/r/96.7%
clear-num97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t a) :precision binary64 (- x (* a (/ (- y z) (- 1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x - (a * ((y - z) / (1.0 - (z - t))));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (a * ((y - z) / (1.0d0 - (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (a * ((y - z) / (1.0 - (z - t))));
}
def code(x, y, z, t, a): return x - (a * ((y - z) / (1.0 - (z - t))))
function code(x, y, z, t, a) return Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x - (a * ((y - z) / (1.0 - (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - a \cdot \frac{y - z}{1 - \left(z - t\right)}
\end{array}
Initial program 96.7%
associate-/r/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.3e+162) (not (<= a 2.7e+143))) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.3e+162) || !(a <= 2.7e+143)) {
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 <= (-1.3d+162)) .or. (.not. (a <= 2.7d+143))) 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 <= -1.3e+162) || !(a <= 2.7e+143)) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.3e+162) or not (a <= 2.7e+143): tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.3e+162) || !(a <= 2.7e+143)) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.3e+162) || ~((a <= 2.7e+143))) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.3e+162], N[Not[LessEqual[a, 2.7e+143]], $MachinePrecision]], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+162} \lor \neg \left(a \leq 2.7 \cdot 10^{+143}\right):\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.3e162 or 2.7000000000000002e143 < a Initial program 99.8%
Taylor expanded in t around 0 70.0%
Taylor expanded in x around 0 28.1%
mul-1-neg28.1%
associate-*r/60.1%
distribute-rgt-neg-in60.1%
distribute-neg-frac260.1%
Simplified60.1%
Taylor expanded in z around inf 32.2%
mul-1-neg32.2%
Simplified32.2%
if -1.3e162 < a < 2.7000000000000002e143Initial program 95.5%
Taylor expanded in t around inf 63.8%
Taylor expanded in x around inf 67.5%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.7%
Taylor expanded in t around inf 60.7%
Taylor expanded in x around inf 53.2%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024055
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))