
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* x (- (/ y (- t z)) (/ z (- t z)))))
double code(double x, double y, double z, double t) {
return x * ((y / (t - z)) - (z / (t - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y / (t - z)) - (z / (t - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / (t - z)) - (z / (t - z)));
}
def code(x, y, z, t): return x * ((y / (t - z)) - (z / (t - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / Float64(t - z)) - Float64(z / Float64(t - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / (t - z)) - (z / (t - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision] - N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{t - z} - \frac{z}{t - z}\right)
\end{array}
Initial program 85.0%
associate-*r/96.1%
Simplified96.1%
div-sub96.1%
Applied egg-rr96.1%
Final simplification96.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.3e+59)
t_1
(if (<= z -1.15e-23)
(* (- y z) (/ x t))
(if (<= z -6e-34)
t_1
(if (<= z 4.9e-72)
(/ (* x y) (- t z))
(if (<= z 50000000.0)
(/ x (- 1.0 (/ t z)))
(if (<= z 2.55e+38) (* x (/ y (- t z))) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.3e+59) {
tmp = t_1;
} else if (z <= -1.15e-23) {
tmp = (y - z) * (x / t);
} else if (z <= -6e-34) {
tmp = t_1;
} else if (z <= 4.9e-72) {
tmp = (x * y) / (t - z);
} else if (z <= 50000000.0) {
tmp = x / (1.0 - (t / z));
} else if (z <= 2.55e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.3d+59)) then
tmp = t_1
else if (z <= (-1.15d-23)) then
tmp = (y - z) * (x / t)
else if (z <= (-6d-34)) then
tmp = t_1
else if (z <= 4.9d-72) then
tmp = (x * y) / (t - z)
else if (z <= 50000000.0d0) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 2.55d+38) then
tmp = x * (y / (t - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.3e+59) {
tmp = t_1;
} else if (z <= -1.15e-23) {
tmp = (y - z) * (x / t);
} else if (z <= -6e-34) {
tmp = t_1;
} else if (z <= 4.9e-72) {
tmp = (x * y) / (t - z);
} else if (z <= 50000000.0) {
tmp = x / (1.0 - (t / z));
} else if (z <= 2.55e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.3e+59: tmp = t_1 elif z <= -1.15e-23: tmp = (y - z) * (x / t) elif z <= -6e-34: tmp = t_1 elif z <= 4.9e-72: tmp = (x * y) / (t - z) elif z <= 50000000.0: tmp = x / (1.0 - (t / z)) elif z <= 2.55e+38: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.3e+59) tmp = t_1; elseif (z <= -1.15e-23) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= -6e-34) tmp = t_1; elseif (z <= 4.9e-72) tmp = Float64(Float64(x * y) / Float64(t - z)); elseif (z <= 50000000.0) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 2.55e+38) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.3e+59) tmp = t_1; elseif (z <= -1.15e-23) tmp = (y - z) * (x / t); elseif (z <= -6e-34) tmp = t_1; elseif (z <= 4.9e-72) tmp = (x * y) / (t - z); elseif (z <= 50000000.0) tmp = x / (1.0 - (t / z)); elseif (z <= 2.55e+38) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+59], t$95$1, If[LessEqual[z, -1.15e-23], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e-34], t$95$1, If[LessEqual[z, 4.9e-72], N[(N[(x * y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 50000000.0], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e+38], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-23}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{x \cdot y}{t - z}\\
\mathbf{elif}\;z \leq 50000000:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.3e59 or -1.15000000000000005e-23 < z < -6e-34 or 2.5500000000000001e38 < z Initial program 71.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 83.4%
associate-*r/83.4%
neg-mul-183.4%
Simplified83.4%
Taylor expanded in y around 0 83.4%
mul-1-neg83.4%
unsub-neg83.4%
Simplified83.4%
if -1.3e59 < z < -1.15000000000000005e-23Initial program 93.8%
associate-*r/99.4%
Simplified99.4%
Taylor expanded in t around inf 76.5%
associate-/l*82.1%
associate-/r/82.3%
Simplified82.3%
if -6e-34 < z < 4.89999999999999991e-72Initial program 95.3%
associate-*r/90.8%
Simplified90.8%
Taylor expanded in y around inf 88.1%
if 4.89999999999999991e-72 < z < 5e7Initial program 99.8%
associate-*r/99.9%
Simplified99.9%
div-sub99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 69.0%
associate-*r/69.0%
*-commutative69.0%
associate-*r*69.0%
mul-1-neg69.0%
*-commutative69.0%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
unsub-neg69.2%
Simplified69.2%
if 5e7 < z < 2.5500000000000001e38Initial program 99.5%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.7%
Simplified99.7%
Final simplification84.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- y z) t))) (t_2 (* x (- 1.0 (/ y z)))))
(if (<= z -1.45e+59)
t_2
(if (<= z -1.6e-70)
t_1
(if (<= z 1.25e-50)
(* y (/ x (- t z)))
(if (<= z 46000000.0)
t_1
(if (<= z 3.5e+37) (* x (/ y (- t z))) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double t_2 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.45e+59) {
tmp = t_2;
} else if (z <= -1.6e-70) {
tmp = t_1;
} else if (z <= 1.25e-50) {
tmp = y * (x / (t - z));
} else if (z <= 46000000.0) {
tmp = t_1;
} else if (z <= 3.5e+37) {
tmp = x * (y / (t - z));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y - z) / t)
t_2 = x * (1.0d0 - (y / z))
if (z <= (-1.45d+59)) then
tmp = t_2
else if (z <= (-1.6d-70)) then
tmp = t_1
else if (z <= 1.25d-50) then
tmp = y * (x / (t - z))
else if (z <= 46000000.0d0) then
tmp = t_1
else if (z <= 3.5d+37) then
tmp = x * (y / (t - z))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double t_2 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.45e+59) {
tmp = t_2;
} else if (z <= -1.6e-70) {
tmp = t_1;
} else if (z <= 1.25e-50) {
tmp = y * (x / (t - z));
} else if (z <= 46000000.0) {
tmp = t_1;
} else if (z <= 3.5e+37) {
tmp = x * (y / (t - z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) t_2 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.45e+59: tmp = t_2 elif z <= -1.6e-70: tmp = t_1 elif z <= 1.25e-50: tmp = y * (x / (t - z)) elif z <= 46000000.0: tmp = t_1 elif z <= 3.5e+37: tmp = x * (y / (t - z)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) t_2 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.45e+59) tmp = t_2; elseif (z <= -1.6e-70) tmp = t_1; elseif (z <= 1.25e-50) tmp = Float64(y * Float64(x / Float64(t - z))); elseif (z <= 46000000.0) tmp = t_1; elseif (z <= 3.5e+37) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y - z) / t); t_2 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.45e+59) tmp = t_2; elseif (z <= -1.6e-70) tmp = t_1; elseif (z <= 1.25e-50) tmp = y * (x / (t - z)); elseif (z <= 46000000.0) tmp = t_1; elseif (z <= 3.5e+37) tmp = x * (y / (t - z)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+59], t$95$2, If[LessEqual[z, -1.6e-70], t$95$1, If[LessEqual[z, 1.25e-50], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 46000000.0], t$95$1, If[LessEqual[z, 3.5e+37], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
t_2 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-50}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{elif}\;z \leq 46000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.44999999999999995e59 or 3.5e37 < z Initial program 71.0%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 83.0%
associate-*r/83.0%
neg-mul-183.0%
Simplified83.0%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
if -1.44999999999999995e59 < z < -1.5999999999999999e-70 or 1.24999999999999992e-50 < z < 4.6e7Initial program 97.2%
associate-*r/99.6%
Simplified99.6%
Taylor expanded in t around inf 76.0%
if -1.5999999999999999e-70 < z < 1.24999999999999992e-50Initial program 95.1%
associate-*r/90.5%
Simplified90.5%
*-commutative90.5%
associate-/r/95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 86.7%
associate-/l*81.9%
associate-/r/86.0%
Simplified86.0%
if 4.6e7 < z < 3.5e37Initial program 99.5%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.7%
Simplified99.7%
Final simplification83.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.3e+59)
t_1
(if (<= z -1e-20)
(* (/ x t) (- z))
(if (or (<= z -5e-34) (not (<= z 3.3e-103))) t_1 (/ (* x y) t))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.3e+59) {
tmp = t_1;
} else if (z <= -1e-20) {
tmp = (x / t) * -z;
} else if ((z <= -5e-34) || !(z <= 3.3e-103)) {
tmp = t_1;
} else {
tmp = (x * y) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.3d+59)) then
tmp = t_1
else if (z <= (-1d-20)) then
tmp = (x / t) * -z
else if ((z <= (-5d-34)) .or. (.not. (z <= 3.3d-103))) then
tmp = t_1
else
tmp = (x * y) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.3e+59) {
tmp = t_1;
} else if (z <= -1e-20) {
tmp = (x / t) * -z;
} else if ((z <= -5e-34) || !(z <= 3.3e-103)) {
tmp = t_1;
} else {
tmp = (x * y) / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.3e+59: tmp = t_1 elif z <= -1e-20: tmp = (x / t) * -z elif (z <= -5e-34) or not (z <= 3.3e-103): tmp = t_1 else: tmp = (x * y) / t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.3e+59) tmp = t_1; elseif (z <= -1e-20) tmp = Float64(Float64(x / t) * Float64(-z)); elseif ((z <= -5e-34) || !(z <= 3.3e-103)) tmp = t_1; else tmp = Float64(Float64(x * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.3e+59) tmp = t_1; elseif (z <= -1e-20) tmp = (x / t) * -z; elseif ((z <= -5e-34) || ~((z <= 3.3e-103))) tmp = t_1; else tmp = (x * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+59], t$95$1, If[LessEqual[z, -1e-20], N[(N[(x / t), $MachinePrecision] * (-z)), $MachinePrecision], If[Or[LessEqual[z, -5e-34], N[Not[LessEqual[z, 3.3e-103]], $MachinePrecision]], t$95$1, N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-34} \lor \neg \left(z \leq 3.3 \cdot 10^{-103}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\end{array}
\end{array}
if z < -1.3e59 or -9.99999999999999945e-21 < z < -5.0000000000000003e-34 or 3.2999999999999999e-103 < z Initial program 76.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 77.7%
associate-*r/77.7%
neg-mul-177.7%
Simplified77.7%
Taylor expanded in y around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
if -1.3e59 < z < -9.99999999999999945e-21Initial program 93.4%
associate-*r/99.4%
Simplified99.4%
div-sub99.4%
Applied egg-rr99.4%
Taylor expanded in y around 0 67.9%
associate-*r/67.9%
*-commutative67.9%
associate-*r*67.9%
mul-1-neg67.9%
*-commutative67.9%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in t around inf 61.7%
associate-/l*61.5%
associate-*r/61.5%
neg-mul-161.5%
Simplified61.5%
frac-2neg61.5%
associate-/r/61.7%
frac-2neg61.7%
Applied egg-rr61.7%
if -5.0000000000000003e-34 < z < 3.2999999999999999e-103Initial program 95.1%
associate-*r/90.5%
Simplified90.5%
Taylor expanded in z around 0 78.6%
Final simplification77.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (- 1.0 (/ t z)))))
(if (<= z -2.3e+32)
t_1
(if (<= z 4.15e-72)
(* y (/ x (- t z)))
(if (<= z 12500000.0)
t_1
(if (<= z 2e+38) (* x (/ y (- t z))) (* x (- 1.0 (/ y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -2.3e+32) {
tmp = t_1;
} else if (z <= 4.15e-72) {
tmp = y * (x / (t - z));
} else if (z <= 12500000.0) {
tmp = t_1;
} else if (z <= 2e+38) {
tmp = x * (y / (t - z));
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - (t / z))
if (z <= (-2.3d+32)) then
tmp = t_1
else if (z <= 4.15d-72) then
tmp = y * (x / (t - z))
else if (z <= 12500000.0d0) then
tmp = t_1
else if (z <= 2d+38) then
tmp = x * (y / (t - z))
else
tmp = x * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 - (t / z));
double tmp;
if (z <= -2.3e+32) {
tmp = t_1;
} else if (z <= 4.15e-72) {
tmp = y * (x / (t - z));
} else if (z <= 12500000.0) {
tmp = t_1;
} else if (z <= 2e+38) {
tmp = x * (y / (t - z));
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (1.0 - (t / z)) tmp = 0 if z <= -2.3e+32: tmp = t_1 elif z <= 4.15e-72: tmp = y * (x / (t - z)) elif z <= 12500000.0: tmp = t_1 elif z <= 2e+38: tmp = x * (y / (t - z)) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(1.0 - Float64(t / z))) tmp = 0.0 if (z <= -2.3e+32) tmp = t_1; elseif (z <= 4.15e-72) tmp = Float64(y * Float64(x / Float64(t - z))); elseif (z <= 12500000.0) tmp = t_1; elseif (z <= 2e+38) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (1.0 - (t / z)); tmp = 0.0; if (z <= -2.3e+32) tmp = t_1; elseif (z <= 4.15e-72) tmp = y * (x / (t - z)); elseif (z <= 12500000.0) tmp = t_1; elseif (z <= 2e+38) tmp = x * (y / (t - z)); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+32], t$95$1, If[LessEqual[z, 4.15e-72], N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 12500000.0], t$95$1, If[LessEqual[z, 2e+38], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - \frac{t}{z}}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.15 \cdot 10^{-72}:\\
\;\;\;\;y \cdot \frac{x}{t - z}\\
\mathbf{elif}\;z \leq 12500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -2.3e32 or 4.1499999999999999e-72 < z < 1.25e7Initial program 77.3%
associate-*r/99.8%
Simplified99.8%
div-sub99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 58.1%
associate-*r/58.1%
*-commutative58.1%
associate-*r*58.1%
mul-1-neg58.1%
*-commutative58.1%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in t around 0 76.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
if -2.3e32 < z < 4.1499999999999999e-72Initial program 95.0%
associate-*r/91.7%
Simplified91.7%
*-commutative91.7%
associate-/r/95.3%
Applied egg-rr95.3%
Taylor expanded in y around inf 85.5%
associate-/l*82.2%
associate-/r/85.0%
Simplified85.0%
if 1.25e7 < z < 1.99999999999999995e38Initial program 99.5%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.7%
Simplified99.7%
if 1.99999999999999995e38 < z Initial program 73.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 84.1%
associate-*r/84.1%
neg-mul-184.1%
Simplified84.1%
Taylor expanded in y around 0 84.1%
mul-1-neg84.1%
unsub-neg84.1%
Simplified84.1%
Final simplification82.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.36e+59)
t_1
(if (<= z -4.1e-71)
(* x (/ (- y z) t))
(if (<= z 3.5e+38) (* x (/ y (- t z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.36e+59) {
tmp = t_1;
} else if (z <= -4.1e-71) {
tmp = x * ((y - z) / t);
} else if (z <= 3.5e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.36d+59)) then
tmp = t_1
else if (z <= (-4.1d-71)) then
tmp = x * ((y - z) / t)
else if (z <= 3.5d+38) then
tmp = x * (y / (t - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.36e+59) {
tmp = t_1;
} else if (z <= -4.1e-71) {
tmp = x * ((y - z) / t);
} else if (z <= 3.5e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.36e+59: tmp = t_1 elif z <= -4.1e-71: tmp = x * ((y - z) / t) elif z <= 3.5e+38: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.36e+59) tmp = t_1; elseif (z <= -4.1e-71) tmp = Float64(x * Float64(Float64(y - z) / t)); elseif (z <= 3.5e+38) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.36e+59) tmp = t_1; elseif (z <= -4.1e-71) tmp = x * ((y - z) / t); elseif (z <= 3.5e+38) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.36e+59], t$95$1, If[LessEqual[z, -4.1e-71], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+38], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.36 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-71}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.36e59 or 3.50000000000000002e38 < z Initial program 71.0%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 83.0%
associate-*r/83.0%
neg-mul-183.0%
Simplified83.0%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
if -1.36e59 < z < -4.09999999999999993e-71Initial program 96.2%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in t around inf 78.0%
if -4.09999999999999993e-71 < z < 3.50000000000000002e38Initial program 95.7%
associate-*r/91.8%
Simplified91.8%
Taylor expanded in y around inf 82.8%
associate-*r/78.2%
Simplified78.2%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.56e+59)
t_1
(if (<= z 1.12e-185)
(* (- y z) (/ x t))
(if (<= z 2.85e+38) (* x (/ y (- t z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.56e+59) {
tmp = t_1;
} else if (z <= 1.12e-185) {
tmp = (y - z) * (x / t);
} else if (z <= 2.85e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.56d+59)) then
tmp = t_1
else if (z <= 1.12d-185) then
tmp = (y - z) * (x / t)
else if (z <= 2.85d+38) then
tmp = x * (y / (t - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.56e+59) {
tmp = t_1;
} else if (z <= 1.12e-185) {
tmp = (y - z) * (x / t);
} else if (z <= 2.85e+38) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.56e+59: tmp = t_1 elif z <= 1.12e-185: tmp = (y - z) * (x / t) elif z <= 2.85e+38: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.56e+59) tmp = t_1; elseif (z <= 1.12e-185) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 2.85e+38) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.56e+59) tmp = t_1; elseif (z <= 1.12e-185) tmp = (y - z) * (x / t); elseif (z <= 2.85e+38) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.56e+59], t$95$1, If[LessEqual[z, 1.12e-185], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.85e+38], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.56 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-185}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{+38}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.56000000000000004e59 or 2.8499999999999999e38 < z Initial program 71.0%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 83.0%
associate-*r/83.0%
neg-mul-183.0%
Simplified83.0%
Taylor expanded in y around 0 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
if -1.56000000000000004e59 < z < 1.11999999999999993e-185Initial program 94.6%
associate-*r/91.1%
Simplified91.1%
Taylor expanded in t around inf 81.8%
associate-/l*78.9%
associate-/r/82.1%
Simplified82.1%
if 1.11999999999999993e-185 < z < 2.8499999999999999e38Initial program 99.7%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around inf 72.6%
associate-*r/72.7%
Simplified72.7%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= z -1.8e+74) x (if (<= z -8.8e-21) (/ (- x) (/ t z)) (if (<= z 2.2e+49) (/ (* x y) t) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.8e+74) {
tmp = x;
} else if (z <= -8.8e-21) {
tmp = -x / (t / z);
} else if (z <= 2.2e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.8d+74)) then
tmp = x
else if (z <= (-8.8d-21)) then
tmp = -x / (t / z)
else if (z <= 2.2d+49) then
tmp = (x * y) / t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.8e+74) {
tmp = x;
} else if (z <= -8.8e-21) {
tmp = -x / (t / z);
} else if (z <= 2.2e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.8e+74: tmp = x elif z <= -8.8e-21: tmp = -x / (t / z) elif z <= 2.2e+49: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.8e+74) tmp = x; elseif (z <= -8.8e-21) tmp = Float64(Float64(-x) / Float64(t / z)); elseif (z <= 2.2e+49) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.8e+74) tmp = x; elseif (z <= -8.8e-21) tmp = -x / (t / z); elseif (z <= 2.2e+49) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.8e+74], x, If[LessEqual[z, -8.8e-21], N[((-x) / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+49], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{-x}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.79999999999999994e74 or 2.2000000000000001e49 < z Initial program 68.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 66.5%
if -1.79999999999999994e74 < z < -8.8000000000000002e-21Initial program 95.3%
associate-*r/99.4%
Simplified99.4%
Taylor expanded in t around inf 68.0%
Taylor expanded in y around 0 58.8%
mul-1-neg58.8%
associate-/l*58.6%
Simplified58.6%
if -8.8000000000000002e-21 < z < 2.2000000000000001e49Initial program 96.1%
associate-*r/92.6%
Simplified92.6%
Taylor expanded in z around 0 67.5%
Final simplification66.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1.5e+74) x (if (<= z -2.5e-26) (* (/ x t) (- z)) (if (<= z 2.1e+49) (/ (* x y) t) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e+74) {
tmp = x;
} else if (z <= -2.5e-26) {
tmp = (x / t) * -z;
} else if (z <= 2.1e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.5d+74)) then
tmp = x
else if (z <= (-2.5d-26)) then
tmp = (x / t) * -z
else if (z <= 2.1d+49) then
tmp = (x * y) / t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e+74) {
tmp = x;
} else if (z <= -2.5e-26) {
tmp = (x / t) * -z;
} else if (z <= 2.1e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.5e+74: tmp = x elif z <= -2.5e-26: tmp = (x / t) * -z elif z <= 2.1e+49: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.5e+74) tmp = x; elseif (z <= -2.5e-26) tmp = Float64(Float64(x / t) * Float64(-z)); elseif (z <= 2.1e+49) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.5e+74) tmp = x; elseif (z <= -2.5e-26) tmp = (x / t) * -z; elseif (z <= 2.1e+49) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.5e+74], x, If[LessEqual[z, -2.5e-26], N[(N[(x / t), $MachinePrecision] * (-z)), $MachinePrecision], If[LessEqual[z, 2.1e+49], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{t} \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.5e74 or 2.10000000000000011e49 < z Initial program 68.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 66.5%
if -1.5e74 < z < -2.5000000000000001e-26Initial program 95.7%
associate-*r/99.5%
Simplified99.5%
div-sub99.5%
Applied egg-rr99.5%
Taylor expanded in y around 0 61.9%
associate-*r/61.9%
*-commutative61.9%
associate-*r*61.9%
mul-1-neg61.9%
*-commutative61.9%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in t around inf 54.1%
associate-/l*53.9%
associate-*r/53.9%
neg-mul-153.9%
Simplified53.9%
frac-2neg53.9%
associate-/r/58.0%
frac-2neg58.0%
Applied egg-rr58.0%
if -2.5000000000000001e-26 < z < 2.10000000000000011e49Initial program 96.1%
associate-*r/92.5%
Simplified92.5%
Taylor expanded in z around 0 67.8%
Final simplification66.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1.55e+74) x (if (<= z -2.1e-18) (/ (* x (- z)) t) (if (<= z 6.6e+49) (/ (* x y) t) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.55e+74) {
tmp = x;
} else if (z <= -2.1e-18) {
tmp = (x * -z) / t;
} else if (z <= 6.6e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.55d+74)) then
tmp = x
else if (z <= (-2.1d-18)) then
tmp = (x * -z) / t
else if (z <= 6.6d+49) then
tmp = (x * y) / t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.55e+74) {
tmp = x;
} else if (z <= -2.1e-18) {
tmp = (x * -z) / t;
} else if (z <= 6.6e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.55e+74: tmp = x elif z <= -2.1e-18: tmp = (x * -z) / t elif z <= 6.6e+49: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.55e+74) tmp = x; elseif (z <= -2.1e-18) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= 6.6e+49) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.55e+74) tmp = x; elseif (z <= -2.1e-18) tmp = (x * -z) / t; elseif (z <= 6.6e+49) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.55e+74], x, If[LessEqual[z, -2.1e-18], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.6e+49], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.55000000000000011e74 or 6.5999999999999997e49 < z Initial program 68.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 66.5%
if -1.55000000000000011e74 < z < -2.1e-18Initial program 95.3%
associate-*r/99.4%
Simplified99.4%
Taylor expanded in t around inf 68.0%
Taylor expanded in y around 0 58.8%
associate-*r*58.8%
neg-mul-158.8%
Simplified58.8%
if -2.1e-18 < z < 6.5999999999999997e49Initial program 96.1%
associate-*r/92.6%
Simplified92.6%
Taylor expanded in z around 0 67.5%
Final simplification66.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.7e+42) (not (<= z 7e+37))) (* x (- 1.0 (/ y z))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.7e+42) || !(z <= 7e+37)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-4.7d+42)) .or. (.not. (z <= 7d+37))) then
tmp = x * (1.0d0 - (y / z))
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.7e+42) || !(z <= 7e+37)) {
tmp = x * (1.0 - (y / z));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.7e+42) or not (z <= 7e+37): tmp = x * (1.0 - (y / z)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.7e+42) || !(z <= 7e+37)) tmp = Float64(x * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.7e+42) || ~((z <= 7e+37))) tmp = x * (1.0 - (y / z)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.7e+42], N[Not[LessEqual[z, 7e+37]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+42} \lor \neg \left(z \leq 7 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -4.69999999999999986e42 or 7e37 < z Initial program 71.7%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in t around 0 81.7%
associate-*r/81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in y around 0 81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
if -4.69999999999999986e42 < z < 7e37Initial program 95.7%
associate-*r/93.1%
Simplified93.1%
Taylor expanded in y around inf 79.2%
associate-*r/76.0%
Simplified76.0%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1.95e+43) x (if (<= z 2e+49) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.95e+43) {
tmp = x;
} else if (z <= 2e+49) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.95d+43)) then
tmp = x
else if (z <= 2d+49) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.95e+43) {
tmp = x;
} else if (z <= 2e+49) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.95e+43: tmp = x elif z <= 2e+49: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.95e+43) tmp = x; elseif (z <= 2e+49) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.95e+43) tmp = x; elseif (z <= 2e+49) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.95e+43], x, If[LessEqual[z, 2e+49], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.95e43 or 1.99999999999999989e49 < z Initial program 71.2%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 64.0%
if -1.95e43 < z < 1.99999999999999989e49Initial program 95.8%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in z around 0 63.3%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 (if (<= z -7.2e+45) x (if (<= z 4.9e-72) (* y (/ x t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e+45) {
tmp = x;
} else if (z <= 4.9e-72) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-7.2d+45)) then
tmp = x
else if (z <= 4.9d-72) then
tmp = y * (x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e+45) {
tmp = x;
} else if (z <= 4.9e-72) {
tmp = y * (x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.2e+45: tmp = x elif z <= 4.9e-72: tmp = y * (x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.2e+45) tmp = x; elseif (z <= 4.9e-72) tmp = Float64(y * Float64(x / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.2e+45) tmp = x; elseif (z <= 4.9e-72) tmp = y * (x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.2e+45], x, If[LessEqual[z, 4.9e-72], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-72}:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.2e45 or 4.89999999999999991e-72 < z Initial program 75.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 57.5%
if -7.2e45 < z < 4.89999999999999991e-72Initial program 95.1%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in z around 0 72.0%
associate-/l*70.3%
associate-/r/70.9%
Simplified70.9%
Final simplification63.9%
(FPCore (x y z t) :precision binary64 (if (<= z -2.35e+47) x (if (<= z 4.9e-72) (/ y (/ t x)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.35e+47) {
tmp = x;
} else if (z <= 4.9e-72) {
tmp = y / (t / x);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.35d+47)) then
tmp = x
else if (z <= 4.9d-72) then
tmp = y / (t / x)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.35e+47) {
tmp = x;
} else if (z <= 4.9e-72) {
tmp = y / (t / x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.35e+47: tmp = x elif z <= 4.9e-72: tmp = y / (t / x) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.35e+47) tmp = x; elseif (z <= 4.9e-72) tmp = Float64(y / Float64(t / x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.35e+47) tmp = x; elseif (z <= 4.9e-72) tmp = y / (t / x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.35e+47], x, If[LessEqual[z, 4.9e-72], N[(y / N[(t / x), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{y}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.34999999999999982e47 or 4.89999999999999991e-72 < z Initial program 75.9%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 57.5%
if -2.34999999999999982e47 < z < 4.89999999999999991e-72Initial program 95.1%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in z around 0 72.0%
associate-/l*70.3%
associate-/r/70.9%
Simplified70.9%
*-commutative70.9%
clear-num70.8%
un-div-inv70.9%
Applied egg-rr70.9%
Final simplification63.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.02e+45) x (if (<= z 4.4e+49) (/ (* x y) t) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.02e+45) {
tmp = x;
} else if (z <= 4.4e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.02d+45)) then
tmp = x
else if (z <= 4.4d+49) then
tmp = (x * y) / t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.02e+45) {
tmp = x;
} else if (z <= 4.4e+49) {
tmp = (x * y) / t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.02e+45: tmp = x elif z <= 4.4e+49: tmp = (x * y) / t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.02e+45) tmp = x; elseif (z <= 4.4e+49) tmp = Float64(Float64(x * y) / t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.02e+45) tmp = x; elseif (z <= 4.4e+49) tmp = (x * y) / t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.02e+45], x, If[LessEqual[z, 4.4e+49], N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.02e45 or 4.4000000000000001e49 < z Initial program 71.2%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in z around inf 64.0%
if -1.02e45 < z < 4.4000000000000001e49Initial program 95.8%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in z around 0 65.1%
Final simplification64.6%
(FPCore (x y z t) :precision binary64 (* x (/ (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((y - z) / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
def code(x, y, z, t): return x * ((y - z) / (t - z))
function code(x, y, z, t) return Float64(x * Float64(Float64(y - z) / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x * ((y - z) / (t - z)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 85.0%
associate-*r/96.1%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 85.0%
associate-*r/96.1%
Simplified96.1%
Taylor expanded in z around inf 33.9%
Final simplification33.9%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2023301
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))