
(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 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(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}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 0.0) (/ (/ x (- y z)) (- t z)) t_1)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 - z) * (t - z))
if (t_1 <= 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
tmp = 0.0;
if (t_1 <= 0.0)
tmp = (x / (y - z)) / (t - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 0.0Initial program 87.2%
add-cube-cbrt86.6%
times-frac98.6%
pow298.6%
Applied egg-rr98.6%
associate-*r/97.2%
associate-*l/97.2%
unpow297.2%
add-cube-cbrt97.9%
Applied egg-rr97.9%
if 0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.8%
Final simplification98.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (* (/ (pow (cbrt x) 2.0) (- y z)) (/ (cbrt x) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (pow(cbrt(x), 2.0) / (y - z)) * (cbrt(x) / (t - z));
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (Math.pow(Math.cbrt(x), 2.0) / (y - z)) * (Math.cbrt(x) / (t - z));
}
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64((cbrt(x) ^ 2.0) / Float64(y - z)) * Float64(cbrt(x) / Float64(t - z))) end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}
\end{array}
Initial program 90.3%
add-cube-cbrt89.5%
times-frac98.1%
pow298.1%
Applied egg-rr98.1%
Final simplification98.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- z y)))) (t_2 (/ x (* y (- t z)))))
(if (<= t -8e-180)
t_2
(if (<= t 1e-223)
t_1
(if (<= t 2e-69)
t_2
(if (<= t 2e-33)
t_1
(if (<= t 4.4e+207) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = x / (y * (t - z));
double tmp;
if (t <= -8e-180) {
tmp = t_2;
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 2e-69) {
tmp = t_2;
} else if (t <= 2e-33) {
tmp = t_1;
} else if (t <= 4.4e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / (z * (z - y))
t_2 = x / (y * (t - z))
if (t <= (-8d-180)) then
tmp = t_2
else if (t <= 1d-223) then
tmp = t_1
else if (t <= 2d-69) then
tmp = t_2
else if (t <= 2d-33) then
tmp = t_1
else if (t <= 4.4d+207) then
tmp = x / ((y - z) * t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = x / (y * (t - z));
double tmp;
if (t <= -8e-180) {
tmp = t_2;
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 2e-69) {
tmp = t_2;
} else if (t <= 2e-33) {
tmp = t_1;
} else if (t <= 4.4e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (z - y)) t_2 = x / (y * (t - z)) tmp = 0 if t <= -8e-180: tmp = t_2 elif t <= 1e-223: tmp = t_1 elif t <= 2e-69: tmp = t_2 elif t <= 2e-33: tmp = t_1 elif t <= 4.4e+207: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - y))) t_2 = Float64(x / Float64(y * Float64(t - z))) tmp = 0.0 if (t <= -8e-180) tmp = t_2; elseif (t <= 1e-223) tmp = t_1; elseif (t <= 2e-69) tmp = t_2; elseif (t <= 2e-33) tmp = t_1; elseif (t <= 4.4e+207) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * (z - y));
t_2 = x / (y * (t - z));
tmp = 0.0;
if (t <= -8e-180)
tmp = t_2;
elseif (t <= 1e-223)
tmp = t_1;
elseif (t <= 2e-69)
tmp = t_2;
elseif (t <= 2e-33)
tmp = t_1;
elseif (t <= 4.4e+207)
tmp = x / ((y - z) * t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e-180], t$95$2, If[LessEqual[t, 1e-223], t$95$1, If[LessEqual[t, 2e-69], t$95$2, If[LessEqual[t, 2e-33], t$95$1, If[LessEqual[t, 4.4e+207], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
t_2 := \frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{if}\;t \leq -8 \cdot 10^{-180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+207}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -8.0000000000000002e-180 or 9.9999999999999997e-224 < t < 1.9999999999999999e-69Initial program 87.8%
Taylor expanded in y around inf 64.2%
*-commutative64.2%
Simplified64.2%
if -8.0000000000000002e-180 < t < 9.9999999999999997e-224 or 1.9999999999999999e-69 < t < 2.0000000000000001e-33Initial program 95.6%
clear-num95.4%
inv-pow95.4%
associate-/l*97.6%
Applied egg-rr97.6%
frac-2neg97.6%
div-inv97.6%
distribute-neg-frac97.6%
Applied egg-rr97.6%
associate-/r/97.4%
Simplified97.4%
Taylor expanded in t around 0 85.2%
if 2.0000000000000001e-33 < t < 4.40000000000000017e207Initial program 99.8%
Taylor expanded in t around inf 90.7%
if 4.40000000000000017e207 < t Initial program 79.5%
add-cube-cbrt79.4%
times-frac99.4%
pow299.4%
Applied egg-rr99.4%
associate-*r/99.4%
associate-*l/99.4%
unpow299.4%
add-cube-cbrt100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 79.5%
associate-/r*96.5%
Simplified96.5%
Final simplification75.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- z y)))))
(if (<= t -3.8e-179)
(/ (/ x y) (- t z))
(if (<= t 1e-223)
t_1
(if (<= t 4.5e-74)
(/ x (* y (- t z)))
(if (<= t 2e-34)
t_1
(if (<= t 4.3e+207) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double tmp;
if (t <= -3.8e-179) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 4.5e-74) {
tmp = x / (y * (t - z));
} else if (t <= 2e-34) {
tmp = t_1;
} else if (t <= 4.3e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / (z * (z - y))
if (t <= (-3.8d-179)) then
tmp = (x / y) / (t - z)
else if (t <= 1d-223) then
tmp = t_1
else if (t <= 4.5d-74) then
tmp = x / (y * (t - z))
else if (t <= 2d-34) then
tmp = t_1
else if (t <= 4.3d+207) then
tmp = x / ((y - z) * t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double tmp;
if (t <= -3.8e-179) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 4.5e-74) {
tmp = x / (y * (t - z));
} else if (t <= 2e-34) {
tmp = t_1;
} else if (t <= 4.3e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (z - y)) tmp = 0 if t <= -3.8e-179: tmp = (x / y) / (t - z) elif t <= 1e-223: tmp = t_1 elif t <= 4.5e-74: tmp = x / (y * (t - z)) elif t <= 2e-34: tmp = t_1 elif t <= 4.3e+207: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - y))) tmp = 0.0 if (t <= -3.8e-179) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1e-223) tmp = t_1; elseif (t <= 4.5e-74) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 2e-34) tmp = t_1; elseif (t <= 4.3e+207) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * (z - y));
tmp = 0.0;
if (t <= -3.8e-179)
tmp = (x / y) / (t - z);
elseif (t <= 1e-223)
tmp = t_1;
elseif (t <= 4.5e-74)
tmp = x / (y * (t - z));
elseif (t <= 2e-34)
tmp = t_1;
elseif (t <= 4.3e+207)
tmp = x / ((y - z) * t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e-179], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-223], t$95$1, If[LessEqual[t, 4.5e-74], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-34], t$95$1, If[LessEqual[t, 4.3e+207], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+207}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -3.79999999999999974e-179Initial program 86.1%
add-cube-cbrt85.3%
times-frac98.8%
pow298.8%
Applied egg-rr98.8%
associate-*r/96.4%
associate-*l/96.4%
unpow296.4%
add-cube-cbrt97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 60.3%
associate-/r*60.7%
Simplified60.7%
if -3.79999999999999974e-179 < t < 9.9999999999999997e-224 or 4.4999999999999999e-74 < t < 1.99999999999999986e-34Initial program 95.3%
clear-num95.2%
inv-pow95.2%
associate-/l*97.5%
Applied egg-rr97.5%
frac-2neg97.5%
div-inv97.5%
distribute-neg-frac97.5%
Applied egg-rr97.5%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in t around 0 88.9%
if 9.9999999999999997e-224 < t < 4.4999999999999999e-74Initial program 93.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
Simplified77.8%
if 1.99999999999999986e-34 < t < 4.2999999999999997e207Initial program 99.8%
Taylor expanded in t around inf 91.1%
if 4.2999999999999997e207 < t Initial program 79.5%
add-cube-cbrt79.4%
times-frac99.4%
pow299.4%
Applied egg-rr99.4%
associate-*r/99.4%
associate-*l/99.4%
unpow299.4%
add-cube-cbrt100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 79.5%
associate-/r*96.5%
Simplified96.5%
Final simplification76.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (- z y))))
(if (<= t -1.15e-178)
(/ (/ x y) (- t z))
(if (<= t 1e-223)
t_1
(if (<= t 4e-72)
(/ x (* y (- t z)))
(if (<= t 1.4e-33)
t_1
(if (<= t 4.35e+207) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - y);
double tmp;
if (t <= -1.15e-178) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 4e-72) {
tmp = x / (y * (t - z));
} else if (t <= 1.4e-33) {
tmp = t_1;
} else if (t <= 4.35e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / z) / (z - y)
if (t <= (-1.15d-178)) then
tmp = (x / y) / (t - z)
else if (t <= 1d-223) then
tmp = t_1
else if (t <= 4d-72) then
tmp = x / (y * (t - z))
else if (t <= 1.4d-33) then
tmp = t_1
else if (t <= 4.35d+207) then
tmp = x / ((y - z) * t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - y);
double tmp;
if (t <= -1.15e-178) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 4e-72) {
tmp = x / (y * (t - z));
} else if (t <= 1.4e-33) {
tmp = t_1;
} else if (t <= 4.35e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (z - y) tmp = 0 if t <= -1.15e-178: tmp = (x / y) / (t - z) elif t <= 1e-223: tmp = t_1 elif t <= 4e-72: tmp = x / (y * (t - z)) elif t <= 1.4e-33: tmp = t_1 elif t <= 4.35e+207: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - y)) tmp = 0.0 if (t <= -1.15e-178) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1e-223) tmp = t_1; elseif (t <= 4e-72) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 1.4e-33) tmp = t_1; elseif (t <= 4.35e+207) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - y);
tmp = 0.0;
if (t <= -1.15e-178)
tmp = (x / y) / (t - z);
elseif (t <= 1e-223)
tmp = t_1;
elseif (t <= 4e-72)
tmp = x / (y * (t - z));
elseif (t <= 1.4e-33)
tmp = t_1;
elseif (t <= 4.35e+207)
tmp = x / ((y - z) * t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-178], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-223], t$95$1, If[LessEqual[t, 4e-72], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-33], t$95$1, If[LessEqual[t, 4.35e+207], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - y}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-72}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.35 \cdot 10^{+207}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.14999999999999997e-178Initial program 86.1%
add-cube-cbrt85.3%
times-frac98.8%
pow298.8%
Applied egg-rr98.8%
associate-*r/96.4%
associate-*l/96.4%
unpow296.4%
add-cube-cbrt97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 60.3%
associate-/r*60.7%
Simplified60.7%
if -1.14999999999999997e-178 < t < 9.9999999999999997e-224 or 3.9999999999999999e-72 < t < 1.4e-33Initial program 95.3%
clear-num95.2%
inv-pow95.2%
associate-/l*97.5%
Applied egg-rr97.5%
frac-2neg97.5%
div-inv97.5%
distribute-neg-frac97.5%
Applied egg-rr97.5%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in t around 0 88.9%
associate-/r*93.2%
Simplified93.2%
if 9.9999999999999997e-224 < t < 3.9999999999999999e-72Initial program 93.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
Simplified77.8%
if 1.4e-33 < t < 4.35000000000000024e207Initial program 99.8%
Taylor expanded in t around inf 91.1%
if 4.35000000000000024e207 < t Initial program 79.5%
add-cube-cbrt79.4%
times-frac99.4%
pow299.4%
Applied egg-rr99.4%
associate-*r/99.4%
associate-*l/99.4%
unpow299.4%
add-cube-cbrt100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 79.5%
associate-/r*96.5%
Simplified96.5%
Final simplification77.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (- z y))))
(if (<= t -1.05e-179)
(/ (/ x y) (- t z))
(if (<= t 1e-223)
t_1
(if (<= t 5e-72)
(/ (/ x (- t z)) y)
(if (<= t 5e-35)
t_1
(if (<= t 4.3e+207) (/ x (* (- y z) t)) (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - y);
double tmp;
if (t <= -1.05e-179) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 5e-72) {
tmp = (x / (t - z)) / y;
} else if (t <= 5e-35) {
tmp = t_1;
} else if (t <= 4.3e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / z) / (z - y)
if (t <= (-1.05d-179)) then
tmp = (x / y) / (t - z)
else if (t <= 1d-223) then
tmp = t_1
else if (t <= 5d-72) then
tmp = (x / (t - z)) / y
else if (t <= 5d-35) then
tmp = t_1
else if (t <= 4.3d+207) then
tmp = x / ((y - z) * t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - y);
double tmp;
if (t <= -1.05e-179) {
tmp = (x / y) / (t - z);
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 5e-72) {
tmp = (x / (t - z)) / y;
} else if (t <= 5e-35) {
tmp = t_1;
} else if (t <= 4.3e+207) {
tmp = x / ((y - z) * t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (z - y) tmp = 0 if t <= -1.05e-179: tmp = (x / y) / (t - z) elif t <= 1e-223: tmp = t_1 elif t <= 5e-72: tmp = (x / (t - z)) / y elif t <= 5e-35: tmp = t_1 elif t <= 4.3e+207: tmp = x / ((y - z) * t) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - y)) tmp = 0.0 if (t <= -1.05e-179) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1e-223) tmp = t_1; elseif (t <= 5e-72) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 5e-35) tmp = t_1; elseif (t <= 4.3e+207) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - y);
tmp = 0.0;
if (t <= -1.05e-179)
tmp = (x / y) / (t - z);
elseif (t <= 1e-223)
tmp = t_1;
elseif (t <= 5e-72)
tmp = (x / (t - z)) / y;
elseif (t <= 5e-35)
tmp = t_1;
elseif (t <= 4.3e+207)
tmp = x / ((y - z) * t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-179], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-223], t$95$1, If[LessEqual[t, 5e-72], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5e-35], t$95$1, If[LessEqual[t, 4.3e+207], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - y}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-72}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+207}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.0499999999999999e-179Initial program 86.1%
add-cube-cbrt85.3%
times-frac98.8%
pow298.8%
Applied egg-rr98.8%
associate-*r/96.4%
associate-*l/96.4%
unpow296.4%
add-cube-cbrt97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 60.3%
associate-/r*60.7%
Simplified60.7%
if -1.0499999999999999e-179 < t < 9.9999999999999997e-224 or 4.9999999999999996e-72 < t < 4.99999999999999964e-35Initial program 95.3%
clear-num95.2%
inv-pow95.2%
associate-/l*97.5%
Applied egg-rr97.5%
frac-2neg97.5%
div-inv97.5%
distribute-neg-frac97.5%
Applied egg-rr97.5%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in t around 0 88.9%
associate-/r*93.2%
Simplified93.2%
if 9.9999999999999997e-224 < t < 4.9999999999999996e-72Initial program 93.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
associate-/r*85.4%
Simplified85.4%
if 4.99999999999999964e-35 < t < 4.2999999999999997e207Initial program 99.8%
Taylor expanded in t around inf 91.1%
if 4.2999999999999997e207 < t Initial program 79.5%
add-cube-cbrt79.4%
times-frac99.4%
pow299.4%
Applied egg-rr99.4%
associate-*r/99.4%
associate-*l/99.4%
unpow299.4%
add-cube-cbrt100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 79.5%
associate-/r*96.5%
Simplified96.5%
Final simplification78.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- z y)))) (t_2 (/ x (* y (- t z)))))
(if (<= t -8.2e-179)
t_2
(if (<= t 1e-223)
t_1
(if (<= t 1.6e-73) t_2 (if (<= t 3e-34) t_1 (/ x (* (- y z) t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = x / (y * (t - z));
double tmp;
if (t <= -8.2e-179) {
tmp = t_2;
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 1.6e-73) {
tmp = t_2;
} else if (t <= 3e-34) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / (z * (z - y))
t_2 = x / (y * (t - z))
if (t <= (-8.2d-179)) then
tmp = t_2
else if (t <= 1d-223) then
tmp = t_1
else if (t <= 1.6d-73) then
tmp = t_2
else if (t <= 3d-34) then
tmp = t_1
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = x / (y * (t - z));
double tmp;
if (t <= -8.2e-179) {
tmp = t_2;
} else if (t <= 1e-223) {
tmp = t_1;
} else if (t <= 1.6e-73) {
tmp = t_2;
} else if (t <= 3e-34) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (z - y)) t_2 = x / (y * (t - z)) tmp = 0 if t <= -8.2e-179: tmp = t_2 elif t <= 1e-223: tmp = t_1 elif t <= 1.6e-73: tmp = t_2 elif t <= 3e-34: tmp = t_1 else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - y))) t_2 = Float64(x / Float64(y * Float64(t - z))) tmp = 0.0 if (t <= -8.2e-179) tmp = t_2; elseif (t <= 1e-223) tmp = t_1; elseif (t <= 1.6e-73) tmp = t_2; elseif (t <= 3e-34) tmp = t_1; else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * (z - y));
t_2 = x / (y * (t - z));
tmp = 0.0;
if (t <= -8.2e-179)
tmp = t_2;
elseif (t <= 1e-223)
tmp = t_1;
elseif (t <= 1.6e-73)
tmp = t_2;
elseif (t <= 3e-34)
tmp = t_1;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-179], t$95$2, If[LessEqual[t, 1e-223], t$95$1, If[LessEqual[t, 1.6e-73], t$95$2, If[LessEqual[t, 3e-34], t$95$1, N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
t_2 := \frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-179}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-73}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -8.2e-179 or 9.9999999999999997e-224 < t < 1.59999999999999993e-73Initial program 87.8%
Taylor expanded in y around inf 64.2%
*-commutative64.2%
Simplified64.2%
if -8.2e-179 < t < 9.9999999999999997e-224 or 1.59999999999999993e-73 < t < 3e-34Initial program 95.3%
clear-num95.2%
inv-pow95.2%
associate-/l*97.5%
Applied egg-rr97.5%
frac-2neg97.5%
div-inv97.5%
distribute-neg-frac97.5%
Applied egg-rr97.5%
associate-/r/97.3%
Simplified97.3%
Taylor expanded in t around 0 88.9%
if 3e-34 < t Initial program 92.0%
Taylor expanded in t around inf 86.7%
Final simplification74.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)) (t_2 (/ (- x) (* z t))))
(if (<= y -3.1e-50)
t_1
(if (<= y -1.7e-94)
t_2
(if (<= y -1.95e-171) (/ (/ x t) y) (if (<= y 2.8e-121) t_2 t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = -x / (z * t);
double tmp;
if (y <= -3.1e-50) {
tmp = t_1;
} else if (y <= -1.7e-94) {
tmp = t_2;
} else if (y <= -1.95e-171) {
tmp = (x / t) / y;
} else if (y <= 2.8e-121) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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) / t
t_2 = -x / (z * t)
if (y <= (-3.1d-50)) then
tmp = t_1
else if (y <= (-1.7d-94)) then
tmp = t_2
else if (y <= (-1.95d-171)) then
tmp = (x / t) / y
else if (y <= 2.8d-121) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = -x / (z * t);
double tmp;
if (y <= -3.1e-50) {
tmp = t_1;
} else if (y <= -1.7e-94) {
tmp = t_2;
} else if (y <= -1.95e-171) {
tmp = (x / t) / y;
} else if (y <= 2.8e-121) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / y) / t t_2 = -x / (z * t) tmp = 0 if y <= -3.1e-50: tmp = t_1 elif y <= -1.7e-94: tmp = t_2 elif y <= -1.95e-171: tmp = (x / t) / y elif y <= 2.8e-121: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) t_2 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (y <= -3.1e-50) tmp = t_1; elseif (y <= -1.7e-94) tmp = t_2; elseif (y <= -1.95e-171) tmp = Float64(Float64(x / t) / y); elseif (y <= 2.8e-121) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / y) / t;
t_2 = -x / (z * t);
tmp = 0.0;
if (y <= -3.1e-50)
tmp = t_1;
elseif (y <= -1.7e-94)
tmp = t_2;
elseif (y <= -1.95e-171)
tmp = (x / t) / y;
elseif (y <= 2.8e-121)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e-50], t$95$1, If[LessEqual[y, -1.7e-94], t$95$2, If[LessEqual[y, -1.95e-171], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.8e-121], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-121}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.1000000000000002e-50 or 2.8000000000000001e-121 < y Initial program 90.1%
Taylor expanded in z around 0 52.8%
*-un-lft-identity52.8%
times-frac59.9%
Applied egg-rr59.9%
associate-*l/59.9%
*-lft-identity59.9%
Simplified59.9%
if -3.1000000000000002e-50 < y < -1.6999999999999999e-94 or -1.9499999999999999e-171 < y < 2.8000000000000001e-121Initial program 91.0%
Taylor expanded in t around inf 68.3%
Taylor expanded in y around 0 55.9%
associate-*r/55.9%
neg-mul-155.9%
*-commutative55.9%
Simplified55.9%
if -1.6999999999999999e-94 < y < -1.9499999999999999e-171Initial program 87.9%
Taylor expanded in y around inf 54.5%
*-commutative54.5%
associate-/r*60.3%
Simplified60.3%
Taylor expanded in t around inf 54.8%
Final simplification58.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)))
(if (<= y -5e+170)
t_1
(if (<= y -2.2e+133)
(/ (- x) (* y z))
(if (<= y -5.5e-183)
(/ (/ x t) y)
(if (<= y 8.6e-121) (/ (- x) (* z t)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double tmp;
if (y <= -5e+170) {
tmp = t_1;
} else if (y <= -2.2e+133) {
tmp = -x / (y * z);
} else if (y <= -5.5e-183) {
tmp = (x / t) / y;
} else if (y <= 8.6e-121) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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
if (y <= (-5d+170)) then
tmp = t_1
else if (y <= (-2.2d+133)) then
tmp = -x / (y * z)
else if (y <= (-5.5d-183)) then
tmp = (x / t) / y
else if (y <= 8.6d-121) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double tmp;
if (y <= -5e+170) {
tmp = t_1;
} else if (y <= -2.2e+133) {
tmp = -x / (y * z);
} else if (y <= -5.5e-183) {
tmp = (x / t) / y;
} else if (y <= 8.6e-121) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / y) / t tmp = 0 if y <= -5e+170: tmp = t_1 elif y <= -2.2e+133: tmp = -x / (y * z) elif y <= -5.5e-183: tmp = (x / t) / y elif y <= 8.6e-121: tmp = -x / (z * t) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) tmp = 0.0 if (y <= -5e+170) tmp = t_1; elseif (y <= -2.2e+133) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (y <= -5.5e-183) tmp = Float64(Float64(x / t) / y); elseif (y <= 8.6e-121) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / y) / t;
tmp = 0.0;
if (y <= -5e+170)
tmp = t_1;
elseif (y <= -2.2e+133)
tmp = -x / (y * z);
elseif (y <= -5.5e-183)
tmp = (x / t) / y;
elseif (y <= 8.6e-121)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[y, -5e+170], t$95$1, If[LessEqual[y, -2.2e+133], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.5e-183], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 8.6e-121], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+133}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-183}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-121}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.99999999999999977e170 or 8.5999999999999993e-121 < y Initial program 88.9%
Taylor expanded in z around 0 51.4%
*-un-lft-identity51.4%
times-frac58.5%
Applied egg-rr58.5%
associate-*l/58.4%
*-lft-identity58.4%
Simplified58.4%
if -4.99999999999999977e170 < y < -2.2e133Initial program 87.4%
Taylor expanded in y around inf 87.8%
*-commutative87.8%
associate-/r*87.9%
Simplified87.9%
Taylor expanded in t around 0 55.7%
associate-*r/55.7%
neg-mul-155.7%
*-commutative55.7%
Simplified55.7%
if -2.2e133 < y < -5.4999999999999999e-183Initial program 94.5%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
associate-/r*75.5%
Simplified75.5%
Taylor expanded in t around inf 62.0%
if -5.4999999999999999e-183 < y < 8.5999999999999993e-121Initial program 88.5%
Taylor expanded in t around inf 65.8%
Taylor expanded in y around 0 54.7%
associate-*r/54.7%
neg-mul-154.7%
*-commutative54.7%
Simplified54.7%
Final simplification58.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -7e-179)
(/ (/ x y) t)
(if (<= t 3.9e-91)
(/ (/ (- x) z) y)
(if (<= t 7.2e+78)
(/ x (* y t))
(if (<= t 5.5e+181) (/ (- x) (* z t)) (/ (/ x t) y))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7e-179) {
tmp = (x / y) / t;
} else if (t <= 3.9e-91) {
tmp = (-x / z) / y;
} else if (t <= 7.2e+78) {
tmp = x / (y * t);
} else if (t <= 5.5e+181) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 (t <= (-7d-179)) then
tmp = (x / y) / t
else if (t <= 3.9d-91) then
tmp = (-x / z) / y
else if (t <= 7.2d+78) then
tmp = x / (y * t)
else if (t <= 5.5d+181) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -7e-179) {
tmp = (x / y) / t;
} else if (t <= 3.9e-91) {
tmp = (-x / z) / y;
} else if (t <= 7.2e+78) {
tmp = x / (y * t);
} else if (t <= 5.5e+181) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -7e-179: tmp = (x / y) / t elif t <= 3.9e-91: tmp = (-x / z) / y elif t <= 7.2e+78: tmp = x / (y * t) elif t <= 5.5e+181: tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -7e-179) tmp = Float64(Float64(x / y) / t); elseif (t <= 3.9e-91) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 7.2e+78) tmp = Float64(x / Float64(y * t)); elseif (t <= 5.5e+181) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -7e-179)
tmp = (x / y) / t;
elseif (t <= 3.9e-91)
tmp = (-x / z) / y;
elseif (t <= 7.2e+78)
tmp = x / (y * t);
elseif (t <= 5.5e+181)
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -7e-179], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.9e-91], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 7.2e+78], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+181], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+181}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -7.00000000000000049e-179Initial program 86.1%
Taylor expanded in z around 0 52.0%
*-un-lft-identity52.0%
times-frac55.8%
Applied egg-rr55.8%
associate-*l/55.8%
*-lft-identity55.8%
Simplified55.8%
if -7.00000000000000049e-179 < t < 3.89999999999999994e-91Initial program 95.2%
Taylor expanded in y around inf 72.6%
*-commutative72.6%
associate-/r*73.5%
Simplified73.5%
Taylor expanded in t around 0 61.7%
associate-*r/61.7%
neg-mul-161.7%
Simplified61.7%
if 3.89999999999999994e-91 < t < 7.20000000000000039e78Initial program 97.1%
Taylor expanded in z around 0 63.9%
if 7.20000000000000039e78 < t < 5.49999999999999991e181Initial program 99.8%
Taylor expanded in t around inf 88.4%
Taylor expanded in y around 0 62.3%
associate-*r/62.3%
neg-mul-162.3%
*-commutative62.3%
Simplified62.3%
if 5.49999999999999991e181 < t Initial program 83.1%
Taylor expanded in y around inf 51.3%
*-commutative51.3%
associate-/r*73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Final simplification61.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (* t (/ y x)))))
(if (<= t -5.1e-193)
t_1
(if (<= t 1.25e-143)
(/ (/ (- x) z) y)
(if (<= t 7.2e+78)
t_1
(if (<= t 2.95e+181) (/ (- x) (* z t)) (/ (/ x t) y)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (t <= -5.1e-193) {
tmp = t_1;
} else if (t <= 1.25e-143) {
tmp = (-x / z) / y;
} else if (t <= 7.2e+78) {
tmp = t_1;
} else if (t <= 2.95e+181) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 = 1.0d0 / (t * (y / x))
if (t <= (-5.1d-193)) then
tmp = t_1
else if (t <= 1.25d-143) then
tmp = (-x / z) / y
else if (t <= 7.2d+78) then
tmp = t_1
else if (t <= 2.95d+181) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (t * (y / x));
double tmp;
if (t <= -5.1e-193) {
tmp = t_1;
} else if (t <= 1.25e-143) {
tmp = (-x / z) / y;
} else if (t <= 7.2e+78) {
tmp = t_1;
} else if (t <= 2.95e+181) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (t * (y / x)) tmp = 0 if t <= -5.1e-193: tmp = t_1 elif t <= 1.25e-143: tmp = (-x / z) / y elif t <= 7.2e+78: tmp = t_1 elif t <= 2.95e+181: tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(t * Float64(y / x))) tmp = 0.0 if (t <= -5.1e-193) tmp = t_1; elseif (t <= 1.25e-143) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 7.2e+78) tmp = t_1; elseif (t <= 2.95e+181) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (t * (y / x));
tmp = 0.0;
if (t <= -5.1e-193)
tmp = t_1;
elseif (t <= 1.25e-143)
tmp = (-x / z) / y;
elseif (t <= 7.2e+78)
tmp = t_1;
elseif (t <= 2.95e+181)
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.1e-193], t$95$1, If[LessEqual[t, 1.25e-143], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 7.2e+78], t$95$1, If[LessEqual[t, 2.95e+181], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{if}\;t \leq -5.1 \cdot 10^{-193}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-143}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+181}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -5.0999999999999998e-193 or 1.2500000000000001e-143 < t < 7.20000000000000039e78Initial program 89.8%
Taylor expanded in z around 0 53.1%
clear-num53.9%
inv-pow53.9%
*-commutative53.9%
associate-/l*55.8%
Applied egg-rr55.8%
unpow-155.8%
associate-/r/57.5%
Simplified57.5%
if -5.0999999999999998e-193 < t < 1.2500000000000001e-143Initial program 93.6%
Taylor expanded in y around inf 74.7%
*-commutative74.7%
associate-/r*75.9%
Simplified75.9%
Taylor expanded in t around 0 69.6%
associate-*r/69.6%
neg-mul-169.6%
Simplified69.6%
if 7.20000000000000039e78 < t < 2.9499999999999999e181Initial program 99.8%
Taylor expanded in t around inf 88.4%
Taylor expanded in y around 0 62.3%
associate-*r/62.3%
neg-mul-162.3%
*-commutative62.3%
Simplified62.3%
if 2.9499999999999999e181 < t Initial program 83.1%
Taylor expanded in y around inf 51.3%
*-commutative51.3%
associate-/r*73.9%
Simplified73.9%
Taylor expanded in t around inf 73.9%
Final simplification62.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -9e-60)
(/ (/ x (- t z)) y)
(if (<= y -6.2e-138)
(/ (/ x z) (- z y))
(if (<= y 7.2e-137) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e-60) {
tmp = (x / (t - z)) / y;
} else if (y <= -6.2e-138) {
tmp = (x / z) / (z - y);
} else if (y <= 7.2e-137) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 <= (-9d-60)) then
tmp = (x / (t - z)) / y
else if (y <= (-6.2d-138)) then
tmp = (x / z) / (z - y)
else if (y <= 7.2d-137) then
tmp = -x / (z * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e-60) {
tmp = (x / (t - z)) / y;
} else if (y <= -6.2e-138) {
tmp = (x / z) / (z - y);
} else if (y <= 7.2e-137) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -9e-60: tmp = (x / (t - z)) / y elif y <= -6.2e-138: tmp = (x / z) / (z - y) elif y <= 7.2e-137: tmp = -x / (z * (t - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -9e-60) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -6.2e-138) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (y <= 7.2e-137) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -9e-60)
tmp = (x / (t - z)) / y;
elseif (y <= -6.2e-138)
tmp = (x / z) / (z - y);
elseif (y <= 7.2e-137)
tmp = -x / (z * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -9e-60], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -6.2e-138], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-137], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-60}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-138}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -9.00000000000000001e-60Initial program 90.1%
Taylor expanded in y around inf 81.1%
*-commutative81.1%
associate-/r*87.2%
Simplified87.2%
if -9.00000000000000001e-60 < y < -6.1999999999999996e-138Initial program 99.7%
clear-num97.9%
inv-pow97.9%
associate-/l*98.1%
Applied egg-rr98.1%
frac-2neg98.1%
div-inv98.0%
distribute-neg-frac98.0%
Applied egg-rr98.0%
associate-/r/97.9%
Simplified97.9%
Taylor expanded in t around 0 50.1%
associate-/r*50.2%
Simplified50.2%
if -6.1999999999999996e-138 < y < 7.20000000000000013e-137Initial program 86.9%
Taylor expanded in y around 0 73.9%
associate-*r/73.9%
neg-mul-173.9%
Simplified73.9%
if 7.20000000000000013e-137 < y Initial program 91.0%
add-cube-cbrt90.2%
times-frac98.0%
pow298.0%
Applied egg-rr98.0%
associate-*r/95.1%
associate-*l/95.1%
unpow295.1%
add-cube-cbrt95.7%
Applied egg-rr95.7%
Taylor expanded in t around inf 61.6%
associate-/r*63.1%
Simplified63.1%
Final simplification72.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) y)) (t_2 (/ (/ x t) y)))
(if (<= z -1.7e+104)
t_1
(if (<= z -2.7e-79)
t_2
(if (<= z 1.26e-243) (/ (/ x y) t) (if (<= z 1.02e+91) t_2 t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / y;
double t_2 = (x / t) / y;
double tmp;
if (z <= -1.7e+104) {
tmp = t_1;
} else if (z <= -2.7e-79) {
tmp = t_2;
} else if (z <= 1.26e-243) {
tmp = (x / y) / t;
} else if (z <= 1.02e+91) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 / z) / y
t_2 = (x / t) / y
if (z <= (-1.7d+104)) then
tmp = t_1
else if (z <= (-2.7d-79)) then
tmp = t_2
else if (z <= 1.26d-243) then
tmp = (x / y) / t
else if (z <= 1.02d+91) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / y;
double t_2 = (x / t) / y;
double tmp;
if (z <= -1.7e+104) {
tmp = t_1;
} else if (z <= -2.7e-79) {
tmp = t_2;
} else if (z <= 1.26e-243) {
tmp = (x / y) / t;
} else if (z <= 1.02e+91) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / y t_2 = (x / t) / y tmp = 0 if z <= -1.7e+104: tmp = t_1 elif z <= -2.7e-79: tmp = t_2 elif z <= 1.26e-243: tmp = (x / y) / t elif z <= 1.02e+91: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / y) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -1.7e+104) tmp = t_1; elseif (z <= -2.7e-79) tmp = t_2; elseif (z <= 1.26e-243) tmp = Float64(Float64(x / y) / t); elseif (z <= 1.02e+91) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / y;
t_2 = (x / t) / y;
tmp = 0.0;
if (z <= -1.7e+104)
tmp = t_1;
elseif (z <= -2.7e-79)
tmp = t_2;
elseif (z <= 1.26e-243)
tmp = (x / y) / t;
elseif (z <= 1.02e+91)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.7e+104], t$95$1, If[LessEqual[z, -2.7e-79], t$95$2, If[LessEqual[z, 1.26e-243], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.02e+91], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{y}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.26 \cdot 10^{-243}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.6999999999999998e104 or 1.01999999999999992e91 < z Initial program 80.1%
Taylor expanded in y around inf 46.5%
*-commutative46.5%
associate-/r*55.9%
Simplified55.9%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
expm1-log1p-u51.4%
expm1-udef63.2%
associate-/l/63.2%
add-sqr-sqrt32.6%
sqrt-unprod61.7%
sqr-neg61.7%
sqrt-unprod30.7%
add-sqr-sqrt63.2%
Applied egg-rr63.2%
expm1-def42.4%
expm1-log1p42.7%
*-commutative42.7%
Simplified42.7%
div-inv42.7%
*-commutative42.7%
associate-/r*42.7%
Applied egg-rr42.7%
associate-*r/39.4%
associate-*l/47.7%
associate-*r/47.7%
*-rgt-identity47.7%
Simplified47.7%
if -1.6999999999999998e104 < z < -2.7000000000000002e-79 or 1.2599999999999999e-243 < z < 1.01999999999999992e91Initial program 95.4%
Taylor expanded in y around inf 61.0%
*-commutative61.0%
associate-/r*67.2%
Simplified67.2%
Taylor expanded in t around inf 46.3%
if -2.7000000000000002e-79 < z < 1.2599999999999999e-243Initial program 95.0%
Taylor expanded in z around 0 80.9%
*-un-lft-identity80.9%
times-frac79.3%
Applied egg-rr79.3%
associate-*l/79.1%
*-lft-identity79.1%
Simplified79.1%
Final simplification54.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -6e+79) (not (<= z 1.7e+132))) (/ (/ x z) (- z y)) (/ x (* (- y z) (- t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+79) || !(z <= 1.7e+132)) {
tmp = (x / z) / (z - y);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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+79)) .or. (.not. (z <= 1.7d+132))) then
tmp = (x / z) / (z - y)
else
tmp = x / ((y - z) * (t - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+79) || !(z <= 1.7e+132)) {
tmp = (x / z) / (z - y);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -6e+79) or not (z <= 1.7e+132): tmp = (x / z) / (z - y) else: tmp = x / ((y - z) * (t - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -6e+79) || !(z <= 1.7e+132)) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -6e+79) || ~((z <= 1.7e+132)))
tmp = (x / z) / (z - y);
else
tmp = x / ((y - z) * (t - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6e+79], N[Not[LessEqual[z, 1.7e+132]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+79} \lor \neg \left(z \leq 1.7 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -5.99999999999999948e79 or 1.70000000000000013e132 < z Initial program 76.2%
clear-num75.8%
inv-pow75.8%
associate-/l*99.5%
Applied egg-rr99.5%
frac-2neg99.5%
div-inv99.4%
distribute-neg-frac99.4%
Applied egg-rr99.4%
associate-/r/99.4%
Simplified99.4%
Taylor expanded in t around 0 74.9%
associate-/r*89.2%
Simplified89.2%
if -5.99999999999999948e79 < z < 1.70000000000000013e132Initial program 96.1%
Final simplification94.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -9.2e-73) (/ (/ x (- t z)) y) (if (<= y 1.3e-136) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e-73) {
tmp = (x / (t - z)) / y;
} else if (y <= 1.3e-136) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 <= (-9.2d-73)) then
tmp = (x / (t - z)) / y
else if (y <= 1.3d-136) then
tmp = (-x / z) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e-73) {
tmp = (x / (t - z)) / y;
} else if (y <= 1.3e-136) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -9.2e-73: tmp = (x / (t - z)) / y elif y <= 1.3e-136: tmp = (-x / z) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -9.2e-73) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 1.3e-136) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -9.2e-73)
tmp = (x / (t - z)) / y;
elseif (y <= 1.3e-136)
tmp = (-x / z) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -9.2e-73], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.3e-136], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-136}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -9.19999999999999953e-73Initial program 90.6%
Taylor expanded in y around inf 80.9%
*-commutative80.9%
associate-/r*87.8%
Simplified87.8%
if -9.19999999999999953e-73 < y < 1.29999999999999998e-136Initial program 89.0%
add-cube-cbrt88.1%
times-frac97.6%
pow297.6%
Applied egg-rr97.6%
associate-*r/96.5%
associate-*l/96.5%
unpow296.5%
add-cube-cbrt97.5%
Applied egg-rr97.5%
Taylor expanded in y around 0 73.3%
associate-/r*83.8%
associate-*r/83.8%
associate-*r/83.8%
neg-mul-183.8%
Simplified83.8%
if 1.29999999999999998e-136 < y Initial program 91.0%
add-cube-cbrt90.2%
times-frac98.0%
pow298.0%
Applied egg-rr98.0%
associate-*r/95.1%
associate-*l/95.1%
unpow295.1%
add-cube-cbrt95.7%
Applied egg-rr95.7%
Taylor expanded in t around inf 61.6%
associate-/r*63.1%
Simplified63.1%
Final simplification77.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3.6e-193) (/ 1.0 (* t (/ y x))) (if (<= t 3e-191) (/ (/ (- x) z) y) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.6e-193) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 3e-191) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 (t <= (-3.6d-193)) then
tmp = 1.0d0 / (t * (y / x))
else if (t <= 3d-191) then
tmp = (-x / z) / y
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.6e-193) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 3e-191) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.6e-193: tmp = 1.0 / (t * (y / x)) elif t <= 3e-191: tmp = (-x / z) / y else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.6e-193) tmp = Float64(1.0 / Float64(t * Float64(y / x))); elseif (t <= 3e-191) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3.6e-193)
tmp = 1.0 / (t * (y / x));
elseif (t <= 3e-191)
tmp = (-x / z) / y;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3.6e-193], N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-191], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-193}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.5999999999999999e-193Initial program 86.8%
Taylor expanded in z around 0 50.3%
clear-num50.8%
inv-pow50.8%
*-commutative50.8%
associate-/l*54.3%
Applied egg-rr54.3%
unpow-154.3%
associate-/r/55.0%
Simplified55.0%
if -3.5999999999999999e-193 < t < 3.0000000000000001e-191Initial program 94.6%
Taylor expanded in y around inf 78.6%
*-commutative78.6%
associate-/r*76.2%
Simplified76.2%
Taylor expanded in t around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
Simplified71.0%
if 3.0000000000000001e-191 < t Initial program 92.6%
Taylor expanded in t around inf 74.3%
Final simplification65.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3.9e-84) (/ 1.0 (* t (/ y x))) (if (<= t 1.15e-34) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.9e-84) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 1.15e-34) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 (t <= (-3.9d-84)) then
tmp = 1.0d0 / (t * (y / x))
else if (t <= 1.15d-34) then
tmp = x / (z * (z - y))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.9e-84) {
tmp = 1.0 / (t * (y / x));
} else if (t <= 1.15e-34) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.9e-84: tmp = 1.0 / (t * (y / x)) elif t <= 1.15e-34: tmp = x / (z * (z - y)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.9e-84) tmp = Float64(1.0 / Float64(t * Float64(y / x))); elseif (t <= 1.15e-34) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3.9e-84)
tmp = 1.0 / (t * (y / x));
elseif (t <= 1.15e-34)
tmp = x / (z * (z - y));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3.9e-84], N[(1.0 / N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-34], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-84}:\\
\;\;\;\;\frac{1}{t \cdot \frac{y}{x}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-34}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.90000000000000023e-84Initial program 88.0%
Taylor expanded in z around 0 53.8%
clear-num54.5%
inv-pow54.5%
*-commutative54.5%
associate-/l*59.0%
Applied egg-rr59.0%
unpow-159.0%
associate-/r/58.8%
Simplified58.8%
if -3.90000000000000023e-84 < t < 1.15000000000000006e-34Initial program 91.0%
clear-num90.8%
inv-pow90.8%
associate-/l*98.7%
Applied egg-rr98.7%
frac-2neg98.7%
div-inv98.6%
distribute-neg-frac98.6%
Applied egg-rr98.6%
associate-/r/98.6%
Simplified98.6%
Taylor expanded in t around 0 70.2%
if 1.15000000000000006e-34 < t Initial program 92.0%
Taylor expanded in t around inf 86.7%
Final simplification71.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -8.5e+78) (not (<= z 1.45e+69))) (/ x (* y z)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+78) || !(z <= 1.45e+69)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 <= (-8.5d+78)) .or. (.not. (z <= 1.45d+69))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+78) || !(z <= 1.45e+69)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -8.5e+78) or not (z <= 1.45e+69): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -8.5e+78) || !(z <= 1.45e+69)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -8.5e+78) || ~((z <= 1.45e+69)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.5e+78], N[Not[LessEqual[z, 1.45e+69]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+78} \lor \neg \left(z \leq 1.45 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -8.50000000000000079e78 or 1.4499999999999999e69 < z Initial program 81.2%
Taylor expanded in y around inf 46.6%
*-commutative46.6%
associate-/r*56.0%
Simplified56.0%
Taylor expanded in t around 0 51.1%
associate-*r/51.1%
neg-mul-151.1%
Simplified51.1%
expm1-log1p-u49.9%
expm1-udef60.9%
associate-/l/60.9%
add-sqr-sqrt31.3%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod29.7%
add-sqr-sqrt60.9%
Applied egg-rr60.9%
expm1-def40.3%
expm1-log1p40.7%
*-commutative40.7%
Simplified40.7%
if -8.50000000000000079e78 < z < 1.4499999999999999e69Initial program 95.6%
Taylor expanded in z around 0 57.2%
Final simplification51.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.8e+105) (not (<= z 8.4e+86))) (/ x (* y z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.8e+105) || !(z <= 8.4e+86)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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.8d+105)) .or. (.not. (z <= 8.4d+86))) then
tmp = x / (y * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.8e+105) || !(z <= 8.4e+86)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.8e+105) or not (z <= 8.4e+86): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.8e+105) || !(z <= 8.4e+86)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.8e+105) || ~((z <= 8.4e+86)))
tmp = x / (y * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.8e+105], N[Not[LessEqual[z, 8.4e+86]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+105} \lor \neg \left(z \leq 8.4 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -4.7999999999999995e105 or 8.3999999999999996e86 < z Initial program 80.6%
Taylor expanded in y around inf 46.7%
*-commutative46.7%
associate-/r*55.8%
Simplified55.8%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
expm1-log1p-u51.4%
expm1-udef62.9%
associate-/l/62.9%
add-sqr-sqrt31.9%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod31.1%
add-sqr-sqrt62.8%
Applied egg-rr62.8%
expm1-def42.5%
expm1-log1p42.9%
*-commutative42.9%
Simplified42.9%
if -4.7999999999999995e105 < z < 8.3999999999999996e86Initial program 95.2%
Taylor expanded in y around inf 72.0%
*-commutative72.0%
associate-/r*76.1%
Simplified76.1%
Taylor expanded in t around inf 59.1%
Final simplification53.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 90.3%
add-cube-cbrt89.5%
times-frac98.1%
pow298.1%
Applied egg-rr98.1%
frac-times89.5%
unpow289.5%
add-cube-cbrt90.3%
associate-/l/97.7%
Applied egg-rr97.7%
Final simplification97.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5.5e+61) (/ (/ x y) t) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e+61) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 <= (-5.5d+61)) then
tmp = (x / y) / t
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e+61) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -5.5e+61: tmp = (x / y) / t else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e+61) tmp = Float64(Float64(x / y) / t); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5.5e+61)
tmp = (x / y) / t;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e+61], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -5.50000000000000036e61Initial program 88.5%
Taylor expanded in z around 0 51.2%
*-un-lft-identity51.2%
times-frac63.8%
Applied egg-rr63.8%
associate-*l/63.8%
*-lft-identity63.8%
Simplified63.8%
if -5.50000000000000036e61 < y Initial program 90.7%
Taylor expanded in y around inf 58.0%
*-commutative58.0%
associate-/r*64.0%
Simplified64.0%
Taylor expanded in t around inf 47.4%
Final simplification50.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 90.3%
Taylor expanded in z around 0 44.4%
Final simplification44.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / 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 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023335
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))