
(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 15 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 (/ (/ 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 89.2%
associate-/l/95.5%
Simplified95.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 -2.55e-23)
(/ (/ x z) (- z y))
(if (<= z -2e-223)
(/ x (* t (- y z)))
(if (<= z 0.01) (* x (/ (/ 1.0 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 <= -2.55e-23) {
tmp = (x / z) / (z - y);
} else if (z <= -2e-223) {
tmp = x / (t * (y - z));
} else if (z <= 0.01) {
tmp = x * ((1.0 / 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 <= (-2.55d-23)) then
tmp = (x / z) / (z - y)
else if (z <= (-2d-223)) then
tmp = x / (t * (y - z))
else if (z <= 0.01d0) then
tmp = x * ((1.0d0 / 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 <= -2.55e-23) {
tmp = (x / z) / (z - y);
} else if (z <= -2e-223) {
tmp = x / (t * (y - z));
} else if (z <= 0.01) {
tmp = x * ((1.0 / 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 <= -2.55e-23: tmp = (x / z) / (z - y) elif z <= -2e-223: tmp = x / (t * (y - z)) elif z <= 0.01: tmp = x * ((1.0 / 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 <= -2.55e-23) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= -2e-223) tmp = Float64(x / Float64(t * Float64(y - z))); elseif (z <= 0.01) tmp = Float64(x * Float64(Float64(1.0 / 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 <= -2.55e-23)
tmp = (x / z) / (z - y);
elseif (z <= -2e-223)
tmp = x / (t * (y - z));
elseif (z <= 0.01)
tmp = x * ((1.0 / 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, -2.55e-23], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-223], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.01], N[(x * N[(N[(1.0 / y), $MachinePrecision] / 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 -2.55 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-223}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{elif}\;z \leq 0.01:\\
\;\;\;\;x \cdot \frac{\frac{1}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -2.55000000000000005e-23Initial program 77.2%
Taylor expanded in t around 0 69.4%
mul-1-neg69.4%
associate-/r*79.1%
distribute-neg-frac279.1%
neg-sub079.1%
sub-neg79.1%
+-commutative79.1%
associate--r+79.1%
neg-sub079.1%
remove-double-neg79.1%
Simplified79.1%
if -2.55000000000000005e-23 < z < -1.9999999999999999e-223Initial program 99.7%
Taylor expanded in t around inf 81.8%
if -1.9999999999999999e-223 < z < 0.0100000000000000002Initial program 95.0%
Taylor expanded in y around inf 83.6%
associate-/r*84.2%
Simplified84.2%
div-inv84.2%
associate-/l*83.2%
Applied egg-rr83.2%
if 0.0100000000000000002 < z Initial program 87.1%
Taylor expanded in y around 0 75.4%
mul-1-neg75.4%
associate-/r*83.9%
distribute-neg-frac283.9%
sub-neg83.9%
+-commutative83.9%
distribute-neg-in83.9%
remove-double-neg83.9%
unsub-neg83.9%
Simplified83.9%
Final simplification82.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 -1.7e-23)
(/ (/ x z) (- z y))
(if (<= z -4.6e-224)
(/ x (* t (- y z)))
(if (<= z 0.00058) (/ (/ 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 <= -1.7e-23) {
tmp = (x / z) / (z - y);
} else if (z <= -4.6e-224) {
tmp = x / (t * (y - z));
} else if (z <= 0.00058) {
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 <= (-1.7d-23)) then
tmp = (x / z) / (z - y)
else if (z <= (-4.6d-224)) then
tmp = x / (t * (y - z))
else if (z <= 0.00058d0) 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 <= -1.7e-23) {
tmp = (x / z) / (z - y);
} else if (z <= -4.6e-224) {
tmp = x / (t * (y - z));
} else if (z <= 0.00058) {
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 <= -1.7e-23: tmp = (x / z) / (z - y) elif z <= -4.6e-224: tmp = x / (t * (y - z)) elif z <= 0.00058: 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 <= -1.7e-23) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= -4.6e-224) tmp = Float64(x / Float64(t * Float64(y - z))); elseif (z <= 0.00058) tmp = Float64(Float64(x / 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 <= -1.7e-23)
tmp = (x / z) / (z - y);
elseif (z <= -4.6e-224)
tmp = x / (t * (y - z));
elseif (z <= 0.00058)
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, -1.7e-23], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-224], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00058], N[(N[(x / y), $MachinePrecision] / N[(t - z), $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 -1.7 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-224}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{elif}\;z \leq 0.00058:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -1.7e-23Initial program 77.2%
Taylor expanded in t around 0 69.4%
mul-1-neg69.4%
associate-/r*79.1%
distribute-neg-frac279.1%
neg-sub079.1%
sub-neg79.1%
+-commutative79.1%
associate--r+79.1%
neg-sub079.1%
remove-double-neg79.1%
Simplified79.1%
if -1.7e-23 < z < -4.59999999999999975e-224Initial program 99.7%
Taylor expanded in t around inf 81.8%
if -4.59999999999999975e-224 < z < 5.8e-4Initial program 95.0%
Taylor expanded in y around inf 83.6%
associate-/r*84.2%
Simplified84.2%
if 5.8e-4 < z Initial program 87.1%
Taylor expanded in y around 0 75.4%
mul-1-neg75.4%
associate-/r*83.9%
distribute-neg-frac283.9%
sub-neg83.9%
+-commutative83.9%
distribute-neg-in83.9%
remove-double-neg83.9%
unsub-neg83.9%
Simplified83.9%
Final simplification82.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 -2.7e+27) (not (<= z 4.2e+84))) (/ (/ x z) (- z y)) (/ x (* (- t z) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.7e+27) || !(z <= 4.2e+84)) {
tmp = (x / z) / (z - y);
} else {
tmp = x / ((t - z) * (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 <= (-2.7d+27)) .or. (.not. (z <= 4.2d+84))) then
tmp = (x / z) / (z - y)
else
tmp = x / ((t - z) * (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 <= -2.7e+27) || !(z <= 4.2e+84)) {
tmp = (x / z) / (z - y);
} else {
tmp = x / ((t - z) * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.7e+27) or not (z <= 4.2e+84): tmp = (x / z) / (z - y) else: tmp = x / ((t - z) * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.7e+27) || !(z <= 4.2e+84)) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(x / Float64(Float64(t - z) * 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 <= -2.7e+27) || ~((z <= 4.2e+84)))
tmp = (x / z) / (z - y);
else
tmp = x / ((t - z) * (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, -2.7e+27], N[Not[LessEqual[z, 4.2e+84]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+27} \lor \neg \left(z \leq 4.2 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -2.6999999999999997e27 or 4.20000000000000037e84 < z Initial program 80.3%
Taylor expanded in t around 0 78.1%
mul-1-neg78.1%
associate-/r*88.2%
distribute-neg-frac288.2%
neg-sub088.2%
sub-neg88.2%
+-commutative88.2%
associate--r+88.2%
neg-sub088.2%
remove-double-neg88.2%
Simplified88.2%
if -2.6999999999999997e27 < z < 4.20000000000000037e84Initial program 95.1%
Final simplification92.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 -2e+58) (not (<= z 1.9e-5))) (/ (/ x z) (- z t)) (/ (/ x y) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e+58) || !(z <= 1.9e-5)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / y) / (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 <= (-2d+58)) .or. (.not. (z <= 1.9d-5))) then
tmp = (x / z) / (z - t)
else
tmp = (x / y) / (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 <= -2e+58) || !(z <= 1.9e-5)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / y) / (t - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -2e+58) or not (z <= 1.9e-5): tmp = (x / z) / (z - t) else: tmp = (x / y) / (t - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2e+58) || !(z <= 1.9e-5)) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / y) / 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 <= -2e+58) || ~((z <= 1.9e-5)))
tmp = (x / z) / (z - t);
else
tmp = (x / y) / (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, -2e+58], N[Not[LessEqual[z, 1.9e-5]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+58} \lor \neg \left(z \leq 1.9 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\end{array}
\end{array}
if z < -1.99999999999999989e58 or 1.9000000000000001e-5 < z Initial program 82.7%
Taylor expanded in y around 0 75.7%
mul-1-neg75.7%
associate-/r*89.6%
distribute-neg-frac289.6%
sub-neg89.6%
+-commutative89.6%
distribute-neg-in89.6%
remove-double-neg89.6%
unsub-neg89.6%
Simplified89.6%
if -1.99999999999999989e58 < z < 1.9000000000000001e-5Initial program 94.5%
Taylor expanded in y around inf 79.8%
associate-/r*80.5%
Simplified80.5%
Final simplification84.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2.95e+59) (not (<= z 7.5e+112))) (/ (/ x z) z) (/ (/ x y) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.95e+59) || !(z <= 7.5e+112)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / (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 <= (-2.95d+59)) .or. (.not. (z <= 7.5d+112))) then
tmp = (x / z) / z
else
tmp = (x / y) / (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 <= -2.95e+59) || !(z <= 7.5e+112)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / (t - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.95e+59) or not (z <= 7.5e+112): tmp = (x / z) / z else: tmp = (x / y) / (t - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.95e+59) || !(z <= 7.5e+112)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / y) / 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 <= -2.95e+59) || ~((z <= 7.5e+112)))
tmp = (x / z) / z;
else
tmp = (x / y) / (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, -2.95e+59], N[Not[LessEqual[z, 7.5e+112]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.95 \cdot 10^{+59} \lor \neg \left(z \leq 7.5 \cdot 10^{+112}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\end{array}
\end{array}
if z < -2.95000000000000019e59 or 7.5e112 < z Initial program 83.2%
Taylor expanded in t around 0 83.0%
mul-1-neg83.0%
associate-/r*92.3%
distribute-neg-frac292.3%
neg-sub092.3%
sub-neg92.3%
+-commutative92.3%
associate--r+92.3%
neg-sub092.3%
remove-double-neg92.3%
Simplified92.3%
Taylor expanded in z around inf 89.0%
if -2.95000000000000019e59 < z < 7.5e112Initial program 92.5%
Taylor expanded in y around inf 74.1%
associate-/r*75.9%
Simplified75.9%
Final simplification80.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 -2.6e+59) (not (<= z 9.5e+77))) (/ (/ x z) 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 <= -2.6e+59) || !(z <= 9.5e+77)) {
tmp = (x / z) / 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 <= (-2.6d+59)) .or. (.not. (z <= 9.5d+77))) then
tmp = (x / z) / 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 <= -2.6e+59) || !(z <= 9.5e+77)) {
tmp = (x / z) / 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 <= -2.6e+59) or not (z <= 9.5e+77): tmp = (x / z) / 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 <= -2.6e+59) || !(z <= 9.5e+77)) tmp = Float64(Float64(x / z) / 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 <= -2.6e+59) || ~((z <= 9.5e+77)))
tmp = (x / z) / 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, -2.6e+59], N[Not[LessEqual[z, 9.5e+77]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $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 -2.6 \cdot 10^{+59} \lor \neg \left(z \leq 9.5 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if z < -2.59999999999999999e59 or 9.4999999999999998e77 < z Initial program 82.3%
Taylor expanded in t around 0 81.1%
mul-1-neg81.1%
associate-/r*90.8%
distribute-neg-frac290.8%
neg-sub090.8%
sub-neg90.8%
+-commutative90.8%
associate--r+90.8%
neg-sub090.8%
remove-double-neg90.8%
Simplified90.8%
Taylor expanded in z around inf 85.7%
if -2.59999999999999999e59 < z < 9.4999999999999998e77Initial program 93.4%
associate-/l/92.8%
Simplified92.8%
Taylor expanded in t around inf 78.7%
Final simplification81.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 -4.9e+58) (not (<= z 3.4e+73))) (/ (/ x z) 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 <= -4.9e+58) || !(z <= 3.4e+73)) {
tmp = (x / z) / 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 <= (-4.9d+58)) .or. (.not. (z <= 3.4d+73))) then
tmp = (x / z) / 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 <= -4.9e+58) || !(z <= 3.4e+73)) {
tmp = (x / z) / 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 <= -4.9e+58) or not (z <= 3.4e+73): tmp = (x / z) / 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 <= -4.9e+58) || !(z <= 3.4e+73)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(x / Float64(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 <= -4.9e+58) || ~((z <= 3.4e+73)))
tmp = (x / z) / 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, -4.9e+58], N[Not[LessEqual[z, 3.4e+73]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+58} \lor \neg \left(z \leq 3.4 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -4.90000000000000018e58 or 3.4000000000000002e73 < z Initial program 81.7%
Taylor expanded in t around 0 80.5%
mul-1-neg80.5%
associate-/r*90.0%
distribute-neg-frac290.0%
neg-sub090.0%
sub-neg90.0%
+-commutative90.0%
associate--r+90.0%
neg-sub090.0%
remove-double-neg90.0%
Simplified90.0%
Taylor expanded in z around inf 85.0%
if -4.90000000000000018e58 < z < 3.4000000000000002e73Initial program 93.9%
Taylor expanded in t around inf 79.5%
Final simplification81.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 (or (<= z -4.7e+58) (not (<= z 3.6e+77))) (/ (/ x z) z) (/ (/ x y) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.7e+58) || !(z <= 3.6e+77)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / t;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-4.7d+58)) .or. (.not. (z <= 3.6d+77))) then
tmp = (x / z) / z
else
tmp = (x / y) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.7e+58) || !(z <= 3.6e+77)) {
tmp = (x / z) / z;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.7e+58) or not (z <= 3.6e+77): tmp = (x / z) / z else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.7e+58) || !(z <= 3.6e+77)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / 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 <= -4.7e+58) || ~((z <= 3.6e+77)))
tmp = (x / z) / z;
else
tmp = (x / y) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.7e+58], N[Not[LessEqual[z, 3.6e+77]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+58} \lor \neg \left(z \leq 3.6 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -4.69999999999999972e58 or 3.5999999999999998e77 < z Initial program 82.3%
Taylor expanded in t around 0 81.1%
mul-1-neg81.1%
associate-/r*90.8%
distribute-neg-frac290.8%
neg-sub090.8%
sub-neg90.8%
+-commutative90.8%
associate--r+90.8%
neg-sub090.8%
remove-double-neg90.8%
Simplified90.8%
Taylor expanded in z around inf 85.7%
if -4.69999999999999972e58 < z < 3.5999999999999998e77Initial program 93.4%
Taylor expanded in y around inf 75.6%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in t around inf 67.0%
Final simplification74.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.3e+108) (not (<= z 2.2e+81))) (/ x (* z y)) (/ (/ x y) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.3e+108) || !(z <= 2.2e+81)) {
tmp = x / (z * y);
} 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 <= (-3.3d+108)) .or. (.not. (z <= 2.2d+81))) then
tmp = x / (z * y)
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 <= -3.3e+108) || !(z <= 2.2e+81)) {
tmp = x / (z * y);
} 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 <= -3.3e+108) or not (z <= 2.2e+81): tmp = x / (z * y) 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 <= -3.3e+108) || !(z <= 2.2e+81)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(Float64(x / 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 <= -3.3e+108) || ~((z <= 2.2e+81)))
tmp = x / (z * y);
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, -3.3e+108], N[Not[LessEqual[z, 2.2e+81]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+108} \lor \neg \left(z \leq 2.2 \cdot 10^{+81}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if z < -3.30000000000000019e108 or 2.19999999999999987e81 < z Initial program 80.7%
Taylor expanded in t around 0 79.4%
mul-1-neg79.4%
associate-/r*90.0%
distribute-neg-frac290.0%
neg-sub090.0%
sub-neg90.0%
+-commutative90.0%
associate--r+90.0%
neg-sub090.0%
remove-double-neg90.0%
Simplified90.0%
Taylor expanded in z around 0 44.0%
neg-mul-144.0%
Simplified44.0%
add-sqr-sqrt29.6%
sqrt-unprod36.4%
sqr-neg36.4%
sqrt-unprod13.4%
add-sqr-sqrt41.8%
*-un-lft-identity41.8%
associate-/l/35.3%
Applied egg-rr35.3%
*-lft-identity35.3%
*-commutative35.3%
Simplified35.3%
if -3.30000000000000019e108 < z < 2.19999999999999987e81Initial program 93.7%
Taylor expanded in y around inf 74.5%
associate-/r*76.2%
Simplified76.2%
Taylor expanded in t around inf 66.2%
Final simplification55.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 -8.4e+107) (not (<= z 4e+79))) (/ x (* z y)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.4e+107) || !(z <= 4e+79)) {
tmp = x / (z * y);
} 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 <= (-8.4d+107)) .or. (.not. (z <= 4d+79))) then
tmp = x / (z * y)
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 <= -8.4e+107) || !(z <= 4e+79)) {
tmp = x / (z * y);
} 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 <= -8.4e+107) or not (z <= 4e+79): tmp = x / (z * y) 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 <= -8.4e+107) || !(z <= 4e+79)) tmp = Float64(x / Float64(z * y)); 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 <= -8.4e+107) || ~((z <= 4e+79)))
tmp = x / (z * y);
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, -8.4e+107], N[Not[LessEqual[z, 4e+79]], $MachinePrecision]], N[(x / N[(z * y), $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 -8.4 \cdot 10^{+107} \lor \neg \left(z \leq 4 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -8.3999999999999999e107 or 3.99999999999999987e79 < z Initial program 80.7%
Taylor expanded in t around 0 79.4%
mul-1-neg79.4%
associate-/r*90.0%
distribute-neg-frac290.0%
neg-sub090.0%
sub-neg90.0%
+-commutative90.0%
associate--r+90.0%
neg-sub090.0%
remove-double-neg90.0%
Simplified90.0%
Taylor expanded in z around 0 44.0%
neg-mul-144.0%
Simplified44.0%
add-sqr-sqrt29.6%
sqrt-unprod36.4%
sqr-neg36.4%
sqrt-unprod13.4%
add-sqr-sqrt41.8%
*-un-lft-identity41.8%
associate-/l/35.3%
Applied egg-rr35.3%
*-lft-identity35.3%
*-commutative35.3%
Simplified35.3%
if -8.3999999999999999e107 < z < 3.99999999999999987e79Initial program 93.7%
associate-/l/93.2%
Simplified93.2%
Taylor expanded in t around inf 77.5%
Taylor expanded in y around inf 66.3%
Final simplification55.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 -8e+107) (not (<= z 5.8e+73))) (/ x (* z y)) (/ x (* t y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8e+107) || !(z <= 5.8e+73)) {
tmp = x / (z * y);
} 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 <= (-8d+107)) .or. (.not. (z <= 5.8d+73))) then
tmp = x / (z * y)
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 <= -8e+107) || !(z <= 5.8e+73)) {
tmp = x / (z * y);
} 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 <= -8e+107) or not (z <= 5.8e+73): tmp = x / (z * y) 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 <= -8e+107) || !(z <= 5.8e+73)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(x / Float64(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 <= -8e+107) || ~((z <= 5.8e+73)))
tmp = x / (z * y);
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, -8e+107], N[Not[LessEqual[z, 5.8e+73]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+107} \lor \neg \left(z \leq 5.8 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -7.9999999999999998e107 or 5.8000000000000005e73 < z Initial program 80.1%
Taylor expanded in t around 0 78.8%
mul-1-neg78.8%
associate-/r*89.1%
distribute-neg-frac289.1%
neg-sub089.1%
sub-neg89.1%
+-commutative89.1%
associate--r+89.1%
neg-sub089.1%
remove-double-neg89.1%
Simplified89.1%
Taylor expanded in z around 0 43.1%
neg-mul-143.1%
Simplified43.1%
add-sqr-sqrt29.0%
sqrt-unprod35.7%
sqr-neg35.7%
sqrt-unprod13.2%
add-sqr-sqrt41.0%
*-un-lft-identity41.0%
associate-/l/34.7%
Applied egg-rr34.7%
*-lft-identity34.7%
*-commutative34.7%
Simplified34.7%
if -7.9999999999999998e107 < z < 5.8000000000000005e73Initial program 94.2%
Taylor expanded in z around 0 65.2%
Final simplification54.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 -5.4e+16) (not (<= z 4.4e+156))) (/ x (* t 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 <= -5.4e+16) || !(z <= 4.4e+156)) {
tmp = x / (t * 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 <= (-5.4d+16)) .or. (.not. (z <= 4.4d+156))) then
tmp = x / (t * 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 <= -5.4e+16) || !(z <= 4.4e+156)) {
tmp = x / (t * 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 <= -5.4e+16) or not (z <= 4.4e+156): tmp = x / (t * 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 <= -5.4e+16) || !(z <= 4.4e+156)) tmp = Float64(x / Float64(t * z)); else tmp = Float64(x / Float64(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 <= -5.4e+16) || ~((z <= 4.4e+156)))
tmp = x / (t * 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, -5.4e+16], N[Not[LessEqual[z, 4.4e+156]], $MachinePrecision]], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+16} \lor \neg \left(z \leq 4.4 \cdot 10^{+156}\right):\\
\;\;\;\;\frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -5.4e16 or 4.40000000000000008e156 < z Initial program 80.5%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 46.7%
Taylor expanded in y around 0 40.9%
associate-*r/40.9%
neg-mul-140.9%
*-commutative40.9%
Simplified40.9%
add-sqr-sqrt21.1%
sqrt-unprod43.7%
sqr-neg43.7%
sqrt-unprod18.7%
add-sqr-sqrt39.7%
*-un-lft-identity39.7%
*-commutative39.7%
Applied egg-rr39.7%
*-lft-identity39.7%
*-commutative39.7%
Simplified39.7%
if -5.4e16 < z < 4.40000000000000008e156Initial program 93.7%
Taylor expanded in z around 0 62.9%
Final simplification54.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 (<= z -1.5e+108) (/ x (* z y)) (if (<= z 4.1e+156) (/ (/ x y) t) (/ (/ x z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e+108) {
tmp = x / (z * y);
} else if (z <= 4.1e+156) {
tmp = (x / y) / t;
} else {
tmp = (x / 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.5d+108)) then
tmp = x / (z * y)
else if (z <= 4.1d+156) then
tmp = (x / y) / t
else
tmp = (x / 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.5e+108) {
tmp = x / (z * y);
} else if (z <= 4.1e+156) {
tmp = (x / y) / t;
} else {
tmp = (x / z) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -1.5e+108: tmp = x / (z * y) elif z <= 4.1e+156: tmp = (x / y) / t else: tmp = (x / 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.5e+108) tmp = Float64(x / Float64(z * y)); elseif (z <= 4.1e+156) tmp = Float64(Float64(x / y) / t); else tmp = Float64(Float64(x / 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.5e+108)
tmp = x / (z * y);
elseif (z <= 4.1e+156)
tmp = (x / y) / t;
else
tmp = (x / 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.5e+108], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+156], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+108}:\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+156}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{t}\\
\end{array}
\end{array}
if z < -1.49999999999999992e108Initial program 72.7%
Taylor expanded in t around 0 72.6%
mul-1-neg72.6%
associate-/r*84.9%
distribute-neg-frac284.9%
neg-sub084.9%
sub-neg84.9%
+-commutative84.9%
associate--r+84.9%
neg-sub084.9%
remove-double-neg84.9%
Simplified84.9%
Taylor expanded in z around 0 38.7%
neg-mul-138.7%
Simplified38.7%
add-sqr-sqrt25.5%
sqrt-unprod33.6%
sqr-neg33.6%
sqrt-unprod13.1%
add-sqr-sqrt36.5%
*-un-lft-identity36.5%
associate-/l/35.3%
Applied egg-rr35.3%
*-lft-identity35.3%
*-commutative35.3%
Simplified35.3%
if -1.49999999999999992e108 < z < 4.1000000000000002e156Initial program 92.6%
Taylor expanded in y around inf 71.8%
associate-/r*73.4%
Simplified73.4%
Taylor expanded in t around inf 62.6%
if 4.1000000000000002e156 < z Initial program 91.3%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around inf 40.6%
Taylor expanded in y around 0 44.1%
associate-*r/44.1%
neg-mul-144.1%
*-commutative44.1%
Simplified44.1%
add-sqr-sqrt20.4%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod23.7%
add-sqr-sqrt44.1%
*-un-lft-identity44.1%
*-commutative44.1%
times-frac61.1%
Applied egg-rr61.1%
associate-*l/61.1%
*-lft-identity61.1%
Simplified61.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 (* t y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (t * y);
}
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 * y)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (t * y)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(t * y)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (t * y);
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[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 89.2%
Taylor expanded in z around 0 48.1%
(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 2024141
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
(/ x (* (- y z) (- t z))))