
(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 14 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 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 86.5%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in x around 0 86.5%
associate-*r/97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))) (t_2 (* x (/ (- z) t))))
(if (<= z -2.65e+57)
x
(if (<= z -4.8e+23)
t_2
(if (<= z -7.5e-6)
x
(if (<= z -1.9e-61)
t_1
(if (<= z -1.16e-66)
x
(if (<= z -1.8e-150)
t_2
(if (<= z 3.2e+46)
t_1
(if (<= z 4e+84)
x
(if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double t_2 = x * (-z / t);
double tmp;
if (z <= -2.65e+57) {
tmp = x;
} else if (z <= -4.8e+23) {
tmp = t_2;
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -1.16e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = t_2;
} else if (z <= 3.2e+46) {
tmp = t_1;
} else if (z <= 4e+84) {
tmp = x;
} else if (z <= 3.25e+125) {
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (t / y)
t_2 = x * (-z / t)
if (z <= (-2.65d+57)) then
tmp = x
else if (z <= (-4.8d+23)) then
tmp = t_2
else if (z <= (-7.5d-6)) then
tmp = x
else if (z <= (-1.9d-61)) then
tmp = t_1
else if (z <= (-1.16d-66)) then
tmp = x
else if (z <= (-1.8d-150)) then
tmp = t_2
else if (z <= 3.2d+46) then
tmp = t_1
else if (z <= 4d+84) then
tmp = x
else if (z <= 3.25d+125) 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 t_1 = x / (t / y);
double t_2 = x * (-z / t);
double tmp;
if (z <= -2.65e+57) {
tmp = x;
} else if (z <= -4.8e+23) {
tmp = t_2;
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -1.16e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = t_2;
} else if (z <= 3.2e+46) {
tmp = t_1;
} else if (z <= 4e+84) {
tmp = x;
} else if (z <= 3.25e+125) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) t_2 = x * (-z / t) tmp = 0 if z <= -2.65e+57: tmp = x elif z <= -4.8e+23: tmp = t_2 elif z <= -7.5e-6: tmp = x elif z <= -1.9e-61: tmp = t_1 elif z <= -1.16e-66: tmp = x elif z <= -1.8e-150: tmp = t_2 elif z <= 3.2e+46: tmp = t_1 elif z <= 4e+84: tmp = x elif z <= 3.25e+125: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) t_2 = Float64(x * Float64(Float64(-z) / t)) tmp = 0.0 if (z <= -2.65e+57) tmp = x; elseif (z <= -4.8e+23) tmp = t_2; elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -1.16e-66) tmp = x; elseif (z <= -1.8e-150) tmp = t_2; elseif (z <= 3.2e+46) tmp = t_1; elseif (z <= 4e+84) tmp = x; elseif (z <= 3.25e+125) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); t_2 = x * (-z / t); tmp = 0.0; if (z <= -2.65e+57) tmp = x; elseif (z <= -4.8e+23) tmp = t_2; elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -1.16e-66) tmp = x; elseif (z <= -1.8e-150) tmp = t_2; elseif (z <= 3.2e+46) tmp = t_1; elseif (z <= 4e+84) tmp = x; elseif (z <= 3.25e+125) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+57], x, If[LessEqual[z, -4.8e+23], t$95$2, If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -1.16e-66], x, If[LessEqual[z, -1.8e-150], t$95$2, If[LessEqual[z, 3.2e+46], t$95$1, If[LessEqual[z, 4e+84], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
t_2 := x \cdot \frac{-z}{t}\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{+23}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+84}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.64999999999999993e57 or -4.8e23 < z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -1.16000000000000002e-66 or 3.1999999999999998e46 < z < 4.00000000000000023e84 or 3.2499999999999999e125 < z Initial program 75.7%
associate-*l/71.3%
Simplified71.3%
Taylor expanded in z around inf 69.1%
if -2.64999999999999993e57 < z < -4.8e23 or -1.16000000000000002e-66 < z < -1.8000000000000001e-150Initial program 96.0%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in x around 0 96.0%
associate-*r/99.2%
Simplified99.2%
Taylor expanded in y around 0 55.2%
associate-*r/55.2%
neg-mul-155.2%
Simplified55.2%
Taylor expanded in z around 0 50.9%
mul-1-neg50.9%
distribute-neg-frac50.9%
Simplified50.9%
if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 3.1999999999999998e46Initial program 95.4%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 68.8%
associate-/l*70.8%
Simplified70.8%
if 4.00000000000000023e84 < z < 3.2499999999999999e125Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 51.9%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))))
(if (<= z -2.7e+57)
x
(if (<= z -1.2e+19)
(* x (/ (- z) t))
(if (<= z -7.5e-6)
x
(if (<= z -1.9e-61)
t_1
(if (<= z -2.7e-68)
x
(if (<= z -1.8e-150)
(* z (/ (- x) t))
(if (<= z 4.1e+47)
t_1
(if (<= z 9.2e+85)
x
(if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -2.7e+57) {
tmp = x;
} else if (z <= -1.2e+19) {
tmp = x * (-z / t);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -2.7e-68) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z * (-x / t);
} else if (z <= 4.1e+47) {
tmp = t_1;
} else if (z <= 9.2e+85) {
tmp = x;
} else if (z <= 3.25e+125) {
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) :: t_1
real(8) :: tmp
t_1 = x / (t / y)
if (z <= (-2.7d+57)) then
tmp = x
else if (z <= (-1.2d+19)) then
tmp = x * (-z / t)
else if (z <= (-7.5d-6)) then
tmp = x
else if (z <= (-1.9d-61)) then
tmp = t_1
else if (z <= (-2.7d-68)) then
tmp = x
else if (z <= (-1.8d-150)) then
tmp = z * (-x / t)
else if (z <= 4.1d+47) then
tmp = t_1
else if (z <= 9.2d+85) then
tmp = x
else if (z <= 3.25d+125) 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 t_1 = x / (t / y);
double tmp;
if (z <= -2.7e+57) {
tmp = x;
} else if (z <= -1.2e+19) {
tmp = x * (-z / t);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -2.7e-68) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z * (-x / t);
} else if (z <= 4.1e+47) {
tmp = t_1;
} else if (z <= 9.2e+85) {
tmp = x;
} else if (z <= 3.25e+125) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) tmp = 0 if z <= -2.7e+57: tmp = x elif z <= -1.2e+19: tmp = x * (-z / t) elif z <= -7.5e-6: tmp = x elif z <= -1.9e-61: tmp = t_1 elif z <= -2.7e-68: tmp = x elif z <= -1.8e-150: tmp = z * (-x / t) elif z <= 4.1e+47: tmp = t_1 elif z <= 9.2e+85: tmp = x elif z <= 3.25e+125: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) tmp = 0.0 if (z <= -2.7e+57) tmp = x; elseif (z <= -1.2e+19) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -2.7e-68) tmp = x; elseif (z <= -1.8e-150) tmp = Float64(z * Float64(Float64(-x) / t)); elseif (z <= 4.1e+47) tmp = t_1; elseif (z <= 9.2e+85) tmp = x; elseif (z <= 3.25e+125) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); tmp = 0.0; if (z <= -2.7e+57) tmp = x; elseif (z <= -1.2e+19) tmp = x * (-z / t); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -2.7e-68) tmp = x; elseif (z <= -1.8e-150) tmp = z * (-x / t); elseif (z <= 4.1e+47) tmp = t_1; elseif (z <= 9.2e+85) tmp = x; elseif (z <= 3.25e+125) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+57], x, If[LessEqual[z, -1.2e+19], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -2.7e-68], x, If[LessEqual[z, -1.8e-150], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+47], t$95$1, If[LessEqual[z, 9.2e+85], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+85}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.6999999999999998e57 or -1.2e19 < z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -2.7000000000000002e-68 or 4.1000000000000001e47 < z < 9.1999999999999996e85 or 3.2499999999999999e125 < z Initial program 75.7%
associate-*l/71.3%
Simplified71.3%
Taylor expanded in z around inf 69.1%
if -2.6999999999999998e57 < z < -1.2e19Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in x around 0 99.6%
associate-*r/99.6%
Simplified99.6%
Taylor expanded in y around 0 71.9%
associate-*r/71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in z around 0 62.4%
mul-1-neg62.4%
distribute-neg-frac62.4%
Simplified62.4%
if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 4.1000000000000001e47Initial program 95.4%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 68.8%
associate-/l*70.8%
Simplified70.8%
if -2.7000000000000002e-68 < z < -1.8000000000000001e-150Initial program 94.5%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in t around inf 60.5%
associate-/l*57.5%
Simplified57.5%
Taylor expanded in y around 0 44.0%
mul-1-neg44.0%
associate-*l/46.7%
distribute-rgt-neg-in46.7%
Simplified46.7%
if 9.1999999999999996e85 < z < 3.2499999999999999e125Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 51.9%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))))
(if (<= z -5.1e+57)
x
(if (<= z -3e+26)
(/ x (/ (- t) z))
(if (<= z -7.5e-6)
x
(if (<= z -2.55e-61)
t_1
(if (<= z -1.05e-66)
x
(if (<= z -1.8e-150)
(* z (/ (- x) t))
(if (<= z 1.2e+48)
t_1
(if (<= z 6.5e+83)
x
(if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -5.1e+57) {
tmp = x;
} else if (z <= -3e+26) {
tmp = x / (-t / z);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -2.55e-61) {
tmp = t_1;
} else if (z <= -1.05e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z * (-x / t);
} else if (z <= 1.2e+48) {
tmp = t_1;
} else if (z <= 6.5e+83) {
tmp = x;
} else if (z <= 3.25e+125) {
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) :: t_1
real(8) :: tmp
t_1 = x / (t / y)
if (z <= (-5.1d+57)) then
tmp = x
else if (z <= (-3d+26)) then
tmp = x / (-t / z)
else if (z <= (-7.5d-6)) then
tmp = x
else if (z <= (-2.55d-61)) then
tmp = t_1
else if (z <= (-1.05d-66)) then
tmp = x
else if (z <= (-1.8d-150)) then
tmp = z * (-x / t)
else if (z <= 1.2d+48) then
tmp = t_1
else if (z <= 6.5d+83) then
tmp = x
else if (z <= 3.25d+125) 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 t_1 = x / (t / y);
double tmp;
if (z <= -5.1e+57) {
tmp = x;
} else if (z <= -3e+26) {
tmp = x / (-t / z);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -2.55e-61) {
tmp = t_1;
} else if (z <= -1.05e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z * (-x / t);
} else if (z <= 1.2e+48) {
tmp = t_1;
} else if (z <= 6.5e+83) {
tmp = x;
} else if (z <= 3.25e+125) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) tmp = 0 if z <= -5.1e+57: tmp = x elif z <= -3e+26: tmp = x / (-t / z) elif z <= -7.5e-6: tmp = x elif z <= -2.55e-61: tmp = t_1 elif z <= -1.05e-66: tmp = x elif z <= -1.8e-150: tmp = z * (-x / t) elif z <= 1.2e+48: tmp = t_1 elif z <= 6.5e+83: tmp = x elif z <= 3.25e+125: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) tmp = 0.0 if (z <= -5.1e+57) tmp = x; elseif (z <= -3e+26) tmp = Float64(x / Float64(Float64(-t) / z)); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -2.55e-61) tmp = t_1; elseif (z <= -1.05e-66) tmp = x; elseif (z <= -1.8e-150) tmp = Float64(z * Float64(Float64(-x) / t)); elseif (z <= 1.2e+48) tmp = t_1; elseif (z <= 6.5e+83) tmp = x; elseif (z <= 3.25e+125) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); tmp = 0.0; if (z <= -5.1e+57) tmp = x; elseif (z <= -3e+26) tmp = x / (-t / z); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -2.55e-61) tmp = t_1; elseif (z <= -1.05e-66) tmp = x; elseif (z <= -1.8e-150) tmp = z * (-x / t); elseif (z <= 1.2e+48) tmp = t_1; elseif (z <= 6.5e+83) tmp = x; elseif (z <= 3.25e+125) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+57], x, If[LessEqual[z, -3e+26], N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -2.55e-61], t$95$1, If[LessEqual[z, -1.05e-66], x, If[LessEqual[z, -1.8e-150], N[(z * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+48], t$95$1, If[LessEqual[z, 6.5e+83], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.10000000000000023e57 or -2.99999999999999997e26 < z < -7.50000000000000019e-6 or -2.54999999999999984e-61 < z < -1.05e-66 or 1.2000000000000001e48 < z < 6.5000000000000003e83 or 3.2499999999999999e125 < z Initial program 75.7%
associate-*l/71.3%
Simplified71.3%
Taylor expanded in z around inf 69.1%
if -5.10000000000000023e57 < z < -2.99999999999999997e26Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around inf 61.3%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if -7.50000000000000019e-6 < z < -2.54999999999999984e-61 or -1.8000000000000001e-150 < z < 1.2000000000000001e48Initial program 95.4%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 68.8%
associate-/l*70.8%
Simplified70.8%
if -1.05e-66 < z < -1.8000000000000001e-150Initial program 94.5%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in t around inf 60.5%
associate-/l*57.5%
Simplified57.5%
Taylor expanded in y around 0 44.0%
mul-1-neg44.0%
associate-*l/46.7%
distribute-rgt-neg-in46.7%
Simplified46.7%
if 6.5000000000000003e83 < z < 3.2499999999999999e125Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 51.9%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ t y))))
(if (<= z -2.4e+57)
x
(if (<= z -1.9e+21)
(/ x (/ (- t) z))
(if (<= z -7.5e-6)
x
(if (<= z -1.9e-61)
t_1
(if (<= z -1.16e-66)
x
(if (<= z -1.8e-150)
(/ z (/ (- t) x))
(if (<= z 3.6e+47)
t_1
(if (<= z 6.5e+84)
x
(if (<= z 3.25e+125) (* x (/ y t)) x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t / y);
double tmp;
if (z <= -2.4e+57) {
tmp = x;
} else if (z <= -1.9e+21) {
tmp = x / (-t / z);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -1.16e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z / (-t / x);
} else if (z <= 3.6e+47) {
tmp = t_1;
} else if (z <= 6.5e+84) {
tmp = x;
} else if (z <= 3.25e+125) {
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) :: t_1
real(8) :: tmp
t_1 = x / (t / y)
if (z <= (-2.4d+57)) then
tmp = x
else if (z <= (-1.9d+21)) then
tmp = x / (-t / z)
else if (z <= (-7.5d-6)) then
tmp = x
else if (z <= (-1.9d-61)) then
tmp = t_1
else if (z <= (-1.16d-66)) then
tmp = x
else if (z <= (-1.8d-150)) then
tmp = z / (-t / x)
else if (z <= 3.6d+47) then
tmp = t_1
else if (z <= 6.5d+84) then
tmp = x
else if (z <= 3.25d+125) 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 t_1 = x / (t / y);
double tmp;
if (z <= -2.4e+57) {
tmp = x;
} else if (z <= -1.9e+21) {
tmp = x / (-t / z);
} else if (z <= -7.5e-6) {
tmp = x;
} else if (z <= -1.9e-61) {
tmp = t_1;
} else if (z <= -1.16e-66) {
tmp = x;
} else if (z <= -1.8e-150) {
tmp = z / (-t / x);
} else if (z <= 3.6e+47) {
tmp = t_1;
} else if (z <= 6.5e+84) {
tmp = x;
} else if (z <= 3.25e+125) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t / y) tmp = 0 if z <= -2.4e+57: tmp = x elif z <= -1.9e+21: tmp = x / (-t / z) elif z <= -7.5e-6: tmp = x elif z <= -1.9e-61: tmp = t_1 elif z <= -1.16e-66: tmp = x elif z <= -1.8e-150: tmp = z / (-t / x) elif z <= 3.6e+47: tmp = t_1 elif z <= 6.5e+84: tmp = x elif z <= 3.25e+125: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t / y)) tmp = 0.0 if (z <= -2.4e+57) tmp = x; elseif (z <= -1.9e+21) tmp = Float64(x / Float64(Float64(-t) / z)); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -1.16e-66) tmp = x; elseif (z <= -1.8e-150) tmp = Float64(z / Float64(Float64(-t) / x)); elseif (z <= 3.6e+47) tmp = t_1; elseif (z <= 6.5e+84) tmp = x; elseif (z <= 3.25e+125) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t / y); tmp = 0.0; if (z <= -2.4e+57) tmp = x; elseif (z <= -1.9e+21) tmp = x / (-t / z); elseif (z <= -7.5e-6) tmp = x; elseif (z <= -1.9e-61) tmp = t_1; elseif (z <= -1.16e-66) tmp = x; elseif (z <= -1.8e-150) tmp = z / (-t / x); elseif (z <= 3.6e+47) tmp = t_1; elseif (z <= 6.5e+84) tmp = x; elseif (z <= 3.25e+125) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+57], x, If[LessEqual[z, -1.9e+21], N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, -1.9e-61], t$95$1, If[LessEqual[z, -1.16e-66], x, If[LessEqual[z, -1.8e-150], N[(z / N[((-t) / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+47], t$95$1, If[LessEqual[z, 6.5e+84], x, If[LessEqual[z, 3.25e+125], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{t}{y}}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.16 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-150}:\\
\;\;\;\;\frac{z}{\frac{-t}{x}}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+84}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.40000000000000005e57 or -1.9e21 < z < -7.50000000000000019e-6 or -1.8999999999999999e-61 < z < -1.16000000000000002e-66 or 3.60000000000000008e47 < z < 6.50000000000000027e84 or 3.2499999999999999e125 < z Initial program 75.7%
associate-*l/71.3%
Simplified71.3%
Taylor expanded in z around inf 69.1%
if -2.40000000000000005e57 < z < -1.9e21Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around inf 61.3%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if -7.50000000000000019e-6 < z < -1.8999999999999999e-61 or -1.8000000000000001e-150 < z < 3.60000000000000008e47Initial program 95.4%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 68.8%
associate-/l*70.8%
Simplified70.8%
if -1.16000000000000002e-66 < z < -1.8000000000000001e-150Initial program 94.5%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in x around 0 94.5%
associate-*r/99.1%
Simplified99.1%
Taylor expanded in y around 0 48.3%
associate-*r/48.3%
neg-mul-148.3%
Simplified48.3%
Taylor expanded in z around 0 46.1%
mul-1-neg46.1%
distribute-neg-frac46.1%
Simplified46.1%
*-commutative46.1%
frac-2neg46.1%
remove-double-neg46.1%
associate-*l/44.0%
Applied egg-rr44.0%
associate-/l*46.7%
distribute-frac-neg46.7%
Simplified46.7%
if 6.50000000000000027e84 < z < 3.2499999999999999e125Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 51.9%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t z)))))
(if (<= z -6e+57)
x
(if (<= z -6e+23)
(/ x (/ (- t) z))
(if (<= z -680000000.0)
x
(if (<= z -8.2e-104)
t_1
(if (<= z -6.6e-280)
(* (- y z) (/ x t))
(if (or (<= z 6.6e+48) (and (not (<= z 7e+84)) (<= z 1.8e+128)))
t_1
x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -6e+57) {
tmp = x;
} else if (z <= -6e+23) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -8.2e-104) {
tmp = t_1;
} else if (z <= -6.6e-280) {
tmp = (y - z) * (x / t);
} else if ((z <= 6.6e+48) || (!(z <= 7e+84) && (z <= 1.8e+128))) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (y / (t - z))
if (z <= (-6d+57)) then
tmp = x
else if (z <= (-6d+23)) then
tmp = x / (-t / z)
else if (z <= (-680000000.0d0)) then
tmp = x
else if (z <= (-8.2d-104)) then
tmp = t_1
else if (z <= (-6.6d-280)) then
tmp = (y - z) * (x / t)
else if ((z <= 6.6d+48) .or. (.not. (z <= 7d+84)) .and. (z <= 1.8d+128)) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / (t - z));
double tmp;
if (z <= -6e+57) {
tmp = x;
} else if (z <= -6e+23) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -8.2e-104) {
tmp = t_1;
} else if (z <= -6.6e-280) {
tmp = (y - z) * (x / t);
} else if ((z <= 6.6e+48) || (!(z <= 7e+84) && (z <= 1.8e+128))) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / (t - z)) tmp = 0 if z <= -6e+57: tmp = x elif z <= -6e+23: tmp = x / (-t / z) elif z <= -680000000.0: tmp = x elif z <= -8.2e-104: tmp = t_1 elif z <= -6.6e-280: tmp = (y - z) * (x / t) elif (z <= 6.6e+48) or (not (z <= 7e+84) and (z <= 1.8e+128)): tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(t - z))) tmp = 0.0 if (z <= -6e+57) tmp = x; elseif (z <= -6e+23) tmp = Float64(x / Float64(Float64(-t) / z)); elseif (z <= -680000000.0) tmp = x; elseif (z <= -8.2e-104) tmp = t_1; elseif (z <= -6.6e-280) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif ((z <= 6.6e+48) || (!(z <= 7e+84) && (z <= 1.8e+128))) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / (t - z)); tmp = 0.0; if (z <= -6e+57) tmp = x; elseif (z <= -6e+23) tmp = x / (-t / z); elseif (z <= -680000000.0) tmp = x; elseif (z <= -8.2e-104) tmp = t_1; elseif (z <= -6.6e-280) tmp = (y - z) * (x / t); elseif ((z <= 6.6e+48) || (~((z <= 7e+84)) && (z <= 1.8e+128))) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+57], x, If[LessEqual[z, -6e+23], N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -8.2e-104], t$95$1, If[LessEqual[z, -6.6e-280], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6.6e+48], And[N[Not[LessEqual[z, 7e+84]], $MachinePrecision], LessEqual[z, 1.8e+128]]], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{t - z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-280}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+48} \lor \neg \left(z \leq 7 \cdot 10^{+84}\right) \land z \leq 1.8 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.9999999999999999e57 or -6.0000000000000002e23 < z < -6.8e8 or 6.60000000000000045e48 < z < 6.9999999999999998e84 or 1.80000000000000014e128 < z Initial program 74.3%
associate-*l/69.6%
Simplified69.6%
Taylor expanded in z around inf 70.4%
if -5.9999999999999999e57 < z < -6.0000000000000002e23Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around inf 61.3%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if -6.8e8 < z < -8.19999999999999968e-104 or -6.59999999999999982e-280 < z < 6.60000000000000045e48 or 6.9999999999999998e84 < z < 1.80000000000000014e128Initial program 93.8%
associate-*l/90.3%
Simplified90.3%
Taylor expanded in y around inf 77.0%
*-commutative77.0%
associate-/l*73.8%
associate-/r/82.0%
Simplified82.0%
if -8.19999999999999968e-104 < z < -6.59999999999999982e-280Initial program 96.4%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in t around inf 84.9%
associate-/l*77.2%
associate-/r/84.4%
Simplified84.4%
Final simplification77.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x (- t z)))) (t_2 (* x (/ (- y z) t))))
(if (<= z -3.8e+57)
x
(if (<= z -2.6e+19)
(/ x (/ (- t) z))
(if (<= z -680000000.0)
x
(if (<= z -5e-98)
t_1
(if (<= z 1.05e-299)
t_2
(if (<= z 5.4e+47)
t_1
(if (<= z 1.55e+83) x (if (<= z 4e+125) t_2 x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double t_2 = x * ((y - z) / t);
double tmp;
if (z <= -3.8e+57) {
tmp = x;
} else if (z <= -2.6e+19) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -5e-98) {
tmp = t_1;
} else if (z <= 1.05e-299) {
tmp = t_2;
} else if (z <= 5.4e+47) {
tmp = t_1;
} else if (z <= 1.55e+83) {
tmp = x;
} else if (z <= 4e+125) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (x / (t - z))
t_2 = x * ((y - z) / t)
if (z <= (-3.8d+57)) then
tmp = x
else if (z <= (-2.6d+19)) then
tmp = x / (-t / z)
else if (z <= (-680000000.0d0)) then
tmp = x
else if (z <= (-5d-98)) then
tmp = t_1
else if (z <= 1.05d-299) then
tmp = t_2
else if (z <= 5.4d+47) then
tmp = t_1
else if (z <= 1.55d+83) then
tmp = x
else if (z <= 4d+125) then
tmp = t_2
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double t_2 = x * ((y - z) / t);
double tmp;
if (z <= -3.8e+57) {
tmp = x;
} else if (z <= -2.6e+19) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -5e-98) {
tmp = t_1;
} else if (z <= 1.05e-299) {
tmp = t_2;
} else if (z <= 5.4e+47) {
tmp = t_1;
} else if (z <= 1.55e+83) {
tmp = x;
} else if (z <= 4e+125) {
tmp = t_2;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / (t - z)) t_2 = x * ((y - z) / t) tmp = 0 if z <= -3.8e+57: tmp = x elif z <= -2.6e+19: tmp = x / (-t / z) elif z <= -680000000.0: tmp = x elif z <= -5e-98: tmp = t_1 elif z <= 1.05e-299: tmp = t_2 elif z <= 5.4e+47: tmp = t_1 elif z <= 1.55e+83: tmp = x elif z <= 4e+125: tmp = t_2 else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / Float64(t - z))) t_2 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (z <= -3.8e+57) tmp = x; elseif (z <= -2.6e+19) tmp = Float64(x / Float64(Float64(-t) / z)); elseif (z <= -680000000.0) tmp = x; elseif (z <= -5e-98) tmp = t_1; elseif (z <= 1.05e-299) tmp = t_2; elseif (z <= 5.4e+47) tmp = t_1; elseif (z <= 1.55e+83) tmp = x; elseif (z <= 4e+125) tmp = t_2; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / (t - z)); t_2 = x * ((y - z) / t); tmp = 0.0; if (z <= -3.8e+57) tmp = x; elseif (z <= -2.6e+19) tmp = x / (-t / z); elseif (z <= -680000000.0) tmp = x; elseif (z <= -5e-98) tmp = t_1; elseif (z <= 1.05e-299) tmp = t_2; elseif (z <= 5.4e+47) tmp = t_1; elseif (z <= 1.55e+83) tmp = x; elseif (z <= 4e+125) tmp = t_2; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+57], x, If[LessEqual[z, -2.6e+19], N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -5e-98], t$95$1, If[LessEqual[z, 1.05e-299], t$95$2, If[LessEqual[z, 5.4e+47], t$95$1, If[LessEqual[z, 1.55e+83], x, If[LessEqual[z, 4e+125], t$95$2, x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{t - z}\\
t_2 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-299}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.7999999999999999e57 or -2.6e19 < z < -6.8e8 or 5.39999999999999991e47 < z < 1.54999999999999996e83 or 3.9999999999999997e125 < z Initial program 74.6%
associate-*l/69.9%
Simplified69.9%
Taylor expanded in z around inf 69.7%
if -3.7999999999999999e57 < z < -2.6e19Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around inf 61.3%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if -6.8e8 < z < -5.00000000000000018e-98 or 1.05000000000000005e-299 < z < 5.39999999999999991e47Initial program 94.5%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in y around inf 75.7%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
if -5.00000000000000018e-98 < z < 1.05000000000000005e-299 or 1.54999999999999996e83 < z < 3.9999999999999997e125Initial program 94.2%
associate-*l/83.0%
Simplified83.0%
Taylor expanded in x around 0 94.2%
associate-*r/94.5%
Simplified94.5%
Taylor expanded in t around inf 81.2%
Final simplification75.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x (- t z)))))
(if (<= z -4.5e+57)
x
(if (<= z -2.3e+26)
(/ x (/ (- t) z))
(if (<= z -680000000.0)
x
(if (<= z -3.8e-106)
t_1
(if (<= z 6.8e-57)
(* (- y z) (/ x t))
(if (<= z 6.6e+48)
t_1
(if (<= z 1.15e+82)
x
(if (<= z 7.8e+126) (* x (/ (- y z) t)) x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double tmp;
if (z <= -4.5e+57) {
tmp = x;
} else if (z <= -2.3e+26) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -3.8e-106) {
tmp = t_1;
} else if (z <= 6.8e-57) {
tmp = (y - z) * (x / t);
} else if (z <= 6.6e+48) {
tmp = t_1;
} else if (z <= 1.15e+82) {
tmp = x;
} else if (z <= 7.8e+126) {
tmp = x * ((y - z) / 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) :: t_1
real(8) :: tmp
t_1 = y * (x / (t - z))
if (z <= (-4.5d+57)) then
tmp = x
else if (z <= (-2.3d+26)) then
tmp = x / (-t / z)
else if (z <= (-680000000.0d0)) then
tmp = x
else if (z <= (-3.8d-106)) then
tmp = t_1
else if (z <= 6.8d-57) then
tmp = (y - z) * (x / t)
else if (z <= 6.6d+48) then
tmp = t_1
else if (z <= 1.15d+82) then
tmp = x
else if (z <= 7.8d+126) then
tmp = x * ((y - z) / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / (t - z));
double tmp;
if (z <= -4.5e+57) {
tmp = x;
} else if (z <= -2.3e+26) {
tmp = x / (-t / z);
} else if (z <= -680000000.0) {
tmp = x;
} else if (z <= -3.8e-106) {
tmp = t_1;
} else if (z <= 6.8e-57) {
tmp = (y - z) * (x / t);
} else if (z <= 6.6e+48) {
tmp = t_1;
} else if (z <= 1.15e+82) {
tmp = x;
} else if (z <= 7.8e+126) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / (t - z)) tmp = 0 if z <= -4.5e+57: tmp = x elif z <= -2.3e+26: tmp = x / (-t / z) elif z <= -680000000.0: tmp = x elif z <= -3.8e-106: tmp = t_1 elif z <= 6.8e-57: tmp = (y - z) * (x / t) elif z <= 6.6e+48: tmp = t_1 elif z <= 1.15e+82: tmp = x elif z <= 7.8e+126: tmp = x * ((y - z) / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / Float64(t - z))) tmp = 0.0 if (z <= -4.5e+57) tmp = x; elseif (z <= -2.3e+26) tmp = Float64(x / Float64(Float64(-t) / z)); elseif (z <= -680000000.0) tmp = x; elseif (z <= -3.8e-106) tmp = t_1; elseif (z <= 6.8e-57) tmp = Float64(Float64(y - z) * Float64(x / t)); elseif (z <= 6.6e+48) tmp = t_1; elseif (z <= 1.15e+82) tmp = x; elseif (z <= 7.8e+126) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / (t - z)); tmp = 0.0; if (z <= -4.5e+57) tmp = x; elseif (z <= -2.3e+26) tmp = x / (-t / z); elseif (z <= -680000000.0) tmp = x; elseif (z <= -3.8e-106) tmp = t_1; elseif (z <= 6.8e-57) tmp = (y - z) * (x / t); elseif (z <= 6.6e+48) tmp = t_1; elseif (z <= 1.15e+82) tmp = x; elseif (z <= 7.8e+126) tmp = x * ((y - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+57], x, If[LessEqual[z, -2.3e+26], N[(x / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -680000000.0], x, If[LessEqual[z, -3.8e-106], t$95$1, If[LessEqual[z, 6.8e-57], N[(N[(y - z), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+48], t$95$1, If[LessEqual[z, 1.15e+82], x, If[LessEqual[z, 7.8e+126], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{t - z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{\frac{-t}{z}}\\
\mathbf{elif}\;z \leq -680000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-57}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+82}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.49999999999999996e57 or -2.3000000000000001e26 < z < -6.8e8 or 6.60000000000000045e48 < z < 1.14999999999999994e82 or 7.79999999999999986e126 < z Initial program 74.6%
associate-*l/69.9%
Simplified69.9%
Taylor expanded in z around inf 69.7%
if -4.49999999999999996e57 < z < -2.3000000000000001e26Initial program 99.6%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around inf 61.3%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in y around 0 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if -6.8e8 < z < -3.7999999999999999e-106 or 6.80000000000000032e-57 < z < 6.60000000000000045e48Initial program 90.6%
associate-*l/92.0%
Simplified92.0%
Taylor expanded in y around inf 72.6%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
if -3.7999999999999999e-106 < z < 6.80000000000000032e-57Initial program 96.8%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 81.9%
associate-/l*78.6%
associate-/r/81.0%
Simplified81.0%
if 1.14999999999999994e82 < z < 7.79999999999999986e126Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in t around inf 70.6%
Final simplification75.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -6e+57)
x
(if (or (<= z 6.6e+48) (and (not (<= z 3.8e+85)) (<= z 4.3e+125)))
(* x (/ (- y z) t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6e+57) {
tmp = x;
} else if ((z <= 6.6e+48) || (!(z <= 3.8e+85) && (z <= 4.3e+125))) {
tmp = x * ((y - z) / 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 <= (-6d+57)) then
tmp = x
else if ((z <= 6.6d+48) .or. (.not. (z <= 3.8d+85)) .and. (z <= 4.3d+125)) then
tmp = x * ((y - z) / 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 <= -6e+57) {
tmp = x;
} else if ((z <= 6.6e+48) || (!(z <= 3.8e+85) && (z <= 4.3e+125))) {
tmp = x * ((y - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6e+57: tmp = x elif (z <= 6.6e+48) or (not (z <= 3.8e+85) and (z <= 4.3e+125)): tmp = x * ((y - z) / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6e+57) tmp = x; elseif ((z <= 6.6e+48) || (!(z <= 3.8e+85) && (z <= 4.3e+125))) tmp = Float64(x * Float64(Float64(y - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6e+57) tmp = x; elseif ((z <= 6.6e+48) || (~((z <= 3.8e+85)) && (z <= 4.3e+125))) tmp = x * ((y - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6e+57], x, If[Or[LessEqual[z, 6.6e+48], And[N[Not[LessEqual[z, 3.8e+85]], $MachinePrecision], LessEqual[z, 4.3e+125]]], N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+48} \lor \neg \left(z \leq 3.8 \cdot 10^{+85}\right) \land z \leq 4.3 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.9999999999999999e57 or 6.60000000000000045e48 < z < 3.79999999999999992e85 or 4.30000000000000035e125 < z Initial program 73.3%
associate-*l/68.4%
Simplified68.4%
Taylor expanded in z around inf 69.2%
if -5.9999999999999999e57 < z < 6.60000000000000045e48 or 3.79999999999999992e85 < z < 4.30000000000000035e125Initial program 94.8%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in x around 0 94.8%
associate-*r/96.4%
Simplified96.4%
Taylor expanded in t around inf 71.1%
Final simplification70.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.5e-6)
x
(if (or (<= z 1.35e+47) (and (not (<= z 1.35e+83)) (<= z 3.25e+125)))
(* x (/ y t))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e-6) {
tmp = x;
} else if ((z <= 1.35e+47) || (!(z <= 1.35e+83) && (z <= 3.25e+125))) {
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 <= (-7.5d-6)) then
tmp = x
else if ((z <= 1.35d+47) .or. (.not. (z <= 1.35d+83)) .and. (z <= 3.25d+125)) 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 <= -7.5e-6) {
tmp = x;
} else if ((z <= 1.35e+47) || (!(z <= 1.35e+83) && (z <= 3.25e+125))) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.5e-6: tmp = x elif (z <= 1.35e+47) or (not (z <= 1.35e+83) and (z <= 3.25e+125)): tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.5e-6) tmp = x; elseif ((z <= 1.35e+47) || (!(z <= 1.35e+83) && (z <= 3.25e+125))) 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 <= -7.5e-6) tmp = x; elseif ((z <= 1.35e+47) || (~((z <= 1.35e+83)) && (z <= 3.25e+125))) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.5e-6], x, If[Or[LessEqual[z, 1.35e+47], And[N[Not[LessEqual[z, 1.35e+83]], $MachinePrecision], LessEqual[z, 3.25e+125]]], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+47} \lor \neg \left(z \leq 1.35 \cdot 10^{+83}\right) \land z \leq 3.25 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.50000000000000019e-6 or 1.34999999999999998e47 < z < 1.35000000000000003e83 or 3.2499999999999999e125 < z Initial program 76.8%
associate-*l/71.9%
Simplified71.9%
Taylor expanded in z around inf 64.5%
if -7.50000000000000019e-6 < z < 1.34999999999999998e47 or 1.35000000000000003e83 < z < 3.2499999999999999e125Initial program 94.3%
associate-*l/91.0%
Simplified91.0%
Taylor expanded in x around 0 94.3%
associate-*r/96.0%
Simplified96.0%
Taylor expanded in z around 0 63.7%
Final simplification64.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.5e-6)
x
(if (<= z 6e+46)
(/ x (/ t y))
(if (<= z 2.65e+85) x (if (<= z 7.8e+126) (* x (/ y t)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e-6) {
tmp = x;
} else if (z <= 6e+46) {
tmp = x / (t / y);
} else if (z <= 2.65e+85) {
tmp = x;
} else if (z <= 7.8e+126) {
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 <= (-7.5d-6)) then
tmp = x
else if (z <= 6d+46) then
tmp = x / (t / y)
else if (z <= 2.65d+85) then
tmp = x
else if (z <= 7.8d+126) 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 <= -7.5e-6) {
tmp = x;
} else if (z <= 6e+46) {
tmp = x / (t / y);
} else if (z <= 2.65e+85) {
tmp = x;
} else if (z <= 7.8e+126) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.5e-6: tmp = x elif z <= 6e+46: tmp = x / (t / y) elif z <= 2.65e+85: tmp = x elif z <= 7.8e+126: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.5e-6) tmp = x; elseif (z <= 6e+46) tmp = Float64(x / Float64(t / y)); elseif (z <= 2.65e+85) tmp = x; elseif (z <= 7.8e+126) 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 <= -7.5e-6) tmp = x; elseif (z <= 6e+46) tmp = x / (t / y); elseif (z <= 2.65e+85) tmp = x; elseif (z <= 7.8e+126) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.5e-6], x, If[LessEqual[z, 6e+46], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e+85], x, If[LessEqual[z, 7.8e+126], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{+85}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.50000000000000019e-6 or 6.00000000000000047e46 < z < 2.65e85 or 7.79999999999999986e126 < z Initial program 76.8%
associate-*l/71.9%
Simplified71.9%
Taylor expanded in z around inf 64.5%
if -7.50000000000000019e-6 < z < 6.00000000000000047e46Initial program 95.3%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 63.2%
associate-/l*64.8%
Simplified64.8%
if 2.65e85 < z < 7.79999999999999986e126Initial program 80.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in x around 0 80.8%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around 0 51.9%
Final simplification64.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.9e-97) (not (<= y 20000000.0))) (* x (/ y (- t z))) (* x (/ z (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.9e-97) || !(y <= 20000000.0)) {
tmp = x * (y / (t - z));
} else {
tmp = x * (z / (z - 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) :: tmp
if ((y <= (-3.9d-97)) .or. (.not. (y <= 20000000.0d0))) then
tmp = x * (y / (t - z))
else
tmp = x * (z / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.9e-97) || !(y <= 20000000.0)) {
tmp = x * (y / (t - z));
} else {
tmp = x * (z / (z - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.9e-97) or not (y <= 20000000.0): tmp = x * (y / (t - z)) else: tmp = x * (z / (z - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.9e-97) || !(y <= 20000000.0)) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = Float64(x * Float64(z / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.9e-97) || ~((y <= 20000000.0))) tmp = x * (y / (t - z)); else tmp = x * (z / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.9e-97], N[Not[LessEqual[y, 20000000.0]], $MachinePrecision]], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-97} \lor \neg \left(y \leq 20000000\right):\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\end{array}
\end{array}
if y < -3.8999999999999998e-97 or 2e7 < y Initial program 86.0%
associate-*l/84.9%
Simplified84.9%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
associate-/l*67.1%
associate-/r/75.4%
Simplified75.4%
if -3.8999999999999998e-97 < y < 2e7Initial program 87.1%
associate-*l/79.4%
Simplified79.4%
Taylor expanded in y around 0 78.3%
associate-*r/78.3%
mul-1-neg78.3%
distribute-rgt-neg-out78.3%
associate-/l*88.7%
Simplified88.7%
frac-2neg88.7%
div-inv88.5%
sub-neg88.5%
distribute-neg-in88.5%
remove-double-neg88.5%
remove-double-neg88.5%
Applied egg-rr88.5%
associate-*r/88.7%
*-rgt-identity88.7%
+-commutative88.7%
unsub-neg88.7%
Simplified88.7%
clear-num87.9%
associate-/r/88.7%
clear-num89.7%
Applied egg-rr89.7%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (<= y -4.1e-97) (* x (/ y (- t z))) (if (<= y 22000000.0) (* x (/ z (- z t))) (/ x (/ (- t z) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-97) {
tmp = x * (y / (t - z));
} else if (y <= 22000000.0) {
tmp = x * (z / (z - t));
} else {
tmp = x / ((t - z) / y);
}
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 (y <= (-4.1d-97)) then
tmp = x * (y / (t - z))
else if (y <= 22000000.0d0) then
tmp = x * (z / (z - t))
else
tmp = x / ((t - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-97) {
tmp = x * (y / (t - z));
} else if (y <= 22000000.0) {
tmp = x * (z / (z - t));
} else {
tmp = x / ((t - z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-97: tmp = x * (y / (t - z)) elif y <= 22000000.0: tmp = x * (z / (z - t)) else: tmp = x / ((t - z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-97) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (y <= 22000000.0) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x / Float64(Float64(t - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.1e-97) tmp = x * (y / (t - z)); elseif (y <= 22000000.0) tmp = x * (z / (z - t)); else tmp = x / ((t - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-97], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 22000000.0], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-97}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;y \leq 22000000:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y}}\\
\end{array}
\end{array}
if y < -4.09999999999999993e-97Initial program 85.1%
associate-*l/83.2%
Simplified83.2%
Taylor expanded in y around inf 66.9%
*-commutative66.9%
associate-/l*64.0%
associate-/r/69.4%
Simplified69.4%
if -4.09999999999999993e-97 < y < 2.2e7Initial program 87.1%
associate-*l/79.4%
Simplified79.4%
Taylor expanded in y around 0 78.3%
associate-*r/78.3%
mul-1-neg78.3%
distribute-rgt-neg-out78.3%
associate-/l*88.7%
Simplified88.7%
frac-2neg88.7%
div-inv88.5%
sub-neg88.5%
distribute-neg-in88.5%
remove-double-neg88.5%
remove-double-neg88.5%
Applied egg-rr88.5%
associate-*r/88.7%
*-rgt-identity88.7%
+-commutative88.7%
unsub-neg88.7%
Simplified88.7%
clear-num87.9%
associate-/r/88.7%
clear-num89.7%
Applied egg-rr89.7%
if 2.2e7 < y Initial program 87.3%
associate-*l/87.2%
Simplified87.2%
Taylor expanded in x around 0 87.3%
associate-*r/98.2%
Simplified98.2%
Taylor expanded in y around inf 77.7%
associate-/l*84.6%
Simplified84.6%
Final simplification81.8%
(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 86.5%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in z around inf 33.4%
Final simplification33.4%
(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 2023279
(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)))