
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- y z) (- a z)) t)))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - 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 - z)) * t)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - z)) * t);
}
def code(x, y, z, t, a): return x + (((y - z) / (a - z)) * t)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) / (a - z)) * t); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{a - z} \cdot t
\end{array}
Initial program 86.0%
associate-*l/97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (* t (/ y z)))))
(if (<= z -1.4e+91)
(+ x t)
(if (<= z -2.6e-27)
t_2
(if (<= z -1.6e-87)
t_1
(if (<= z -5.1e-115)
t_2
(if (<= z 1.45e-68)
t_1
(if (<= z 1.1e+50)
t_2
(if (<= z 1.15e+73) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = x - (t * (y / z));
double tmp;
if (z <= -1.4e+91) {
tmp = x + t;
} else if (z <= -2.6e-27) {
tmp = t_2;
} else if (z <= -1.6e-87) {
tmp = t_1;
} else if (z <= -5.1e-115) {
tmp = t_2;
} else if (z <= 1.45e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 1.15e+73) {
tmp = x - (t / (a / z));
} else {
tmp = x + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / t))
t_2 = x - (t * (y / z))
if (z <= (-1.4d+91)) then
tmp = x + t
else if (z <= (-2.6d-27)) then
tmp = t_2
else if (z <= (-1.6d-87)) then
tmp = t_1
else if (z <= (-5.1d-115)) then
tmp = t_2
else if (z <= 1.45d-68) then
tmp = t_1
else if (z <= 1.1d+50) then
tmp = t_2
else if (z <= 1.15d+73) then
tmp = x - (t / (a / z))
else
tmp = x + t
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 - (t * (y / z));
double tmp;
if (z <= -1.4e+91) {
tmp = x + t;
} else if (z <= -2.6e-27) {
tmp = t_2;
} else if (z <= -1.6e-87) {
tmp = t_1;
} else if (z <= -5.1e-115) {
tmp = t_2;
} else if (z <= 1.45e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 1.15e+73) {
tmp = x - (t / (a / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = x - (t * (y / z)) tmp = 0 if z <= -1.4e+91: tmp = x + t elif z <= -2.6e-27: tmp = t_2 elif z <= -1.6e-87: tmp = t_1 elif z <= -5.1e-115: tmp = t_2 elif z <= 1.45e-68: tmp = t_1 elif z <= 1.1e+50: tmp = t_2 elif z <= 1.15e+73: tmp = x - (t / (a / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(x - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -1.4e+91) tmp = Float64(x + t); elseif (z <= -2.6e-27) tmp = t_2; elseif (z <= -1.6e-87) tmp = t_1; elseif (z <= -5.1e-115) tmp = t_2; elseif (z <= 1.45e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 1.15e+73) tmp = Float64(x - Float64(t / Float64(a / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); t_2 = x - (t * (y / z)); tmp = 0.0; if (z <= -1.4e+91) tmp = x + t; elseif (z <= -2.6e-27) tmp = t_2; elseif (z <= -1.6e-87) tmp = t_1; elseif (z <= -5.1e-115) tmp = t_2; elseif (z <= 1.45e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 1.15e+73) tmp = x - (t / (a / z)); else tmp = x + t; 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[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+91], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.6e-27], t$95$2, If[LessEqual[z, -1.6e-87], t$95$1, If[LessEqual[z, -5.1e-115], t$95$2, If[LessEqual[z, 1.45e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 1.15e+73], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+91}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+73}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.3999999999999999e91 or 1.15e73 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.9%
if -1.3999999999999999e91 < z < -2.60000000000000017e-27 or -1.59999999999999989e-87 < z < -5.0999999999999997e-115 or 1.45e-68 < z < 1.10000000000000008e50Initial program 98.3%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in y around inf 81.8%
Taylor expanded in x around 0 83.1%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in a around 0 75.1%
mul-1-neg75.1%
associate-*r/73.8%
*-commutative73.8%
associate-/r/74.3%
+-commutative74.3%
sub-neg74.3%
associate-/r/73.8%
associate-*l/75.1%
associate-*r/73.7%
Simplified73.7%
if -2.60000000000000017e-27 < z < -1.59999999999999989e-87 or -5.0999999999999997e-115 < z < 1.45e-68Initial program 90.9%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around 0 79.7%
associate-/l*86.0%
Simplified86.0%
if 1.10000000000000008e50 < z < 1.15e73Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (/ (* y t) z))))
(if (<= z -3.1e+94)
(+ x t)
(if (<= z -4.2e-27)
(- x (* t (/ y z)))
(if (<= z -2.2e-87)
t_1
(if (<= z -3.5e-115)
t_2
(if (<= z 8.2e-69)
t_1
(if (<= z 1.1e+50)
t_2
(if (<= z 8.5e+72) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = x - ((y * t) / z);
double tmp;
if (z <= -3.1e+94) {
tmp = x + t;
} else if (z <= -4.2e-27) {
tmp = x - (t * (y / z));
} else if (z <= -2.2e-87) {
tmp = t_1;
} else if (z <= -3.5e-115) {
tmp = t_2;
} else if (z <= 8.2e-69) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 8.5e+72) {
tmp = x - (t / (a / z));
} else {
tmp = x + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / t))
t_2 = x - ((y * t) / z)
if (z <= (-3.1d+94)) then
tmp = x + t
else if (z <= (-4.2d-27)) then
tmp = x - (t * (y / z))
else if (z <= (-2.2d-87)) then
tmp = t_1
else if (z <= (-3.5d-115)) then
tmp = t_2
else if (z <= 8.2d-69) then
tmp = t_1
else if (z <= 1.1d+50) then
tmp = t_2
else if (z <= 8.5d+72) then
tmp = x - (t / (a / z))
else
tmp = x + t
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 * t) / z);
double tmp;
if (z <= -3.1e+94) {
tmp = x + t;
} else if (z <= -4.2e-27) {
tmp = x - (t * (y / z));
} else if (z <= -2.2e-87) {
tmp = t_1;
} else if (z <= -3.5e-115) {
tmp = t_2;
} else if (z <= 8.2e-69) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 8.5e+72) {
tmp = x - (t / (a / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = x - ((y * t) / z) tmp = 0 if z <= -3.1e+94: tmp = x + t elif z <= -4.2e-27: tmp = x - (t * (y / z)) elif z <= -2.2e-87: tmp = t_1 elif z <= -3.5e-115: tmp = t_2 elif z <= 8.2e-69: tmp = t_1 elif z <= 1.1e+50: tmp = t_2 elif z <= 8.5e+72: tmp = x - (t / (a / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(x - Float64(Float64(y * t) / z)) tmp = 0.0 if (z <= -3.1e+94) tmp = Float64(x + t); elseif (z <= -4.2e-27) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= -2.2e-87) tmp = t_1; elseif (z <= -3.5e-115) tmp = t_2; elseif (z <= 8.2e-69) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 8.5e+72) tmp = Float64(x - Float64(t / Float64(a / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); t_2 = x - ((y * t) / z); tmp = 0.0; if (z <= -3.1e+94) tmp = x + t; elseif (z <= -4.2e-27) tmp = x - (t * (y / z)); elseif (z <= -2.2e-87) tmp = t_1; elseif (z <= -3.5e-115) tmp = t_2; elseif (z <= 8.2e-69) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 8.5e+72) tmp = x - (t / (a / z)); else tmp = x + t; 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[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+94], N[(x + t), $MachinePrecision], If[LessEqual[z, -4.2e-27], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-87], t$95$1, If[LessEqual[z, -3.5e-115], t$95$2, If[LessEqual[z, 8.2e-69], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 8.5e+72], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := x - \frac{y \cdot t}{z}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+94}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-27}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -3.09999999999999991e94 or 8.5000000000000004e72 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.9%
if -3.09999999999999991e94 < z < -4.20000000000000031e-27Initial program 96.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 82.9%
Taylor expanded in x around 0 82.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in a around 0 79.1%
mul-1-neg79.1%
associate-*r/79.3%
*-commutative79.3%
associate-/r/79.1%
+-commutative79.1%
sub-neg79.1%
associate-/r/79.3%
associate-*l/79.1%
associate-*r/79.1%
Simplified79.1%
if -4.20000000000000031e-27 < z < -2.19999999999999988e-87 or -3.5000000000000002e-115 < z < 8.1999999999999998e-69Initial program 90.9%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around 0 79.7%
associate-/l*86.0%
Simplified86.0%
if -2.19999999999999988e-87 < z < -3.5000000000000002e-115 or 8.1999999999999998e-69 < z < 1.10000000000000008e50Initial program 99.7%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in y around inf 80.9%
Taylor expanded in a around 0 72.0%
+-commutative72.0%
mul-1-neg72.0%
unsub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 1.10000000000000008e50 < z < 8.5000000000000004e72Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (/ (* y t) z))))
(if (<= z -6.8e+90)
(+ x t)
(if (<= z -4.8e-27)
(+ x (/ y (/ (- z) t)))
(if (<= z -1.6e-87)
t_1
(if (<= z -5.1e-115)
t_2
(if (<= z 1.9e-68)
t_1
(if (<= z 1.1e+50)
t_2
(if (<= z 7.5e+71) (- x (/ t (/ a z))) (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = x - ((y * t) / z);
double tmp;
if (z <= -6.8e+90) {
tmp = x + t;
} else if (z <= -4.8e-27) {
tmp = x + (y / (-z / t));
} else if (z <= -1.6e-87) {
tmp = t_1;
} else if (z <= -5.1e-115) {
tmp = t_2;
} else if (z <= 1.9e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 7.5e+71) {
tmp = x - (t / (a / z));
} else {
tmp = x + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / t))
t_2 = x - ((y * t) / z)
if (z <= (-6.8d+90)) then
tmp = x + t
else if (z <= (-4.8d-27)) then
tmp = x + (y / (-z / t))
else if (z <= (-1.6d-87)) then
tmp = t_1
else if (z <= (-5.1d-115)) then
tmp = t_2
else if (z <= 1.9d-68) then
tmp = t_1
else if (z <= 1.1d+50) then
tmp = t_2
else if (z <= 7.5d+71) then
tmp = x - (t / (a / z))
else
tmp = x + t
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 * t) / z);
double tmp;
if (z <= -6.8e+90) {
tmp = x + t;
} else if (z <= -4.8e-27) {
tmp = x + (y / (-z / t));
} else if (z <= -1.6e-87) {
tmp = t_1;
} else if (z <= -5.1e-115) {
tmp = t_2;
} else if (z <= 1.9e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 7.5e+71) {
tmp = x - (t / (a / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = x - ((y * t) / z) tmp = 0 if z <= -6.8e+90: tmp = x + t elif z <= -4.8e-27: tmp = x + (y / (-z / t)) elif z <= -1.6e-87: tmp = t_1 elif z <= -5.1e-115: tmp = t_2 elif z <= 1.9e-68: tmp = t_1 elif z <= 1.1e+50: tmp = t_2 elif z <= 7.5e+71: tmp = x - (t / (a / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(x - Float64(Float64(y * t) / z)) tmp = 0.0 if (z <= -6.8e+90) tmp = Float64(x + t); elseif (z <= -4.8e-27) tmp = Float64(x + Float64(y / Float64(Float64(-z) / t))); elseif (z <= -1.6e-87) tmp = t_1; elseif (z <= -5.1e-115) tmp = t_2; elseif (z <= 1.9e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 7.5e+71) tmp = Float64(x - Float64(t / Float64(a / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); t_2 = x - ((y * t) / z); tmp = 0.0; if (z <= -6.8e+90) tmp = x + t; elseif (z <= -4.8e-27) tmp = x + (y / (-z / t)); elseif (z <= -1.6e-87) tmp = t_1; elseif (z <= -5.1e-115) tmp = t_2; elseif (z <= 1.9e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 7.5e+71) tmp = x - (t / (a / z)); else tmp = x + t; 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[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+90], N[(x + t), $MachinePrecision], If[LessEqual[z, -4.8e-27], N[(x + N[(y / N[((-z) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-87], t$95$1, If[LessEqual[z, -5.1e-115], t$95$2, If[LessEqual[z, 1.9e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 7.5e+71], N[(x - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := x - \frac{y \cdot t}{z}\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+90}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-27}:\\
\;\;\;\;x + \frac{y}{\frac{-z}{t}}\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.1 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -6.80000000000000036e90 or 7.50000000000000007e71 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.9%
if -6.80000000000000036e90 < z < -4.80000000000000004e-27Initial program 96.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 82.9%
Taylor expanded in x around 0 82.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in a around 0 79.1%
neg-mul-179.1%
distribute-neg-frac79.1%
Simplified79.1%
if -4.80000000000000004e-27 < z < -1.59999999999999989e-87 or -5.0999999999999997e-115 < z < 1.90000000000000019e-68Initial program 90.9%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around 0 79.7%
associate-/l*86.0%
Simplified86.0%
if -1.59999999999999989e-87 < z < -5.0999999999999997e-115 or 1.90000000000000019e-68 < z < 1.10000000000000008e50Initial program 99.7%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in y around inf 80.9%
Taylor expanded in a around 0 72.0%
+-commutative72.0%
mul-1-neg72.0%
unsub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 1.10000000000000008e50 < z < 7.50000000000000007e71Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-/l*100.0%
Simplified100.0%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- x (* t (/ y z)))))
(if (<= z -7.8e+90)
(+ x t)
(if (<= z -3.8e-27)
t_2
(if (<= z -4.7e-87)
t_1
(if (<= z -2.6e-116)
t_2
(if (<= z 1.2e-68)
t_1
(if (<= z 1.1e+50) t_2 (if (<= z 7.5e+71) x (+ x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = x - (t * (y / z));
double tmp;
if (z <= -7.8e+90) {
tmp = x + t;
} else if (z <= -3.8e-27) {
tmp = t_2;
} else if (z <= -4.7e-87) {
tmp = t_1;
} else if (z <= -2.6e-116) {
tmp = t_2;
} else if (z <= 1.2e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 7.5e+71) {
tmp = x;
} else {
tmp = x + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / t))
t_2 = x - (t * (y / z))
if (z <= (-7.8d+90)) then
tmp = x + t
else if (z <= (-3.8d-27)) then
tmp = t_2
else if (z <= (-4.7d-87)) then
tmp = t_1
else if (z <= (-2.6d-116)) then
tmp = t_2
else if (z <= 1.2d-68) then
tmp = t_1
else if (z <= 1.1d+50) then
tmp = t_2
else if (z <= 7.5d+71) then
tmp = x
else
tmp = x + t
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 - (t * (y / z));
double tmp;
if (z <= -7.8e+90) {
tmp = x + t;
} else if (z <= -3.8e-27) {
tmp = t_2;
} else if (z <= -4.7e-87) {
tmp = t_1;
} else if (z <= -2.6e-116) {
tmp = t_2;
} else if (z <= 1.2e-68) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = t_2;
} else if (z <= 7.5e+71) {
tmp = x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = x - (t * (y / z)) tmp = 0 if z <= -7.8e+90: tmp = x + t elif z <= -3.8e-27: tmp = t_2 elif z <= -4.7e-87: tmp = t_1 elif z <= -2.6e-116: tmp = t_2 elif z <= 1.2e-68: tmp = t_1 elif z <= 1.1e+50: tmp = t_2 elif z <= 7.5e+71: tmp = x else: tmp = x + t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(x - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -7.8e+90) tmp = Float64(x + t); elseif (z <= -3.8e-27) tmp = t_2; elseif (z <= -4.7e-87) tmp = t_1; elseif (z <= -2.6e-116) tmp = t_2; elseif (z <= 1.2e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 7.5e+71) tmp = x; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); t_2 = x - (t * (y / z)); tmp = 0.0; if (z <= -7.8e+90) tmp = x + t; elseif (z <= -3.8e-27) tmp = t_2; elseif (z <= -4.7e-87) tmp = t_1; elseif (z <= -2.6e-116) tmp = t_2; elseif (z <= 1.2e-68) tmp = t_1; elseif (z <= 1.1e+50) tmp = t_2; elseif (z <= 7.5e+71) tmp = x; else tmp = x + t; 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[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+90], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.8e-27], t$95$2, If[LessEqual[z, -4.7e-87], t$95$1, If[LessEqual[z, -2.6e-116], t$95$2, If[LessEqual[z, 1.2e-68], t$95$1, If[LessEqual[z, 1.1e+50], t$95$2, If[LessEqual[z, 7.5e+71], x, N[(x + t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{+90}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-116}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -7.8000000000000004e90 or 7.50000000000000007e71 < z Initial program 70.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.9%
if -7.8000000000000004e90 < z < -3.8e-27 or -4.7000000000000001e-87 < z < -2.6e-116 or 1.19999999999999996e-68 < z < 1.10000000000000008e50Initial program 98.3%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in y around inf 81.8%
Taylor expanded in x around 0 83.1%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in a around 0 75.1%
mul-1-neg75.1%
associate-*r/73.8%
*-commutative73.8%
associate-/r/74.3%
+-commutative74.3%
sub-neg74.3%
associate-/r/73.8%
associate-*l/75.1%
associate-*r/73.7%
Simplified73.7%
if -3.8e-27 < z < -4.7000000000000001e-87 or -2.6e-116 < z < 1.19999999999999996e-68Initial program 90.9%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around 0 79.7%
associate-/l*86.0%
Simplified86.0%
if 1.10000000000000008e50 < z < 7.50000000000000007e71Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around inf 75.4%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e+107) (not (<= z 6.8e+72))) (+ x t) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e+107) || !(z <= 6.8e+72)) {
tmp = x + t;
} else {
tmp = x + (y / ((a - 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 <= (-9.5d+107)) .or. (.not. (z <= 6.8d+72))) then
tmp = x + t
else
tmp = x + (y / ((a - 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 <= -9.5e+107) || !(z <= 6.8e+72)) {
tmp = x + t;
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e+107) or not (z <= 6.8e+72): tmp = x + t else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e+107) || !(z <= 6.8e+72)) tmp = Float64(x + t); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.5e+107) || ~((z <= 6.8e+72))) tmp = x + t; else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e+107], N[Not[LessEqual[z, 6.8e+72]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+107} \lor \neg \left(z \leq 6.8 \cdot 10^{+72}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -9.50000000000000019e107 or 6.7999999999999997e72 < z Initial program 70.6%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 85.5%
if -9.50000000000000019e107 < z < 6.7999999999999997e72Initial program 93.3%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in y around inf 86.8%
Taylor expanded in x around 0 85.4%
associate-/l*88.7%
Simplified88.7%
Final simplification87.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e+108) (not (<= z 9e+49))) (- x (/ t (+ (/ a z) -1.0))) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e+108) || !(z <= 9e+49)) {
tmp = x - (t / ((a / z) + -1.0));
} else {
tmp = x + (y / ((a - 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 <= (-1.55d+108)) .or. (.not. (z <= 9d+49))) then
tmp = x - (t / ((a / z) + (-1.0d0)))
else
tmp = x + (y / ((a - 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 <= -1.55e+108) || !(z <= 9e+49)) {
tmp = x - (t / ((a / z) + -1.0));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e+108) or not (z <= 9e+49): tmp = x - (t / ((a / z) + -1.0)) else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e+108) || !(z <= 9e+49)) tmp = Float64(x - Float64(t / Float64(Float64(a / z) + -1.0))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.55e+108) || ~((z <= 9e+49))) tmp = x - (t / ((a / z) + -1.0)); else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+108], N[Not[LessEqual[z, 9e+49]], $MachinePrecision]], N[(x - N[(t / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+108} \lor \neg \left(z \leq 9 \cdot 10^{+49}\right):\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -1.5500000000000001e108 or 8.99999999999999965e49 < z Initial program 71.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around 0 67.9%
+-commutative67.9%
mul-1-neg67.9%
*-commutative67.9%
associate-*r/89.4%
unsub-neg89.4%
associate-*r/67.9%
*-commutative67.9%
associate-/l*93.3%
div-sub93.3%
*-inverses93.3%
Simplified93.3%
if -1.5500000000000001e108 < z < 8.99999999999999965e49Initial program 93.3%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in y around inf 86.9%
Taylor expanded in x around 0 85.6%
associate-/l*88.9%
Simplified88.9%
Final simplification90.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+107) (+ x t) (if (<= z 2.35e+73) (+ x (* t (/ y (- a z)))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+107) {
tmp = x + t;
} else if (z <= 2.35e+73) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + 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 <= (-3.8d+107)) then
tmp = x + t
else if (z <= 2.35d+73) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + 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 <= -3.8e+107) {
tmp = x + t;
} else if (z <= 2.35e+73) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+107: tmp = x + t elif z <= 2.35e+73: tmp = x + (t * (y / (a - z))) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+107) tmp = Float64(x + t); elseif (z <= 2.35e+73) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+107) tmp = x + t; elseif (z <= 2.35e+73) tmp = x + (t * (y / (a - z))); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+107], N[(x + t), $MachinePrecision], If[LessEqual[z, 2.35e+73], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+107}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+73}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -3.7999999999999998e107 or 2.3500000000000001e73 < z Initial program 70.6%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 85.5%
if -3.7999999999999998e107 < z < 2.3500000000000001e73Initial program 93.3%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in y around inf 86.8%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e+111) (- x (/ t (+ (/ a z) -1.0))) (if (<= z 11.5) (+ x (/ y (/ (- a z) t))) (- x (/ t (/ z (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+111) {
tmp = x - (t / ((a / z) + -1.0));
} else if (z <= 11.5) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / (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 <= (-1.2d+111)) then
tmp = x - (t / ((a / z) + (-1.0d0)))
else if (z <= 11.5d0) then
tmp = x + (y / ((a - z) / t))
else
tmp = x - (t / (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 <= -1.2e+111) {
tmp = x - (t / ((a / z) + -1.0));
} else if (z <= 11.5) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / (z / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+111: tmp = x - (t / ((a / z) + -1.0)) elif z <= 11.5: tmp = x + (y / ((a - z) / t)) else: tmp = x - (t / (z / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+111) tmp = Float64(x - Float64(t / Float64(Float64(a / z) + -1.0))); elseif (z <= 11.5) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x - Float64(t / Float64(z / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+111) tmp = x - (t / ((a / z) + -1.0)); elseif (z <= 11.5) tmp = x + (y / ((a - z) / t)); else tmp = x - (t / (z / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+111], N[(x - N[(t / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 11.5], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+111}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\
\mathbf{elif}\;z \leq 11.5:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y - z}}\\
\end{array}
\end{array}
if z < -1.20000000000000003e111Initial program 67.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 64.7%
+-commutative64.7%
mul-1-neg64.7%
*-commutative64.7%
associate-*r/91.7%
unsub-neg91.7%
associate-*r/64.7%
*-commutative64.7%
associate-/l*94.4%
div-sub94.4%
*-inverses94.4%
Simplified94.4%
if -1.20000000000000003e111 < z < 11.5Initial program 92.8%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in y around inf 87.9%
Taylor expanded in x around 0 86.5%
associate-/l*90.6%
Simplified90.6%
if 11.5 < z Initial program 78.2%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around 0 68.4%
+-commutative68.4%
mul-1-neg68.4%
unsub-neg68.4%
associate-/l*89.5%
Simplified89.5%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+102) (+ x t) (if (<= z 7.5e+71) (+ x (* t (/ y a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+102) {
tmp = x + t;
} else if (z <= 7.5e+71) {
tmp = x + (t * (y / a));
} else {
tmp = x + 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.15d+102)) then
tmp = x + t
else if (z <= 7.5d+71) then
tmp = x + (t * (y / a))
else
tmp = x + 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.15e+102) {
tmp = x + t;
} else if (z <= 7.5e+71) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+102: tmp = x + t elif z <= 7.5e+71: tmp = x + (t * (y / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+102) tmp = Float64(x + t); elseif (z <= 7.5e+71) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+102) tmp = x + t; elseif (z <= 7.5e+71) tmp = x + (t * (y / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+102], N[(x + t), $MachinePrecision], If[LessEqual[z, 7.5e+71], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+71}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.15e102 or 7.50000000000000007e71 < z Initial program 70.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 85.7%
if -2.15e102 < z < 7.50000000000000007e71Initial program 93.3%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in z around 0 71.7%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+102) (+ x t) (if (<= z 7.4) (+ x (* y (/ t a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+102) {
tmp = x + t;
} else if (z <= 7.4) {
tmp = x + (y * (t / a));
} else {
tmp = x + 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.15d+102)) then
tmp = x + t
else if (z <= 7.4d0) then
tmp = x + (y * (t / a))
else
tmp = x + 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.15e+102) {
tmp = x + t;
} else if (z <= 7.4) {
tmp = x + (y * (t / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+102: tmp = x + t elif z <= 7.4: tmp = x + (y * (t / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+102) tmp = Float64(x + t); elseif (z <= 7.4) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+102) tmp = x + t; elseif (z <= 7.4) tmp = x + (y * (t / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+102], N[(x + t), $MachinePrecision], If[LessEqual[z, 7.4], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 7.4:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.15e102 or 7.4000000000000004 < z Initial program 74.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 80.3%
if -2.15e102 < z < 7.4000000000000004Initial program 92.8%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 86.4%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in a around inf 70.7%
associate-*r/75.3%
Simplified75.3%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.15e+102) (+ x t) (if (<= z 0.7) (+ x (/ y (/ a t))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.15e+102) {
tmp = x + t;
} else if (z <= 0.7) {
tmp = x + (y / (a / t));
} else {
tmp = x + 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.15d+102)) then
tmp = x + t
else if (z <= 0.7d0) then
tmp = x + (y / (a / t))
else
tmp = x + 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.15e+102) {
tmp = x + t;
} else if (z <= 0.7) {
tmp = x + (y / (a / t));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.15e+102: tmp = x + t elif z <= 0.7: tmp = x + (y / (a / t)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.15e+102) tmp = Float64(x + t); elseif (z <= 0.7) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.15e+102) tmp = x + t; elseif (z <= 0.7) tmp = x + (y / (a / t)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+102], N[(x + t), $MachinePrecision], If[LessEqual[z, 0.7], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 0.7:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.15e102 or 0.69999999999999996 < z Initial program 74.5%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 80.3%
if -2.15e102 < z < 0.69999999999999996Initial program 92.8%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in z around 0 70.7%
associate-/l*75.3%
Simplified75.3%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -7e+182) x (if (<= a 2.9e+112) (+ x t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7e+182) {
tmp = x;
} else if (a <= 2.9e+112) {
tmp = x + t;
} 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 <= (-7d+182)) then
tmp = x
else if (a <= 2.9d+112) then
tmp = x + t
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 <= -7e+182) {
tmp = x;
} else if (a <= 2.9e+112) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7e+182: tmp = x elif a <= 2.9e+112: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7e+182) tmp = x; elseif (a <= 2.9e+112) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7e+182) tmp = x; elseif (a <= 2.9e+112) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7e+182], x, If[LessEqual[a, 2.9e+112], N[(x + t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+182}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+112}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.00000000000000045e182 or 2.9000000000000002e112 < a Initial program 86.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around inf 72.1%
if -7.00000000000000045e182 < a < 2.9000000000000002e112Initial program 85.7%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around inf 58.2%
Final simplification61.7%
(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 86.0%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in x around inf 49.0%
Final simplification49.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023196
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))