
(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 19 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 (* (/ (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 87.5%
add-cube-cbrt86.7%
times-frac97.4%
pow297.4%
Applied egg-rr97.4%
Final simplification97.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 (<= y -7.5e+204)
(/ (/ x (- t z)) y)
(if (<= y -4.1e-63)
(/ x (* y (- t z)))
(if (<= y 1.3e-126) (/ (- 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 <= -7.5e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -4.1e-63) {
tmp = x / (y * (t - z));
} else if (y <= 1.3e-126) {
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 <= (-7.5d+204)) then
tmp = (x / (t - z)) / y
else if (y <= (-4.1d-63)) then
tmp = x / (y * (t - z))
else if (y <= 1.3d-126) 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 <= -7.5e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -4.1e-63) {
tmp = x / (y * (t - z));
} else if (y <= 1.3e-126) {
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 <= -7.5e+204: tmp = (x / (t - z)) / y elif y <= -4.1e-63: tmp = x / (y * (t - z)) elif y <= 1.3e-126: 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 <= -7.5e+204) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -4.1e-63) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.3e-126) 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 <= -7.5e+204)
tmp = (x / (t - z)) / y;
elseif (y <= -4.1e-63)
tmp = x / (y * (t - z));
elseif (y <= 1.3e-126)
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, -7.5e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -4.1e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-126], 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 -7.5 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-126}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.4999999999999998e204Initial program 59.7%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*95.1%
Simplified95.1%
if -7.4999999999999998e204 < y < -4.0999999999999998e-63Initial program 99.5%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
if -4.0999999999999998e-63 < y < 1.3e-126Initial program 89.4%
Taylor expanded in y around 0 75.9%
associate-*r/75.9%
neg-mul-175.9%
Simplified75.9%
if 1.3e-126 < y Initial program 86.8%
add-cube-cbrt86.0%
times-frac97.9%
pow297.9%
Applied egg-rr97.9%
frac-times86.0%
unpow286.0%
add-cube-cbrt86.8%
*-commutative86.8%
associate-/r*98.0%
Applied egg-rr98.0%
Taylor expanded in t around inf 64.8%
Final simplification74.9%
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.2e+204)
(/ (/ x (- t z)) y)
(if (<= y -4.7e-63)
(/ x (* y (- t z)))
(if (<= y 1.9e-126) (/ (- (/ 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 <= -5.2e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -4.7e-63) {
tmp = x / (y * (t - z));
} else if (y <= 1.9e-126) {
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 <= (-5.2d+204)) then
tmp = (x / (t - z)) / y
else if (y <= (-4.7d-63)) then
tmp = x / (y * (t - z))
else if (y <= 1.9d-126) 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 <= -5.2e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -4.7e-63) {
tmp = x / (y * (t - z));
} else if (y <= 1.9e-126) {
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 <= -5.2e+204: tmp = (x / (t - z)) / y elif y <= -4.7e-63: tmp = x / (y * (t - z)) elif y <= 1.9e-126: 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 <= -5.2e+204) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -4.7e-63) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.9e-126) 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 <= -5.2e+204)
tmp = (x / (t - z)) / y;
elseif (y <= -4.7e-63)
tmp = x / (y * (t - z));
elseif (y <= 1.9e-126)
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, -5.2e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -4.7e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-126], 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 -5.2 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-126}:\\
\;\;\;\;\frac{-\frac{x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.2000000000000002e204Initial program 59.7%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*95.1%
Simplified95.1%
if -5.2000000000000002e204 < y < -4.7000000000000001e-63Initial program 99.5%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
if -4.7000000000000001e-63 < y < 1.8999999999999999e-126Initial program 89.4%
add-cube-cbrt88.4%
times-frac95.2%
pow295.2%
Applied egg-rr95.2%
Taylor expanded in y around 0 75.9%
mul-1-neg75.9%
associate-/r*82.9%
distribute-neg-frac82.9%
distribute-frac-neg82.9%
Simplified82.9%
if 1.8999999999999999e-126 < y Initial program 86.8%
add-cube-cbrt86.0%
times-frac97.9%
pow297.9%
Applied egg-rr97.9%
frac-times86.0%
unpow286.0%
add-cube-cbrt86.8%
*-commutative86.8%
associate-/r*98.0%
Applied egg-rr98.0%
Taylor expanded in t around inf 64.8%
Final simplification77.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 -5.2e+204)
(/ (/ x (- t z)) y)
(if (<= y -1.3e-63)
(/ x (* y (- t z)))
(if (<= y -1.9e-207) (* (/ 1.0 z) (/ x 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 <= -5.2e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.3e-63) {
tmp = x / (y * (t - z));
} else if (y <= -1.9e-207) {
tmp = (1.0 / z) * (x / 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 <= (-5.2d+204)) then
tmp = (x / (t - z)) / y
else if (y <= (-1.3d-63)) then
tmp = x / (y * (t - z))
else if (y <= (-1.9d-207)) then
tmp = (1.0d0 / z) * (x / 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 <= -5.2e+204) {
tmp = (x / (t - z)) / y;
} else if (y <= -1.3e-63) {
tmp = x / (y * (t - z));
} else if (y <= -1.9e-207) {
tmp = (1.0 / z) * (x / 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 <= -5.2e+204: tmp = (x / (t - z)) / y elif y <= -1.3e-63: tmp = x / (y * (t - z)) elif y <= -1.9e-207: tmp = (1.0 / z) * (x / 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 <= -5.2e+204) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -1.3e-63) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -1.9e-207) tmp = Float64(Float64(1.0 / z) * Float64(x / 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 <= -5.2e+204)
tmp = (x / (t - z)) / y;
elseif (y <= -1.3e-63)
tmp = x / (y * (t - z));
elseif (y <= -1.9e-207)
tmp = (1.0 / z) * (x / 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, -5.2e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -1.3e-63], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-207], N[(N[(1.0 / z), $MachinePrecision] * N[(x / 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 -5.2 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-207}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.2000000000000002e204Initial program 59.7%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*95.1%
Simplified95.1%
if -5.2000000000000002e204 < y < -1.3000000000000001e-63Initial program 99.5%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
if -1.3000000000000001e-63 < y < -1.9e-207Initial program 91.6%
add-cube-cbrt90.5%
times-frac98.6%
pow298.6%
Applied egg-rr98.6%
Taylor expanded in t around 0 57.7%
mul-1-neg57.7%
associate-/r*61.9%
distribute-neg-frac61.9%
distribute-frac-neg61.9%
Simplified61.9%
associate-/l/57.7%
neg-mul-157.7%
times-frac61.8%
Applied egg-rr61.8%
Taylor expanded in y around 0 53.6%
if -1.9e-207 < y Initial program 87.4%
add-cube-cbrt86.6%
times-frac96.5%
pow296.5%
Applied egg-rr96.5%
frac-times86.6%
unpow286.6%
add-cube-cbrt87.4%
*-commutative87.4%
associate-/r*97.5%
Applied egg-rr97.5%
Taylor expanded in t around inf 63.2%
Final simplification69.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)))
(if (<= z -4.8e+118)
t_1
(if (<= z -2.4e-87)
(/ (/ (- x) t) z)
(if (<= z 5.8e+65) (/ (/ x t) y) 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 tmp;
if (z <= -4.8e+118) {
tmp = t_1;
} else if (z <= -2.4e-87) {
tmp = (-x / t) / z;
} else if (z <= 5.8e+65) {
tmp = (x / t) / y;
} 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 / z) / y
if (z <= (-4.8d+118)) then
tmp = t_1
else if (z <= (-2.4d-87)) then
tmp = (-x / t) / z
else if (z <= 5.8d+65) then
tmp = (x / t) / y
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 tmp;
if (z <= -4.8e+118) {
tmp = t_1;
} else if (z <= -2.4e-87) {
tmp = (-x / t) / z;
} else if (z <= 5.8e+65) {
tmp = (x / t) / y;
} 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 tmp = 0 if z <= -4.8e+118: tmp = t_1 elif z <= -2.4e-87: tmp = (-x / t) / z elif z <= 5.8e+65: tmp = (x / t) / y 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(-Float64(x / z)) / y) tmp = 0.0 if (z <= -4.8e+118) tmp = t_1; elseif (z <= -2.4e-87) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 5.8e+65) tmp = Float64(Float64(x / t) / y); 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;
tmp = 0.0;
if (z <= -4.8e+118)
tmp = t_1;
elseif (z <= -2.4e-87)
tmp = (-x / t) / z;
elseif (z <= 5.8e+65)
tmp = (x / t) / y;
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]}, If[LessEqual[z, -4.8e+118], t$95$1, If[LessEqual[z, -2.4e-87], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.8e+65], N[(N[(x / t), $MachinePrecision] / y), $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}{z}}{y}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8e118 or 5.8000000000000001e65 < z Initial program 77.7%
Taylor expanded in y around inf 42.5%
*-commutative42.5%
associate-/r*55.2%
Simplified55.2%
Taylor expanded in t around 0 52.7%
associate-*r/52.7%
neg-mul-152.7%
Simplified52.7%
if -4.8e118 < z < -2.4e-87Initial program 93.5%
Taylor expanded in t around inf 41.0%
Taylor expanded in y around 0 32.2%
associate-*r/32.2%
associate-/r*36.3%
neg-mul-136.3%
Simplified36.3%
if -2.4e-87 < z < 5.8000000000000001e65Initial program 92.1%
Taylor expanded in y around inf 70.7%
*-commutative70.7%
associate-/r*75.4%
Simplified75.4%
Taylor expanded in t around inf 66.8%
Final simplification56.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -6.2e+120)
(* (/ x z) (/ -1.0 y))
(if (<= z -1.5e-93)
(/ (/ (- x) t) z)
(if (<= z 3.4e+62) (/ (/ x t) y) (/ (- (/ x z)) y)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.2e+120) {
tmp = (x / z) * (-1.0 / y);
} else if (z <= -1.5e-93) {
tmp = (-x / t) / z;
} else if (z <= 3.4e+62) {
tmp = (x / t) / y;
} else {
tmp = -(x / z) / 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 <= (-6.2d+120)) then
tmp = (x / z) * ((-1.0d0) / y)
else if (z <= (-1.5d-93)) then
tmp = (-x / t) / z
else if (z <= 3.4d+62) then
tmp = (x / t) / y
else
tmp = -(x / z) / 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 <= -6.2e+120) {
tmp = (x / z) * (-1.0 / y);
} else if (z <= -1.5e-93) {
tmp = (-x / t) / z;
} else if (z <= 3.4e+62) {
tmp = (x / t) / y;
} else {
tmp = -(x / z) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -6.2e+120: tmp = (x / z) * (-1.0 / y) elif z <= -1.5e-93: tmp = (-x / t) / z elif z <= 3.4e+62: tmp = (x / t) / y else: tmp = -(x / z) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.2e+120) tmp = Float64(Float64(x / z) * Float64(-1.0 / y)); elseif (z <= -1.5e-93) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 3.4e+62) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-Float64(x / z)) / 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 <= -6.2e+120)
tmp = (x / z) * (-1.0 / y);
elseif (z <= -1.5e-93)
tmp = (-x / t) / z;
elseif (z <= 3.4e+62)
tmp = (x / t) / y;
else
tmp = -(x / z) / 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[z, -6.2e+120], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-93], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.4e+62], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[((-N[(x / z), $MachinePrecision]) / y), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+120}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{y}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+62}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\frac{x}{z}}{y}\\
\end{array}
\end{array}
if z < -6.19999999999999947e120Initial program 75.7%
Taylor expanded in y around inf 42.2%
*-commutative42.2%
associate-/r*51.6%
Simplified51.6%
Taylor expanded in t around 0 51.6%
associate-*r/51.6%
neg-mul-151.6%
Simplified51.6%
associate-/l/42.2%
neg-mul-142.2%
times-frac51.6%
Applied egg-rr51.6%
if -6.19999999999999947e120 < z < -1.5000000000000001e-93Initial program 93.5%
Taylor expanded in t around inf 41.0%
Taylor expanded in y around 0 32.2%
associate-*r/32.2%
associate-/r*36.3%
neg-mul-136.3%
Simplified36.3%
if -1.5000000000000001e-93 < z < 3.40000000000000014e62Initial program 92.1%
Taylor expanded in y around inf 70.7%
*-commutative70.7%
associate-/r*75.4%
Simplified75.4%
Taylor expanded in t around inf 66.8%
if 3.40000000000000014e62 < z Initial program 79.1%
Taylor expanded in y around inf 42.8%
*-commutative42.8%
associate-/r*57.7%
Simplified57.7%
Taylor expanded in t around 0 53.5%
associate-*r/53.5%
neg-mul-153.5%
Simplified53.5%
Final simplification56.8%
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 -1.6e-10) (not (<= z 7e+19))) (* (/ 1.0 z) (/ x 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 <= -1.6e-10) || !(z <= 7e+19)) {
tmp = (1.0 / z) * (x / 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 <= (-1.6d-10)) .or. (.not. (z <= 7d+19))) then
tmp = (1.0d0 / z) * (x / 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 <= -1.6e-10) || !(z <= 7e+19)) {
tmp = (1.0 / z) * (x / 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 <= -1.6e-10) or not (z <= 7e+19): tmp = (1.0 / z) * (x / 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 <= -1.6e-10) || !(z <= 7e+19)) tmp = Float64(Float64(1.0 / z) * Float64(x / 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 <= -1.6e-10) || ~((z <= 7e+19)))
tmp = (1.0 / z) * (x / 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, -1.6e-10], N[Not[LessEqual[z, 7e+19]], $MachinePrecision]], N[(N[(1.0 / z), $MachinePrecision] * N[(x / 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 -1.6 \cdot 10^{-10} \lor \neg \left(z \leq 7 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{1}{z} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.5999999999999999e-10 or 7e19 < z Initial program 82.5%
add-cube-cbrt82.0%
times-frac99.0%
pow299.0%
Applied egg-rr99.0%
Taylor expanded in t around 0 71.9%
mul-1-neg71.9%
associate-/r*83.2%
distribute-neg-frac83.2%
distribute-frac-neg83.2%
Simplified83.2%
associate-/l/71.9%
neg-mul-171.9%
times-frac83.1%
Applied egg-rr83.1%
Taylor expanded in y around 0 74.2%
if -1.5999999999999999e-10 < z < 7e19Initial program 92.6%
Taylor expanded in y around inf 75.0%
*-commutative75.0%
associate-/r*79.1%
Simplified79.1%
Taylor expanded in t around inf 67.6%
Final simplification70.9%
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 -70000.0) (not (<= z 2.05e+56))) (* (/ 1.0 z) (/ x z)) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -70000.0) || !(z <= 2.05e+56)) {
tmp = (1.0 / z) * (x / z);
} 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 ((z <= (-70000.0d0)) .or. (.not. (z <= 2.05d+56))) then
tmp = (1.0d0 / z) * (x / z)
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 ((z <= -70000.0) || !(z <= 2.05e+56)) {
tmp = (1.0 / z) * (x / z);
} 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 (z <= -70000.0) or not (z <= 2.05e+56): tmp = (1.0 / z) * (x / z) 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 ((z <= -70000.0) || !(z <= 2.05e+56)) tmp = Float64(Float64(1.0 / z) * Float64(x / z)); 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 ((z <= -70000.0) || ~((z <= 2.05e+56)))
tmp = (1.0 / z) * (x / z);
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[Or[LessEqual[z, -70000.0], N[Not[LessEqual[z, 2.05e+56]], $MachinePrecision]], N[(N[(1.0 / z), $MachinePrecision] * N[(x / z), $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}\;z \leq -70000 \lor \neg \left(z \leq 2.05 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{1}{z} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -7e4 or 2.0500000000000002e56 < z Initial program 82.0%
add-cube-cbrt81.5%
times-frac99.0%
pow299.0%
Applied egg-rr99.0%
Taylor expanded in t around 0 73.0%
mul-1-neg73.0%
associate-/r*85.1%
distribute-neg-frac85.1%
distribute-frac-neg85.1%
Simplified85.1%
associate-/l/73.0%
neg-mul-173.0%
times-frac85.0%
Applied egg-rr85.0%
Taylor expanded in y around 0 77.1%
if -7e4 < z < 2.0500000000000002e56Initial program 92.4%
Taylor expanded in t around inf 75.1%
Final simplification76.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 -70000.0) (not (<= z 9e+56))) (* (/ 1.0 z) (/ x 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 ((z <= -70000.0) || !(z <= 9e+56)) {
tmp = (1.0 / z) * (x / 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 ((z <= (-70000.0d0)) .or. (.not. (z <= 9d+56))) then
tmp = (1.0d0 / z) * (x / 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 ((z <= -70000.0) || !(z <= 9e+56)) {
tmp = (1.0 / z) * (x / 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 (z <= -70000.0) or not (z <= 9e+56): tmp = (1.0 / z) * (x / 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 ((z <= -70000.0) || !(z <= 9e+56)) tmp = Float64(Float64(1.0 / z) * Float64(x / 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 ((z <= -70000.0) || ~((z <= 9e+56)))
tmp = (1.0 / z) * (x / 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[Or[LessEqual[z, -70000.0], N[Not[LessEqual[z, 9e+56]], $MachinePrecision]], N[(N[(1.0 / z), $MachinePrecision] * N[(x / 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}\;z \leq -70000 \lor \neg \left(z \leq 9 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{1}{z} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -7e4 or 9.0000000000000006e56 < z Initial program 82.0%
add-cube-cbrt81.5%
times-frac99.0%
pow299.0%
Applied egg-rr99.0%
Taylor expanded in t around 0 73.0%
mul-1-neg73.0%
associate-/r*85.1%
distribute-neg-frac85.1%
distribute-frac-neg85.1%
Simplified85.1%
associate-/l/73.0%
neg-mul-173.0%
times-frac85.0%
Applied egg-rr85.0%
Taylor expanded in y around 0 77.1%
if -7e4 < z < 9.0000000000000006e56Initial program 92.4%
add-cube-cbrt91.3%
times-frac95.9%
pow295.9%
Applied egg-rr95.9%
frac-times91.3%
unpow291.3%
add-cube-cbrt92.4%
*-commutative92.4%
associate-/r*94.2%
Applied egg-rr94.2%
Taylor expanded in t around inf 75.9%
Final simplification76.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -1.2e-93) (/ (- x) (* z t)) (if (<= z 2.05e+170) (/ (/ x t) y) (/ (- x) (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e-93) {
tmp = -x / (z * t);
} else if (z <= 2.05e+170) {
tmp = (x / t) / y;
} else {
tmp = -x / (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 (z <= (-1.2d-93)) then
tmp = -x / (z * t)
else if (z <= 2.05d+170) then
tmp = (x / t) / y
else
tmp = -x / (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 (z <= -1.2e-93) {
tmp = -x / (z * t);
} else if (z <= 2.05e+170) {
tmp = (x / t) / y;
} else {
tmp = -x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -1.2e-93: tmp = -x / (z * t) elif z <= 2.05e+170: tmp = (x / t) / y else: tmp = -x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.2e-93) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 2.05e+170) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-x) / 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 (z <= -1.2e-93)
tmp = -x / (z * t);
elseif (z <= 2.05e+170)
tmp = (x / t) / y;
else
tmp = -x / (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[z, -1.2e-93], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+170], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+170}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\end{array}
\end{array}
if z < -1.2000000000000001e-93Initial program 85.5%
Taylor expanded in z around 0 60.5%
fma-def60.5%
mul-1-neg60.5%
unsub-neg60.5%
mul-1-neg60.5%
Simplified60.5%
Taylor expanded in y around 0 35.0%
associate-*r/35.0%
neg-mul-135.0%
Simplified35.0%
if -1.2000000000000001e-93 < z < 2.05e170Initial program 90.6%
Taylor expanded in y around inf 66.7%
*-commutative66.7%
associate-/r*73.3%
Simplified73.3%
Taylor expanded in t around inf 62.6%
if 2.05e170 < z Initial program 78.6%
Taylor expanded in y around inf 44.7%
*-commutative44.7%
associate-/r*56.8%
Simplified56.8%
Taylor expanded in t around 0 44.5%
associate-*r/44.5%
neg-mul-144.5%
*-commutative44.5%
Simplified44.5%
Final simplification51.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -3.5e-87) (/ (/ (- x) t) z) (if (<= z 5.4e+169) (/ (/ x t) y) (/ (- x) (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e-87) {
tmp = (-x / t) / z;
} else if (z <= 5.4e+169) {
tmp = (x / t) / y;
} else {
tmp = -x / (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 (z <= (-3.5d-87)) then
tmp = (-x / t) / z
else if (z <= 5.4d+169) then
tmp = (x / t) / y
else
tmp = -x / (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 (z <= -3.5e-87) {
tmp = (-x / t) / z;
} else if (z <= 5.4e+169) {
tmp = (x / t) / y;
} else {
tmp = -x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -3.5e-87: tmp = (-x / t) / z elif z <= 5.4e+169: tmp = (x / t) / y else: tmp = -x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e-87) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 5.4e+169) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-x) / 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 (z <= -3.5e-87)
tmp = (-x / t) / z;
elseif (z <= 5.4e+169)
tmp = (x / t) / y;
else
tmp = -x / (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[z, -3.5e-87], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.4e+169], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+169}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\end{array}
\end{array}
if z < -3.50000000000000012e-87Initial program 85.5%
Taylor expanded in t around inf 40.4%
Taylor expanded in y around 0 35.0%
associate-*r/35.0%
associate-/r*36.7%
neg-mul-136.7%
Simplified36.7%
if -3.50000000000000012e-87 < z < 5.39999999999999981e169Initial program 90.6%
Taylor expanded in y around inf 66.7%
*-commutative66.7%
associate-/r*73.3%
Simplified73.3%
Taylor expanded in t around inf 62.6%
if 5.39999999999999981e169 < z Initial program 78.6%
Taylor expanded in y around inf 44.7%
*-commutative44.7%
associate-/r*56.8%
Simplified56.8%
Taylor expanded in t around 0 44.5%
associate-*r/44.5%
neg-mul-144.5%
*-commutative44.5%
Simplified44.5%
Final simplification52.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 (or (<= z -92000000000000.0) (not (<= z 1.95e+18))) (/ x (* z t)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -92000000000000.0) || !(z <= 1.95e+18)) {
tmp = x / (z * t);
} 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 <= (-92000000000000.0d0)) .or. (.not. (z <= 1.95d+18))) then
tmp = x / (z * t)
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 <= -92000000000000.0) || !(z <= 1.95e+18)) {
tmp = x / (z * t);
} 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 <= -92000000000000.0) or not (z <= 1.95e+18): tmp = x / (z * t) 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 <= -92000000000000.0) || !(z <= 1.95e+18)) tmp = Float64(x / Float64(z * t)); 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 <= -92000000000000.0) || ~((z <= 1.95e+18)))
tmp = x / (z * t);
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, -92000000000000.0], N[Not[LessEqual[z, 1.95e+18]], $MachinePrecision]], N[(x / N[(z * t), $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 -92000000000000 \lor \neg \left(z \leq 1.95 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -9.2e13 or 1.95e18 < z Initial program 81.9%
Taylor expanded in t around inf 40.5%
Taylor expanded in y around 0 39.7%
associate-*r/39.7%
associate-/r*39.8%
neg-mul-139.8%
Simplified39.8%
expm1-log1p-u38.6%
expm1-udef53.1%
associate-/l/52.9%
add-sqr-sqrt24.5%
sqrt-unprod51.2%
sqr-neg51.2%
sqrt-unprod28.3%
add-sqr-sqrt52.8%
*-commutative52.8%
Applied egg-rr52.8%
expm1-def34.1%
expm1-log1p34.4%
Simplified34.4%
if -9.2e13 < z < 1.95e18Initial program 92.9%
Taylor expanded in z around 0 62.1%
Final simplification48.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 (<= z -36000000000000.0) (/ x (* z t)) (if (<= z 6.5e+77) (/ x (* y t)) (/ x (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -36000000000000.0) {
tmp = x / (z * t);
} else if (z <= 6.5e+77) {
tmp = x / (y * t);
} else {
tmp = x / (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 (z <= (-36000000000000.0d0)) then
tmp = x / (z * t)
else if (z <= 6.5d+77) then
tmp = x / (y * t)
else
tmp = x / (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 (z <= -36000000000000.0) {
tmp = x / (z * t);
} else if (z <= 6.5e+77) {
tmp = x / (y * t);
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -36000000000000.0: tmp = x / (z * t) elif z <= 6.5e+77: tmp = x / (y * t) else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -36000000000000.0) tmp = Float64(x / Float64(z * t)); elseif (z <= 6.5e+77) tmp = Float64(x / Float64(y * t)); else tmp = Float64(x / 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 (z <= -36000000000000.0)
tmp = x / (z * t);
elseif (z <= 6.5e+77)
tmp = x / (y * t);
else
tmp = x / (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[z, -36000000000000.0], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+77], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -36000000000000:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -3.6e13Initial program 82.4%
Taylor expanded in t around inf 37.7%
Taylor expanded in y around 0 37.1%
associate-*r/37.1%
associate-/r*37.9%
neg-mul-137.9%
Simplified37.9%
expm1-log1p-u37.4%
expm1-udef53.5%
associate-/l/53.1%
add-sqr-sqrt20.1%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod33.2%
add-sqr-sqrt53.3%
*-commutative53.3%
Applied egg-rr53.3%
expm1-def31.8%
expm1-log1p32.0%
Simplified32.0%
if -3.6e13 < z < 6.5e77Initial program 92.7%
Taylor expanded in z around 0 56.8%
if 6.5e77 < z Initial program 77.4%
Taylor expanded in y around inf 44.1%
*-commutative44.1%
associate-/r*60.4%
Simplified60.4%
Taylor expanded in t around 0 56.3%
associate-*r/56.3%
neg-mul-156.3%
Simplified56.3%
expm1-log1p-u56.1%
expm1-udef64.5%
associate-/l/64.5%
add-sqr-sqrt37.6%
sqrt-unprod64.0%
sqr-neg64.0%
sqrt-unprod26.9%
add-sqr-sqrt64.5%
Applied egg-rr64.5%
expm1-def41.9%
expm1-log1p42.1%
*-commutative42.1%
Simplified42.1%
Final simplification48.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 (<= z -92000000000000.0) (/ x (* z t)) (if (<= z 3.8e+128) (/ (/ x t) y) (/ x (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -92000000000000.0) {
tmp = x / (z * t);
} else if (z <= 3.8e+128) {
tmp = (x / t) / y;
} else {
tmp = x / (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 (z <= (-92000000000000.0d0)) then
tmp = x / (z * t)
else if (z <= 3.8d+128) then
tmp = (x / t) / y
else
tmp = x / (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 (z <= -92000000000000.0) {
tmp = x / (z * t);
} else if (z <= 3.8e+128) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -92000000000000.0: tmp = x / (z * t) elif z <= 3.8e+128: tmp = (x / t) / y else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -92000000000000.0) tmp = Float64(x / Float64(z * t)); elseif (z <= 3.8e+128) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / 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 (z <= -92000000000000.0)
tmp = x / (z * t);
elseif (z <= 3.8e+128)
tmp = (x / t) / y;
else
tmp = x / (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[z, -92000000000000.0], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+128], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -92000000000000:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+128}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -9.2e13Initial program 82.4%
Taylor expanded in t around inf 37.7%
Taylor expanded in y around 0 37.1%
associate-*r/37.1%
associate-/r*37.9%
neg-mul-137.9%
Simplified37.9%
expm1-log1p-u37.4%
expm1-udef53.5%
associate-/l/53.1%
add-sqr-sqrt20.1%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod33.2%
add-sqr-sqrt53.3%
*-commutative53.3%
Applied egg-rr53.3%
expm1-def31.8%
expm1-log1p32.0%
Simplified32.0%
if -9.2e13 < z < 3.7999999999999999e128Initial program 91.5%
Taylor expanded in y around inf 65.9%
*-commutative65.9%
associate-/r*73.0%
Simplified73.0%
Taylor expanded in t around inf 60.2%
if 3.7999999999999999e128 < z Initial program 77.7%
Taylor expanded in y around inf 44.0%
*-commutative44.0%
associate-/r*55.0%
Simplified55.0%
Taylor expanded in t around 0 54.8%
associate-*r/54.8%
neg-mul-154.8%
Simplified54.8%
expm1-log1p-u54.7%
expm1-udef71.4%
associate-/l/71.4%
add-sqr-sqrt47.1%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod24.2%
add-sqr-sqrt71.4%
Applied egg-rr71.4%
expm1-def43.6%
expm1-log1p43.9%
*-commutative43.9%
Simplified43.9%
Final simplification51.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 (<= z -6.5e-88) (/ (- x) (* z t)) (if (<= z 1.9e+128) (/ (/ x t) y) (/ x (* y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.5e-88) {
tmp = -x / (z * t);
} else if (z <= 1.9e+128) {
tmp = (x / t) / y;
} else {
tmp = x / (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 (z <= (-6.5d-88)) then
tmp = -x / (z * t)
else if (z <= 1.9d+128) then
tmp = (x / t) / y
else
tmp = x / (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 (z <= -6.5e-88) {
tmp = -x / (z * t);
} else if (z <= 1.9e+128) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -6.5e-88: tmp = -x / (z * t) elif z <= 1.9e+128: tmp = (x / t) / y else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.5e-88) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.9e+128) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / 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 (z <= -6.5e-88)
tmp = -x / (z * t);
elseif (z <= 1.9e+128)
tmp = (x / t) / y;
else
tmp = x / (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[z, -6.5e-88], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+128], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+128}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < -6.50000000000000006e-88Initial program 85.5%
Taylor expanded in z around 0 60.5%
fma-def60.5%
mul-1-neg60.5%
unsub-neg60.5%
mul-1-neg60.5%
Simplified60.5%
Taylor expanded in y around 0 35.0%
associate-*r/35.0%
neg-mul-135.0%
Simplified35.0%
if -6.50000000000000006e-88 < z < 1.89999999999999995e128Initial program 91.0%
Taylor expanded in y around inf 67.3%
*-commutative67.3%
associate-/r*74.1%
Simplified74.1%
Taylor expanded in t around inf 63.7%
if 1.89999999999999995e128 < z Initial program 77.7%
Taylor expanded in y around inf 44.0%
*-commutative44.0%
associate-/r*55.0%
Simplified55.0%
Taylor expanded in t around 0 54.8%
associate-*r/54.8%
neg-mul-154.8%
Simplified54.8%
expm1-log1p-u54.7%
expm1-udef71.4%
associate-/l/71.4%
add-sqr-sqrt47.1%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod24.2%
add-sqr-sqrt71.4%
Applied egg-rr71.4%
expm1-def43.6%
expm1-log1p43.9%
*-commutative43.9%
Simplified43.9%
Final simplification52.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 -7.5e+204) (/ (/ x (- t 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 (y <= -7.5e+204) {
tmp = (x / (t - 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 (y <= (-7.5d+204)) then
tmp = (x / (t - 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 (y <= -7.5e+204) {
tmp = (x / (t - 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 y <= -7.5e+204: tmp = (x / (t - 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 (y <= -7.5e+204) tmp = Float64(Float64(x / Float64(t - 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 (y <= -7.5e+204)
tmp = (x / (t - 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[LessEqual[y, -7.5e+204], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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}\;y \leq -7.5 \cdot 10^{+204}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if y < -7.4999999999999998e204Initial program 59.7%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*95.1%
Simplified95.1%
if -7.4999999999999998e204 < y Initial program 90.3%
Final simplification90.7%
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 87.5%
add-cube-cbrt86.7%
times-frac97.4%
pow297.4%
Applied egg-rr97.4%
frac-times86.7%
unpow286.7%
add-cube-cbrt87.5%
*-commutative87.5%
associate-/r*96.8%
Applied egg-rr96.8%
Final simplification96.8%
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 z)) (- t z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - 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 / (y - z)) / (t - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (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[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 87.5%
add-cube-cbrt86.7%
times-frac97.4%
pow297.4%
Applied egg-rr97.4%
associate-*r/96.1%
associate-*l/96.1%
unpow296.1%
add-cube-cbrt97.1%
Applied egg-rr97.1%
Final simplification97.1%
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 87.5%
Taylor expanded in z around 0 40.7%
Final simplification40.7%
(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 2024027
(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))))