
(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 18 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 (/ -1.0 (* (- y z) (/ (- z t) x))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / x));
}
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 = (-1.0d0) / ((y - z) * ((z - t) / x))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return -1.0 / ((y - z) * ((z - t) / x));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return -1.0 / ((y - z) * ((z - t) / x))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(-1.0 / Float64(Float64(y - z) * Float64(Float64(z - t) / x))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = -1.0 / ((y - z) * ((z - t) / x));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(-1.0 / N[(N[(y - z), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{-1}{\left(y - z\right) \cdot \frac{z - t}{x}}
\end{array}
Initial program 88.1%
clear-num87.6%
inv-pow87.6%
associate-/l*96.5%
Applied egg-rr96.5%
unpow-196.5%
Simplified96.5%
Final simplification96.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 t))))
(if (<= z -1.1e+161)
t_1
(if (<= z -4.3e+42)
(/ x (* z (- z y)))
(if (<= z -6.5e-40)
t_1
(if (<= z 2.15e-128)
(/ (/ x t) (- y z))
(if (<= z 13600000000.0) (/ x (* y (- 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 / z) / (z - t);
double tmp;
if (z <= -1.1e+161) {
tmp = t_1;
} else if (z <= -4.3e+42) {
tmp = x / (z * (z - y));
} else if (z <= -6.5e-40) {
tmp = t_1;
} else if (z <= 2.15e-128) {
tmp = (x / t) / (y - z);
} else if (z <= 13600000000.0) {
tmp = x / (y * (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 / z) / (z - t)
if (z <= (-1.1d+161)) then
tmp = t_1
else if (z <= (-4.3d+42)) then
tmp = x / (z * (z - y))
else if (z <= (-6.5d-40)) then
tmp = t_1
else if (z <= 2.15d-128) then
tmp = (x / t) / (y - z)
else if (z <= 13600000000.0d0) then
tmp = x / (y * (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 / z) / (z - t);
double tmp;
if (z <= -1.1e+161) {
tmp = t_1;
} else if (z <= -4.3e+42) {
tmp = x / (z * (z - y));
} else if (z <= -6.5e-40) {
tmp = t_1;
} else if (z <= 2.15e-128) {
tmp = (x / t) / (y - z);
} else if (z <= 13600000000.0) {
tmp = x / (y * (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 / z) / (z - t) tmp = 0 if z <= -1.1e+161: tmp = t_1 elif z <= -4.3e+42: tmp = x / (z * (z - y)) elif z <= -6.5e-40: tmp = t_1 elif z <= 2.15e-128: tmp = (x / t) / (y - z) elif z <= 13600000000.0: tmp = x / (y * (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(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (z <= -1.1e+161) tmp = t_1; elseif (z <= -4.3e+42) tmp = Float64(x / Float64(z * Float64(z - y))); elseif (z <= -6.5e-40) tmp = t_1; elseif (z <= 2.15e-128) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (z <= 13600000000.0) tmp = Float64(x / Float64(y * 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 / z) / (z - t);
tmp = 0.0;
if (z <= -1.1e+161)
tmp = t_1;
elseif (z <= -4.3e+42)
tmp = x / (z * (z - y));
elseif (z <= -6.5e-40)
tmp = t_1;
elseif (z <= 2.15e-128)
tmp = (x / t) / (y - z);
elseif (z <= 13600000000.0)
tmp = x / (y * (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[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+161], t$95$1, If[LessEqual[z, -4.3e+42], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-40], t$95$1, If[LessEqual[z, 2.15e-128], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 13600000000.0], N[(x / N[(y * N[(t - z), $MachinePrecision]), $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}{z}}{z - t}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{+42}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-128}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;z \leq 13600000000:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1e161 or -4.2999999999999998e42 < z < -6.4999999999999999e-40 or 1.36e10 < z Initial program 81.9%
associate-/r*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
distribute-neg-frac299.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 72.8%
associate-/r*85.1%
Simplified85.1%
if -1.1e161 < z < -4.2999999999999998e42Initial program 93.1%
associate-/r*99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
Simplified99.7%
Taylor expanded in t around 0 77.2%
if -6.4999999999999999e-40 < z < 2.14999999999999997e-128Initial program 90.8%
Taylor expanded in t around inf 80.1%
associate-/r*81.1%
Simplified81.1%
if 2.14999999999999997e-128 < z < 1.36e10Initial program 99.6%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
Simplified66.5%
Final simplification81.0%
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 t))))
(if (<= z -2.8e+155)
t_1
(if (<= z -2.5e-58)
(/ (/ x y) t)
(if (<= z 5.2e-283)
(/ x (* y t))
(if (<= z 7.6e+78) (/ (/ 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 * t);
double tmp;
if (z <= -2.8e+155) {
tmp = t_1;
} else if (z <= -2.5e-58) {
tmp = (x / y) / t;
} else if (z <= 5.2e-283) {
tmp = x / (y * t);
} else if (z <= 7.6e+78) {
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 * t)
if (z <= (-2.8d+155)) then
tmp = t_1
else if (z <= (-2.5d-58)) then
tmp = (x / y) / t
else if (z <= 5.2d-283) then
tmp = x / (y * t)
else if (z <= 7.6d+78) 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 * t);
double tmp;
if (z <= -2.8e+155) {
tmp = t_1;
} else if (z <= -2.5e-58) {
tmp = (x / y) / t;
} else if (z <= 5.2e-283) {
tmp = x / (y * t);
} else if (z <= 7.6e+78) {
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 * t) tmp = 0 if z <= -2.8e+155: tmp = t_1 elif z <= -2.5e-58: tmp = (x / y) / t elif z <= 5.2e-283: tmp = x / (y * t) elif z <= 7.6e+78: 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(x / Float64(z * t)) tmp = 0.0 if (z <= -2.8e+155) tmp = t_1; elseif (z <= -2.5e-58) tmp = Float64(Float64(x / y) / t); elseif (z <= 5.2e-283) tmp = Float64(x / Float64(y * t)); elseif (z <= 7.6e+78) 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 * t);
tmp = 0.0;
if (z <= -2.8e+155)
tmp = t_1;
elseif (z <= -2.5e-58)
tmp = (x / y) / t;
elseif (z <= 5.2e-283)
tmp = x / (y * t);
elseif (z <= 7.6e+78)
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[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+155], t$95$1, If[LessEqual[z, -2.5e-58], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 5.2e-283], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+78], 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{x}{z \cdot t}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-283}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+78}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.80000000000000016e155 or 7.5999999999999998e78 < z Initial program 79.7%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 77.8%
Taylor expanded in z around 0 35.5%
mul-1-neg35.5%
associate-/r*38.7%
distribute-neg-frac238.7%
Simplified38.7%
associate-/l/35.5%
add035.5%
add-sqr-sqrt13.3%
sqrt-unprod62.8%
sqr-neg62.8%
sqrt-unprod20.8%
add-sqr-sqrt33.9%
Applied egg-rr33.9%
*-commutative33.9%
add033.9%
Simplified33.9%
if -2.80000000000000016e155 < z < -2.49999999999999989e-58Initial program 93.8%
associate-/r*98.3%
sub-neg98.3%
+-commutative98.3%
neg-sub098.3%
associate-+l-98.3%
neg-sub098.3%
distribute-neg-frac298.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
sub-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
+-commutative98.3%
sub-neg98.3%
Simplified98.3%
clear-num98.2%
inv-pow98.2%
div-inv97.3%
clear-num97.4%
Applied egg-rr97.4%
unpow-197.4%
Simplified97.4%
clear-num97.3%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in z around 0 22.9%
*-rgt-identity22.9%
*-commutative22.9%
times-frac35.1%
associate-*r/35.2%
*-rgt-identity35.2%
Simplified35.2%
if -2.49999999999999989e-58 < z < 5.2000000000000002e-283Initial program 96.8%
Taylor expanded in z around 0 78.9%
if 5.2000000000000002e-283 < z < 7.5999999999999998e78Initial program 87.9%
clear-num87.3%
inv-pow87.3%
associate-/l*96.5%
Applied egg-rr96.5%
unpow-196.5%
Simplified96.5%
Taylor expanded in z around 0 51.3%
associate-/r*59.5%
Simplified59.5%
Final simplification50.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 (<= z -1.1e+161)
(/ 1.0 (* z (/ z x)))
(if (or (<= z -1.04e-39) (not (<= z 2e-62)))
(/ x (* z (- z t)))
(/ 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 <= -1.1e+161) {
tmp = 1.0 / (z * (z / x));
} else if ((z <= -1.04e-39) || !(z <= 2e-62)) {
tmp = x / (z * (z - t));
} 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 <= (-1.1d+161)) then
tmp = 1.0d0 / (z * (z / x))
else if ((z <= (-1.04d-39)) .or. (.not. (z <= 2d-62))) then
tmp = x / (z * (z - t))
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 <= -1.1e+161) {
tmp = 1.0 / (z * (z / x));
} else if ((z <= -1.04e-39) || !(z <= 2e-62)) {
tmp = x / (z * (z - t));
} 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 <= -1.1e+161: tmp = 1.0 / (z * (z / x)) elif (z <= -1.04e-39) or not (z <= 2e-62): tmp = x / (z * (z - t)) 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 <= -1.1e+161) tmp = Float64(1.0 / Float64(z * Float64(z / x))); elseif ((z <= -1.04e-39) || !(z <= 2e-62)) tmp = Float64(x / Float64(z * Float64(z - t))); 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 <= -1.1e+161)
tmp = 1.0 / (z * (z / x));
elseif ((z <= -1.04e-39) || ~((z <= 2e-62)))
tmp = x / (z * (z - t));
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[z, -1.1e+161], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.04e-39], N[Not[LessEqual[z, 2e-62]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $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}\;z \leq -1.1 \cdot 10^{+161}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\mathbf{elif}\;z \leq -1.04 \cdot 10^{-39} \lor \neg \left(z \leq 2 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -1.1e161Initial program 72.8%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in t around 0 72.8%
associate-*r/93.9%
Simplified93.9%
Taylor expanded in z around inf 92.3%
if -1.1e161 < z < -1.0400000000000001e-39 or 2.0000000000000001e-62 < z Initial program 88.8%
associate-/r*99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
Simplified99.7%
Taylor expanded in y around 0 74.5%
if -1.0400000000000001e-39 < z < 2.0000000000000001e-62Initial program 91.8%
Taylor expanded in t around inf 79.6%
Final simplification78.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 -2.6e+161)
(/ 1.0 (* z (/ z x)))
(if (or (<= z -7.5e-41) (not (<= z 1.3e-69)))
(/ 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 (z <= -2.6e+161) {
tmp = 1.0 / (z * (z / x));
} else if ((z <= -7.5e-41) || !(z <= 1.3e-69)) {
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 (z <= (-2.6d+161)) then
tmp = 1.0d0 / (z * (z / x))
else if ((z <= (-7.5d-41)) .or. (.not. (z <= 1.3d-69))) 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 (z <= -2.6e+161) {
tmp = 1.0 / (z * (z / x));
} else if ((z <= -7.5e-41) || !(z <= 1.3e-69)) {
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 z <= -2.6e+161: tmp = 1.0 / (z * (z / x)) elif (z <= -7.5e-41) or not (z <= 1.3e-69): 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 (z <= -2.6e+161) tmp = Float64(1.0 / Float64(z * Float64(z / x))); elseif ((z <= -7.5e-41) || !(z <= 1.3e-69)) 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 (z <= -2.6e+161)
tmp = 1.0 / (z * (z / x));
elseif ((z <= -7.5e-41) || ~((z <= 1.3e-69)))
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[z, -2.6e+161], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.5e-41], N[Not[LessEqual[z, 1.3e-69]], $MachinePrecision]], 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}\;z \leq -2.6 \cdot 10^{+161}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-41} \lor \neg \left(z \leq 1.3 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -2.5999999999999998e161Initial program 72.8%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
clear-num99.8%
inv-pow99.8%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in t around 0 72.8%
associate-*r/93.9%
Simplified93.9%
Taylor expanded in z around inf 92.3%
if -2.5999999999999998e161 < z < -7.50000000000000049e-41 or 1.3000000000000001e-69 < z Initial program 88.9%
associate-/r*99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
Simplified99.7%
Taylor expanded in t around 0 73.4%
if -7.50000000000000049e-41 < z < 1.3000000000000001e-69Initial program 91.8%
Taylor expanded in t around inf 79.4%
Final simplification78.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 (<= z -8.2e-42)
(/ (/ x z) (- z y))
(if (<= z 1.42e-128)
(/ (/ x t) (- y z))
(if (<= z 9000000000000.0) (/ x (* y (- t z))) (/ (/ x z) (- z t))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.2e-42) {
tmp = (x / z) / (z - y);
} else if (z <= 1.42e-128) {
tmp = (x / t) / (y - z);
} else if (z <= 9000000000000.0) {
tmp = x / (y * (t - z));
} else {
tmp = (x / z) / (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 <= (-8.2d-42)) then
tmp = (x / z) / (z - y)
else if (z <= 1.42d-128) then
tmp = (x / t) / (y - z)
else if (z <= 9000000000000.0d0) then
tmp = x / (y * (t - z))
else
tmp = (x / z) / (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 <= -8.2e-42) {
tmp = (x / z) / (z - y);
} else if (z <= 1.42e-128) {
tmp = (x / t) / (y - z);
} else if (z <= 9000000000000.0) {
tmp = x / (y * (t - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -8.2e-42: tmp = (x / z) / (z - y) elif z <= 1.42e-128: tmp = (x / t) / (y - z) elif z <= 9000000000000.0: tmp = x / (y * (t - z)) else: tmp = (x / z) / (z - t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -8.2e-42) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 1.42e-128) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (z <= 9000000000000.0) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / z) / Float64(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 <= -8.2e-42)
tmp = (x / z) / (z - y);
elseif (z <= 1.42e-128)
tmp = (x / t) / (y - z);
elseif (z <= 9000000000000.0)
tmp = x / (y * (t - z));
else
tmp = (x / z) / (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[z, -8.2e-42], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e-128], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9000000000000.0], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-128}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;z \leq 9000000000000:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -8.2000000000000003e-42Initial program 85.0%
associate-/r*99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
div-inv99.5%
clear-num99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in t around 0 73.8%
associate-/r*82.3%
Simplified82.3%
if -8.2000000000000003e-42 < z < 1.4199999999999999e-128Initial program 90.8%
Taylor expanded in t around inf 80.1%
associate-/r*81.1%
Simplified81.1%
if 1.4199999999999999e-128 < z < 9e12Initial program 99.6%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
Simplified66.5%
if 9e12 < z Initial program 83.3%
associate-/r*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
distribute-neg-frac299.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 76.1%
associate-/r*84.8%
Simplified84.8%
Final simplification81.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 (<= z -1.75e+208)
(/ x (* z (- t)))
(if (or (<= z -6.8e+52) (not (<= z 2.15e+98)))
(/ 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 <= -1.75e+208) {
tmp = x / (z * -t);
} else if ((z <= -6.8e+52) || !(z <= 2.15e+98)) {
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 <= (-1.75d+208)) then
tmp = x / (z * -t)
else if ((z <= (-6.8d+52)) .or. (.not. (z <= 2.15d+98))) 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 <= -1.75e+208) {
tmp = x / (z * -t);
} else if ((z <= -6.8e+52) || !(z <= 2.15e+98)) {
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 <= -1.75e+208: tmp = x / (z * -t) elif (z <= -6.8e+52) or not (z <= 2.15e+98): 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 <= -1.75e+208) tmp = Float64(x / Float64(z * Float64(-t))); elseif ((z <= -6.8e+52) || !(z <= 2.15e+98)) tmp = Float64(x / Float64(y * Float64(-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.75e+208)
tmp = x / (z * -t);
elseif ((z <= -6.8e+52) || ~((z <= 2.15e+98)))
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[LessEqual[z, -1.75e+208], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.8e+52], N[Not[LessEqual[z, 2.15e+98]], $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 -1.75 \cdot 10^{+208}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+52} \lor \neg \left(z \leq 2.15 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.75000000000000008e208Initial program 78.1%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 78.1%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in z around 0 30.9%
associate-*r/30.9%
neg-mul-130.9%
*-commutative30.9%
Simplified30.9%
if -1.75000000000000008e208 < z < -6.8e52 or 2.1500000000000001e98 < z Initial program 83.7%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in t around 0 77.6%
Taylor expanded in z around 0 38.5%
associate-*r/38.5%
neg-mul-138.5%
*-commutative38.5%
Simplified38.5%
if -6.8e52 < z < 2.1500000000000001e98Initial program 91.9%
clear-num91.1%
inv-pow91.1%
associate-/l*94.5%
Applied egg-rr94.5%
unpow-194.5%
Simplified94.5%
Taylor expanded in z around 0 55.4%
associate-/r*57.7%
Simplified57.7%
Final simplification49.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 -1.35e+208)
(/ (/ x t) (- z))
(if (or (<= z -6.5e+52) (not (<= z 5.4e+96)))
(/ 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 <= -1.35e+208) {
tmp = (x / t) / -z;
} else if ((z <= -6.5e+52) || !(z <= 5.4e+96)) {
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 <= (-1.35d+208)) then
tmp = (x / t) / -z
else if ((z <= (-6.5d+52)) .or. (.not. (z <= 5.4d+96))) 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 <= -1.35e+208) {
tmp = (x / t) / -z;
} else if ((z <= -6.5e+52) || !(z <= 5.4e+96)) {
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 <= -1.35e+208: tmp = (x / t) / -z elif (z <= -6.5e+52) or not (z <= 5.4e+96): 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 <= -1.35e+208) tmp = Float64(Float64(x / t) / Float64(-z)); elseif ((z <= -6.5e+52) || !(z <= 5.4e+96)) tmp = Float64(x / Float64(y * Float64(-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.35e+208)
tmp = (x / t) / -z;
elseif ((z <= -6.5e+52) || ~((z <= 5.4e+96)))
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[LessEqual[z, -1.35e+208], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[Or[LessEqual[z, -6.5e+52], N[Not[LessEqual[z, 5.4e+96]], $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 -1.35 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{+52} \lor \neg \left(z \leq 5.4 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.35e208Initial program 78.1%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 78.1%
Taylor expanded in z around 0 30.9%
mul-1-neg30.9%
associate-/r*39.3%
distribute-neg-frac239.3%
Simplified39.3%
if -1.35e208 < z < -6.49999999999999996e52 or 5.40000000000000044e96 < z Initial program 83.7%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in t around 0 77.6%
Taylor expanded in z around 0 38.5%
associate-*r/38.5%
neg-mul-138.5%
*-commutative38.5%
Simplified38.5%
if -6.49999999999999996e52 < z < 5.40000000000000044e96Initial program 91.9%
clear-num91.1%
inv-pow91.1%
associate-/l*94.5%
Applied egg-rr94.5%
unpow-194.5%
Simplified94.5%
Taylor expanded in z around 0 55.4%
associate-/r*57.7%
Simplified57.7%
Final simplification50.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 -1.1e+161) (not (<= z 1e+144))) (/ (/ x z) (- z t)) (/ 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 <= -1.1e+161) || !(z <= 1e+144)) {
tmp = (x / z) / (z - t);
} 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 <= (-1.1d+161)) .or. (.not. (z <= 1d+144))) then
tmp = (x / z) / (z - t)
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 <= -1.1e+161) || !(z <= 1e+144)) {
tmp = (x / z) / (z - t);
} 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 <= -1.1e+161) or not (z <= 1e+144): tmp = (x / z) / (z - t) 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 <= -1.1e+161) || !(z <= 1e+144)) tmp = Float64(Float64(x / z) / Float64(z - t)); 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 <= -1.1e+161) || ~((z <= 1e+144)))
tmp = (x / z) / (z - t);
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, -1.1e+161], N[Not[LessEqual[z, 1e+144]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $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 -1.1 \cdot 10^{+161} \lor \neg \left(z \leq 10^{+144}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -1.1e161 or 1.00000000000000002e144 < z Initial program 75.6%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 74.7%
associate-/r*95.2%
Simplified95.2%
if -1.1e161 < z < 1.00000000000000002e144Initial program 92.8%
Final simplification93.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 (or (<= z -3.2e-39) (not (<= z 1.68e+22))) (/ 1.0 (* z (/ z x))) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e-39) || !(z <= 1.68e+22)) {
tmp = 1.0 / (z * (z / x));
} 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 <= (-3.2d-39)) .or. (.not. (z <= 1.68d+22))) then
tmp = 1.0d0 / (z * (z / x))
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 <= -3.2e-39) || !(z <= 1.68e+22)) {
tmp = 1.0 / (z * (z / x));
} 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 <= -3.2e-39) or not (z <= 1.68e+22): tmp = 1.0 / (z * (z / x)) 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 <= -3.2e-39) || !(z <= 1.68e+22)) tmp = Float64(1.0 / Float64(z * Float64(z / x))); 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 <= -3.2e-39) || ~((z <= 1.68e+22)))
tmp = 1.0 / (z * (z / x));
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, -3.2e-39], N[Not[LessEqual[z, 1.68e+22]], $MachinePrecision]], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $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 -3.2 \cdot 10^{-39} \lor \neg \left(z \leq 1.68 \cdot 10^{+22}\right):\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.1999999999999998e-39 or 1.68e22 < z Initial program 84.1%
associate-/r*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
distribute-neg-frac299.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
clear-num99.5%
inv-pow99.5%
div-inv99.4%
clear-num99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in t around 0 76.1%
associate-*r/84.1%
Simplified84.1%
Taylor expanded in z around inf 73.9%
if -3.1999999999999998e-39 < z < 1.68e22Initial program 92.7%
clear-num91.7%
inv-pow91.7%
associate-/l*93.1%
Applied egg-rr93.1%
unpow-193.1%
Simplified93.1%
Taylor expanded in z around 0 66.4%
associate-/r*66.4%
Simplified66.4%
Final simplification70.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 (or (<= z -2.1e-7) (not (<= z 1.95e+16))) (/ 1.0 (* z (/ z x))) (/ 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 <= -2.1e-7) || !(z <= 1.95e+16)) {
tmp = 1.0 / (z * (z / x));
} 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 <= (-2.1d-7)) .or. (.not. (z <= 1.95d+16))) then
tmp = 1.0d0 / (z * (z / x))
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 <= -2.1e-7) || !(z <= 1.95e+16)) {
tmp = 1.0 / (z * (z / x));
} 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 <= -2.1e-7) or not (z <= 1.95e+16): tmp = 1.0 / (z * (z / x)) 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 <= -2.1e-7) || !(z <= 1.95e+16)) tmp = Float64(1.0 / Float64(z * Float64(z / x))); 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 <= -2.1e-7) || ~((z <= 1.95e+16)))
tmp = 1.0 / (z * (z / x));
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, -2.1e-7], N[Not[LessEqual[z, 1.95e+16]], $MachinePrecision]], N[(1.0 / N[(z * N[(z / x), $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}\;z \leq -2.1 \cdot 10^{-7} \lor \neg \left(z \leq 1.95 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -2.1e-7 or 1.95e16 < z Initial program 83.8%
associate-/r*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
distribute-neg-frac299.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
clear-num99.5%
inv-pow99.5%
div-inv99.4%
clear-num99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in t around 0 76.3%
associate-*r/84.5%
Simplified84.5%
Taylor expanded in z around inf 75.1%
if -2.1e-7 < z < 1.95e16Initial program 92.9%
Taylor expanded in t around inf 76.7%
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 (if (<= y -4.4e-46) (/ x (* y (- t z))) (if (<= y 1.1e-195) (/ x (* z (- z t))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e-46) {
tmp = x / (y * (t - z));
} else if (y <= 1.1e-195) {
tmp = x / (z * (z - t));
} 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 (y <= (-4.4d-46)) then
tmp = x / (y * (t - z))
else if (y <= 1.1d-195) then
tmp = x / (z * (z - t))
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 (y <= -4.4e-46) {
tmp = x / (y * (t - z));
} else if (y <= 1.1e-195) {
tmp = x / (z * (z - t));
} 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 y <= -4.4e-46: tmp = x / (y * (t - z)) elif y <= 1.1e-195: tmp = x / (z * (z - t)) 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 (y <= -4.4e-46) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.1e-195) tmp = Float64(x / Float64(z * Float64(z - t))); 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 (y <= -4.4e-46)
tmp = x / (y * (t - z));
elseif (y <= 1.1e-195)
tmp = x / (z * (z - t));
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[y, -4.4e-46], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-195], N[(x / N[(z * N[(z - t), $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}\;y \leq -4.4 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-195}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.4000000000000002e-46Initial program 87.7%
Taylor expanded in y around inf 81.0%
*-commutative81.0%
Simplified81.0%
if -4.4000000000000002e-46 < y < 1.10000000000000003e-195Initial program 92.8%
associate-/r*97.4%
sub-neg97.4%
+-commutative97.4%
neg-sub097.4%
associate-+l-97.4%
neg-sub097.4%
distribute-neg-frac297.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
sub-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
+-commutative97.4%
sub-neg97.4%
Simplified97.4%
Taylor expanded in y around 0 76.6%
if 1.10000000000000003e-195 < y Initial program 84.8%
Taylor expanded in t around inf 52.6%
Final simplification68.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 (<= y -1.04e-45) (/ x (* y (- t z))) (if (<= y 1.7e-194) (/ x (* z (- z t))) (/ (/ 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 <= -1.04e-45) {
tmp = x / (y * (t - z));
} else if (y <= 1.7e-194) {
tmp = x / (z * (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) :: tmp
if (y <= (-1.04d-45)) then
tmp = x / (y * (t - z))
else if (y <= 1.7d-194) then
tmp = x / (z * (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 tmp;
if (y <= -1.04e-45) {
tmp = x / (y * (t - z));
} else if (y <= 1.7e-194) {
tmp = x / (z * (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): tmp = 0 if y <= -1.04e-45: tmp = x / (y * (t - z)) elif y <= 1.7e-194: tmp = x / (z * (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) tmp = 0.0 if (y <= -1.04e-45) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.7e-194) tmp = Float64(x / Float64(z * Float64(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)
tmp = 0.0;
if (y <= -1.04e-45)
tmp = x / (y * (t - z));
elseif (y <= 1.7e-194)
tmp = x / (z * (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_] := If[LessEqual[y, -1.04e-45], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-194], N[(x / N[(z * N[(z - t), $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 -1.04 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-194}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.0400000000000001e-45Initial program 87.7%
Taylor expanded in y around inf 81.0%
*-commutative81.0%
Simplified81.0%
if -1.0400000000000001e-45 < y < 1.70000000000000005e-194Initial program 92.8%
associate-/r*97.4%
sub-neg97.4%
+-commutative97.4%
neg-sub097.4%
associate-+l-97.4%
neg-sub097.4%
distribute-neg-frac297.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
sub-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
+-commutative97.4%
sub-neg97.4%
Simplified97.4%
Taylor expanded in y around 0 76.6%
if 1.70000000000000005e-194 < y Initial program 84.8%
Taylor expanded in t around inf 52.6%
associate-/r*58.1%
Simplified58.1%
Final simplification70.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 -4.8e-73) (/ (/ x y) t) (if (<= y 1.15e-62) (/ 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 (y <= -4.8e-73) {
tmp = (x / y) / t;
} else if (y <= 1.15e-62) {
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 (y <= (-4.8d-73)) then
tmp = (x / y) / t
else if (y <= 1.15d-62) 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 (y <= -4.8e-73) {
tmp = (x / y) / t;
} else if (y <= 1.15e-62) {
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 y <= -4.8e-73: tmp = (x / y) / t elif y <= 1.15e-62: 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 (y <= -4.8e-73) tmp = Float64(Float64(x / y) / t); elseif (y <= 1.15e-62) tmp = Float64(x / Float64(z * Float64(-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 <= -4.8e-73)
tmp = (x / y) / t;
elseif (y <= 1.15e-62)
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[y, -4.8e-73], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 1.15e-62], 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}\;y \leq -4.8 \cdot 10^{-73}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -4.80000000000000011e-73Initial program 89.2%
associate-/r*97.4%
sub-neg97.4%
+-commutative97.4%
neg-sub097.4%
associate-+l-97.4%
neg-sub097.4%
distribute-neg-frac297.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
sub-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
+-commutative97.4%
sub-neg97.4%
Simplified97.4%
clear-num96.9%
inv-pow96.9%
div-inv96.9%
clear-num96.8%
Applied egg-rr96.8%
unpow-196.8%
Simplified96.8%
clear-num96.9%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in z around 0 56.8%
*-rgt-identity56.8%
*-commutative56.8%
times-frac61.3%
associate-*r/61.3%
*-rgt-identity61.3%
Simplified61.3%
if -4.80000000000000011e-73 < y < 1.15e-62Initial program 90.6%
associate-/r*95.4%
sub-neg95.4%
+-commutative95.4%
neg-sub095.4%
associate-+l-95.4%
neg-sub095.4%
distribute-neg-frac295.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
sub-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
+-commutative95.4%
sub-neg95.4%
Simplified95.4%
Taylor expanded in y around 0 72.6%
associate-/r*79.1%
Simplified79.1%
Taylor expanded in z around 0 38.5%
associate-*r/38.5%
neg-mul-138.5%
*-commutative38.5%
Simplified38.5%
if 1.15e-62 < y Initial program 84.6%
clear-num84.6%
inv-pow84.6%
associate-/l*96.2%
Applied egg-rr96.2%
unpow-196.2%
Simplified96.2%
Taylor expanded in z around 0 47.6%
associate-/r*52.4%
Simplified52.4%
Final simplification50.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 (or (<= z -1.12e+89) (not (<= z 14500000000000.0))) (/ 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 <= -1.12e+89) || !(z <= 14500000000000.0)) {
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 <= (-1.12d+89)) .or. (.not. (z <= 14500000000000.0d0))) 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 <= -1.12e+89) || !(z <= 14500000000000.0)) {
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 <= -1.12e+89) or not (z <= 14500000000000.0): 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 <= -1.12e+89) || !(z <= 14500000000000.0)) 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 <= -1.12e+89) || ~((z <= 14500000000000.0)))
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, -1.12e+89], N[Not[LessEqual[z, 14500000000000.0]], $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 -1.12 \cdot 10^{+89} \lor \neg \left(z \leq 14500000000000\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.11999999999999995e89 or 1.45e13 < z Initial program 82.8%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 78.6%
Taylor expanded in z around 0 32.4%
mul-1-neg32.4%
associate-/r*34.0%
distribute-neg-frac234.0%
Simplified34.0%
associate-/l/32.4%
add032.4%
add-sqr-sqrt12.5%
sqrt-unprod52.3%
sqr-neg52.3%
sqrt-unprod17.9%
add-sqr-sqrt30.4%
Applied egg-rr30.4%
*-commutative30.4%
add030.4%
Simplified30.4%
if -1.11999999999999995e89 < z < 1.45e13Initial program 92.1%
Taylor expanded in z around 0 58.2%
Final simplification46.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 -3.8e+87) (not (<= z 2.6e+79))) (/ 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 ((z <= -3.8e+87) || !(z <= 2.6e+79)) {
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 ((z <= (-3.8d+87)) .or. (.not. (z <= 2.6d+79))) 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 ((z <= -3.8e+87) || !(z <= 2.6e+79)) {
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 (z <= -3.8e+87) or not (z <= 2.6e+79): 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 ((z <= -3.8e+87) || !(z <= 2.6e+79)) tmp = 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 ((z <= -3.8e+87) || ~((z <= 2.6e+79)))
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[Or[LessEqual[z, -3.8e+87], N[Not[LessEqual[z, 2.6e+79]], $MachinePrecision]], 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}\;z \leq -3.8 \cdot 10^{+87} \lor \neg \left(z \leq 2.6 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.80000000000000011e87 or 2.60000000000000015e79 < z Initial program 82.5%
associate-/r*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
distribute-neg-frac299.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 80.9%
Taylor expanded in z around 0 33.0%
mul-1-neg33.0%
associate-/r*35.8%
distribute-neg-frac235.8%
Simplified35.8%
associate-/l/33.0%
add033.0%
add-sqr-sqrt14.0%
sqrt-unprod56.4%
sqr-neg56.4%
sqrt-unprod17.8%
add-sqr-sqrt31.8%
Applied egg-rr31.8%
*-commutative31.8%
add031.8%
Simplified31.8%
if -3.80000000000000011e87 < z < 2.60000000000000015e79Initial program 91.6%
clear-num90.8%
inv-pow90.8%
associate-/l*94.7%
Applied egg-rr94.7%
unpow-194.7%
Simplified94.7%
Taylor expanded in z around 0 55.3%
associate-/r*58.1%
Simplified58.1%
Final simplification48.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- z y)) (- z t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (z - y)) / (z - 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 / (z - y)) / (z - t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (z - y)) / (z - t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (z - y)) / (z - t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(z - y)) / Float64(z - t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (z - y)) / (z - t);
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[(z - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{z - y}}{z - t}
\end{array}
Initial program 88.1%
associate-/r*97.0%
sub-neg97.0%
+-commutative97.0%
neg-sub097.0%
associate-+l-97.0%
neg-sub097.0%
distribute-neg-frac297.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
sub-neg97.0%
distribute-neg-in97.0%
remove-double-neg97.0%
+-commutative97.0%
sub-neg97.0%
Simplified97.0%
Final simplification97.0%
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 88.1%
Taylor expanded in z around 0 42.0%
Final simplification42.0%
(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 2024046
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(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))))