
(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 16 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 (- y z)) (- t z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (y - z)) / (t - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (t - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 89.5%
associate-/r*98.1%
div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in x around 0 89.5%
associate-/l/98.1%
Simplified98.1%
Final simplification98.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -1.4e-15)
(/ (/ x y) (- t z))
(if (or (<= y -2.6e-47) (and (not (<= y -3.8e-91)) (<= y 6.5e-230)))
(/ (- x) (* z (- t z)))
(/ (/ x (- y z)) t))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-15) {
tmp = (x / y) / (t - z);
} else if ((y <= -2.6e-47) || (!(y <= -3.8e-91) && (y <= 6.5e-230))) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.4d-15)) then
tmp = (x / y) / (t - z)
else if ((y <= (-2.6d-47)) .or. (.not. (y <= (-3.8d-91))) .and. (y <= 6.5d-230)) then
tmp = -x / (z * (t - z))
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-15) {
tmp = (x / y) / (t - z);
} else if ((y <= -2.6e-47) || (!(y <= -3.8e-91) && (y <= 6.5e-230))) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.4e-15: tmp = (x / y) / (t - z) elif (y <= -2.6e-47) or (not (y <= -3.8e-91) and (y <= 6.5e-230)): tmp = -x / (z * (t - z)) else: tmp = (x / (y - z)) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-15) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif ((y <= -2.6e-47) || (!(y <= -3.8e-91) && (y <= 6.5e-230))) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / 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 <= -1.4e-15)
tmp = (x / y) / (t - z);
elseif ((y <= -2.6e-47) || (~((y <= -3.8e-91)) && (y <= 6.5e-230)))
tmp = -x / (z * (t - z));
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-15], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.6e-47], And[N[Not[LessEqual[y, -3.8e-91]], $MachinePrecision], LessEqual[y, 6.5e-230]]], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-47} \lor \neg \left(y \leq -3.8 \cdot 10^{-91}\right) \land y \leq 6.5 \cdot 10^{-230}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -1.40000000000000007e-15Initial program 85.5%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 85.5%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 83.0%
associate-/r*91.0%
Simplified91.0%
if -1.40000000000000007e-15 < y < -2.6e-47 or -3.79999999999999978e-91 < y < 6.5000000000000004e-230Initial program 93.4%
Taylor expanded in y around 0 82.3%
associate-*r/82.3%
neg-mul-182.3%
Simplified82.3%
if -2.6e-47 < y < -3.79999999999999978e-91 or 6.5000000000000004e-230 < y Initial program 89.6%
associate-/r*96.7%
div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in x around 0 89.6%
associate-/l/96.7%
Simplified96.7%
Taylor expanded in t around inf 56.6%
*-commutative56.6%
associate-/r*61.5%
Simplified61.5%
Final simplification75.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -2.65)
(/ (/ x y) (- t z))
(if (<= y -2.25e-57)
(/ (- x) (* z (- y z)))
(if (or (<= y -1.6e-92) (not (<= y 4.3e-230)))
(/ (/ x (- y z)) t)
(/ (- x) (* z (- t z)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.65) {
tmp = (x / y) / (t - z);
} else if (y <= -2.25e-57) {
tmp = -x / (z * (y - z));
} else if ((y <= -1.6e-92) || !(y <= 4.3e-230)) {
tmp = (x / (y - z)) / t;
} else {
tmp = -x / (z * (t - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.65d0)) then
tmp = (x / y) / (t - z)
else if (y <= (-2.25d-57)) then
tmp = -x / (z * (y - z))
else if ((y <= (-1.6d-92)) .or. (.not. (y <= 4.3d-230))) then
tmp = (x / (y - z)) / t
else
tmp = -x / (z * (t - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.65) {
tmp = (x / y) / (t - z);
} else if (y <= -2.25e-57) {
tmp = -x / (z * (y - z));
} else if ((y <= -1.6e-92) || !(y <= 4.3e-230)) {
tmp = (x / (y - z)) / t;
} else {
tmp = -x / (z * (t - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.65: tmp = (x / y) / (t - z) elif y <= -2.25e-57: tmp = -x / (z * (y - z)) elif (y <= -1.6e-92) or not (y <= 4.3e-230): tmp = (x / (y - z)) / t else: tmp = -x / (z * (t - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.65) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -2.25e-57) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); elseif ((y <= -1.6e-92) || !(y <= 4.3e-230)) tmp = Float64(Float64(x / Float64(y - z)) / t); else tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.65)
tmp = (x / y) / (t - z);
elseif (y <= -2.25e-57)
tmp = -x / (z * (y - z));
elseif ((y <= -1.6e-92) || ~((y <= 4.3e-230)))
tmp = (x / (y - z)) / t;
else
tmp = -x / (z * (t - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.65], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.25e-57], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.6e-92], N[Not[LessEqual[y, 4.3e-230]], $MachinePrecision]], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{-57}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-92} \lor \neg \left(y \leq 4.3 \cdot 10^{-230}\right):\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if y < -2.64999999999999991Initial program 84.7%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 84.7%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 83.4%
associate-/r*91.9%
Simplified91.9%
if -2.64999999999999991 < y < -2.24999999999999986e-57Initial program 99.7%
associate-/r*99.8%
div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 75.8%
*-commutative75.8%
frac-times75.6%
neg-mul-175.6%
Applied egg-rr75.6%
if -2.24999999999999986e-57 < y < -1.5999999999999998e-92 or 4.3000000000000001e-230 < y Initial program 89.5%
associate-/r*96.6%
div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in x around 0 89.5%
associate-/l/96.6%
Simplified96.6%
Taylor expanded in t around inf 57.1%
*-commutative57.1%
associate-/r*62.0%
Simplified62.0%
if -1.5999999999999998e-92 < y < 4.3000000000000001e-230Initial program 92.3%
Taylor expanded in y around 0 85.3%
associate-*r/85.3%
neg-mul-185.3%
Simplified85.3%
Final simplification76.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 (<= y -6.0)
(/ (/ x y) (- t z))
(if (<= y -5.8e-60)
(/ (- x) (* z (- y z)))
(if (<= y -5e-91)
(/ (/ x (- y z)) t)
(if (<= y 1.4e-55) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.0) {
tmp = (x / y) / (t - z);
} else if (y <= -5.8e-60) {
tmp = -x / (z * (y - z));
} else if (y <= -5e-91) {
tmp = (x / (y - z)) / t;
} else if (y <= 1.4e-55) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-6.0d0)) then
tmp = (x / y) / (t - z)
else if (y <= (-5.8d-60)) then
tmp = -x / (z * (y - z))
else if (y <= (-5d-91)) then
tmp = (x / (y - z)) / t
else if (y <= 1.4d-55) then
tmp = (-x / z) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.0) {
tmp = (x / y) / (t - z);
} else if (y <= -5.8e-60) {
tmp = -x / (z * (y - z));
} else if (y <= -5e-91) {
tmp = (x / (y - z)) / t;
} else if (y <= 1.4e-55) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -6.0: tmp = (x / y) / (t - z) elif y <= -5.8e-60: tmp = -x / (z * (y - z)) elif y <= -5e-91: tmp = (x / (y - z)) / t elif y <= 1.4e-55: tmp = (-x / z) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -6.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -5.8e-60) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); elseif (y <= -5e-91) tmp = Float64(Float64(x / Float64(y - z)) / t); elseif (y <= 1.4e-55) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -6.0)
tmp = (x / y) / (t - z);
elseif (y <= -5.8e-60)
tmp = -x / (z * (y - z));
elseif (y <= -5e-91)
tmp = (x / (y - z)) / t;
elseif (y <= 1.4e-55)
tmp = (-x / z) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -6.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-60], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e-91], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 1.4e-55], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -6Initial program 84.7%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 84.7%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in y around inf 83.4%
associate-/r*91.9%
Simplified91.9%
if -6 < y < -5.7999999999999999e-60Initial program 99.7%
associate-/r*99.8%
div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 75.8%
*-commutative75.8%
frac-times75.6%
neg-mul-175.6%
Applied egg-rr75.6%
if -5.7999999999999999e-60 < y < -4.99999999999999997e-91Initial program 53.3%
associate-/r*100.0%
div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 53.3%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around inf 53.3%
*-commutative53.3%
associate-/r*86.1%
Simplified86.1%
if -4.99999999999999997e-91 < y < 1.39999999999999992e-55Initial program 89.9%
associate-/r*96.8%
div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in x around 0 89.9%
associate-/l/96.8%
Simplified96.8%
Taylor expanded in y around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
Simplified84.0%
if 1.39999999999999992e-55 < y Initial program 92.2%
associate-/r*97.6%
div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in t around inf 55.1%
associate-/r*56.3%
Simplified56.3%
Final simplification77.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 -1.85e+103) (not (<= z 5.8e+77))) (* (/ (- x) z) (/ -1.0 z)) (/ (/ x (- y z)) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.85e+103) || !(z <= 5.8e+77)) {
tmp = (-x / z) * (-1.0 / z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.85d+103)) .or. (.not. (z <= 5.8d+77))) then
tmp = (-x / z) * ((-1.0d0) / z)
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.85e+103) || !(z <= 5.8e+77)) {
tmp = (-x / z) * (-1.0 / z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.85e+103) or not (z <= 5.8e+77): tmp = (-x / z) * (-1.0 / z) else: tmp = (x / (y - z)) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.85e+103) || !(z <= 5.8e+77)) tmp = Float64(Float64(Float64(-x) / z) * Float64(-1.0 / z)); else tmp = Float64(Float64(x / 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.85e+103) || ~((z <= 5.8e+77)))
tmp = (-x / z) * (-1.0 / z);
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.85e+103], N[Not[LessEqual[z, 5.8e+77]], $MachinePrecision]], N[(N[((-x) / z), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+103} \lor \neg \left(z \leq 5.8 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{-x}{z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if z < -1.85000000000000016e103 or 5.8000000000000003e77 < z Initial program 83.1%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 92.4%
Taylor expanded in y around 0 89.8%
associate-*r/96.1%
neg-mul-196.1%
Simplified89.8%
if -1.85000000000000016e103 < z < 5.8000000000000003e77Initial program 92.1%
associate-/r*97.3%
div-inv97.3%
Applied egg-rr97.3%
Taylor expanded in x around 0 92.1%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around inf 63.7%
*-commutative63.7%
associate-/r*69.3%
Simplified69.3%
Final simplification75.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3.7e-134) (/ (/ x y) (- t z)) (if (<= t 1.85e-92) (/ (/ (- x) (- y z)) z) (/ (/ x (- y z)) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e-134) {
tmp = (x / y) / (t - z);
} else if (t <= 1.85e-92) {
tmp = (-x / (y - z)) / z;
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.7d-134)) then
tmp = (x / y) / (t - z)
else if (t <= 1.85d-92) then
tmp = (-x / (y - z)) / z
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e-134) {
tmp = (x / y) / (t - z);
} else if (t <= 1.85e-92) {
tmp = (-x / (y - z)) / z;
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.7e-134: tmp = (x / y) / (t - z) elif t <= 1.85e-92: tmp = (-x / (y - z)) / z else: tmp = (x / (y - z)) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.7e-134) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.85e-92) tmp = Float64(Float64(Float64(-x) / Float64(y - z)) / z); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3.7e-134)
tmp = (x / y) / (t - z);
elseif (t <= 1.85e-92)
tmp = (-x / (y - z)) / z;
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3.7e-134], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-92], N[(N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-134}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-92}:\\
\;\;\;\;\frac{\frac{-x}{y - z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if t < -3.7e-134Initial program 92.6%
associate-/r*97.7%
div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 92.6%
associate-/l/97.7%
Simplified97.7%
Taylor expanded in y around inf 70.3%
associate-/r*71.1%
Simplified71.1%
if -3.7e-134 < t < 1.84999999999999988e-92Initial program 87.8%
associate-/r*98.0%
div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in x around 0 87.8%
associate-/l/98.0%
Simplified98.0%
Taylor expanded in t around 0 78.7%
mul-1-neg78.7%
distribute-frac-neg78.7%
associate-/l/87.9%
Simplified87.9%
if 1.84999999999999988e-92 < t Initial program 87.9%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in x around 0 87.9%
associate-/l/98.6%
Simplified98.6%
Taylor expanded in t around inf 77.8%
*-commutative77.8%
associate-/r*84.6%
Simplified84.6%
Final simplification81.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3.6e-80) (/ (/ x y) t) (if (<= t 5.8e-211) (/ (/ (- x) y) z) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.6e-80) {
tmp = (x / y) / t;
} else if (t <= 5.8e-211) {
tmp = (-x / y) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.6d-80)) then
tmp = (x / y) / t
else if (t <= 5.8d-211) then
tmp = (-x / y) / z
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.6e-80) {
tmp = (x / y) / t;
} else if (t <= 5.8e-211) {
tmp = (-x / y) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.6e-80: tmp = (x / y) / t elif t <= 5.8e-211: tmp = (-x / y) / z else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.6e-80) tmp = Float64(Float64(x / y) / t); elseif (t <= 5.8e-211) tmp = Float64(Float64(Float64(-x) / y) / z); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3.6e-80)
tmp = (x / y) / t;
elseif (t <= 5.8e-211)
tmp = (-x / y) / z;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3.6e-80], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 5.8e-211], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-80}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-211}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.6e-80Initial program 92.1%
associate-/r*97.5%
div-inv97.5%
Applied egg-rr97.5%
Taylor expanded in x around 0 92.1%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in z around 0 61.9%
*-commutative61.9%
associate-/r*65.0%
Simplified65.0%
if -3.6e-80 < t < 5.80000000000000029e-211Initial program 88.4%
associate-/r*98.8%
div-inv98.7%
Applied egg-rr98.7%
Taylor expanded in x around 0 88.4%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in y around inf 56.8%
associate-/r*59.6%
Simplified59.6%
Taylor expanded in t around 0 49.9%
mul-1-neg49.9%
associate-/r*51.4%
Simplified51.4%
if 5.80000000000000029e-211 < t Initial program 88.2%
Taylor expanded in t around inf 65.1%
Final simplification61.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 (<= y -2.3e-71) (/ (/ x y) t) (if (<= y 4.9e-57) (/ (/ (- 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 (y <= -2.3e-71) {
tmp = (x / y) / t;
} else if (y <= 4.9e-57) {
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 (y <= (-2.3d-71)) then
tmp = (x / y) / t
else if (y <= 4.9d-57) 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 (y <= -2.3e-71) {
tmp = (x / y) / t;
} else if (y <= 4.9e-57) {
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 y <= -2.3e-71: tmp = (x / y) / t elif y <= 4.9e-57: 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 (y <= -2.3e-71) tmp = Float64(Float64(x / y) / t); elseif (y <= 4.9e-57) tmp = Float64(Float64(Float64(-x) / t) / 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 (y <= -2.3e-71)
tmp = (x / y) / t;
elseif (y <= 4.9e-57)
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[LessEqual[y, -2.3e-71], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 4.9e-57], N[(N[((-x) / t), $MachinePrecision] / z), $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 -2.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.2999999999999998e-71Initial program 87.5%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 87.5%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in z around 0 60.1%
*-commutative60.1%
associate-/r*70.7%
Simplified70.7%
if -2.2999999999999998e-71 < y < 4.89999999999999988e-57Initial program 89.1%
associate-/r*96.8%
div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 89.1%
associate-/l/96.8%
Simplified96.8%
Taylor expanded in y around 0 84.3%
associate-*r/84.3%
neg-mul-184.3%
Simplified84.3%
Taylor expanded in z around 0 46.3%
mul-1-neg46.3%
associate-/r*50.9%
Simplified50.9%
if 4.89999999999999988e-57 < y Initial program 92.2%
Taylor expanded in y around inf 83.8%
*-commutative83.8%
associate-/r*84.2%
Simplified84.2%
Taylor expanded in t around inf 53.6%
Final simplification58.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 (<= y -2.8e+207) (/ (/ x y) (- t z)) (/ x (* (- y z) (- t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+207) {
tmp = (x / y) / (t - z);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.8d+207)) then
tmp = (x / y) / (t - z)
else
tmp = x / ((y - z) * (t - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e+207) {
tmp = (x / y) / (t - z);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.8e+207: tmp = (x / y) / (t - z) else: tmp = x / ((y - z) * (t - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e+207) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.8e+207)
tmp = (x / y) / (t - z);
else
tmp = x / ((y - z) * (t - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e+207], N[(N[(x / y), $MachinePrecision] / N[(t - z), $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}\;y \leq -2.8 \cdot 10^{+207}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if y < -2.80000000000000011e207Initial program 70.0%
associate-/r*99.9%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 70.0%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in y around inf 70.0%
associate-/r*99.9%
Simplified99.9%
if -2.80000000000000011e207 < y Initial program 91.8%
Final simplification92.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 (<= t 2.25e-104) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.25e-104) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 2.25d-104) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.25e-104) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.25e-104: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.25e-104) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 2.25e-104)
tmp = x / (y * (t - z));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 2.25e-104], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.25 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 2.2499999999999999e-104Initial program 90.0%
Taylor expanded in y around inf 62.9%
*-commutative62.9%
Simplified62.9%
if 2.2499999999999999e-104 < t Initial program 88.4%
Taylor expanded in t around inf 76.3%
Final simplification67.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 2.4e-104) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.4e-104) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 2.4d-104) then
tmp = x / (y * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.4e-104) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.4e-104: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.4e-104) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 2.4e-104)
tmp = x / (y * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 2.4e-104], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.4 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.4000000000000001e-104Initial program 90.0%
Taylor expanded in y around inf 62.9%
*-commutative62.9%
Simplified62.9%
if 2.4000000000000001e-104 < t Initial program 88.4%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 76.3%
associate-/r*80.6%
Simplified80.6%
Final simplification68.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 (<= t 2.4e-104) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.4e-104) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 2.4d-104) then
tmp = (x / y) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.4e-104) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.4e-104: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.4e-104) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 2.4e-104)
tmp = (x / y) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 2.4e-104], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.4 \cdot 10^{-104}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.4000000000000001e-104Initial program 90.0%
associate-/r*97.8%
div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in x around 0 90.0%
associate-/l/97.8%
Simplified97.8%
Taylor expanded in y around inf 62.9%
associate-/r*64.5%
Simplified64.5%
if 2.4000000000000001e-104 < t Initial program 88.4%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 76.3%
associate-/r*80.6%
Simplified80.6%
Final simplification69.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 (<= t 2.1e-104) (/ (/ x y) (- t z)) (/ (/ x (- y z)) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.1e-104) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 2.1d-104) then
tmp = (x / y) / (t - z)
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.1e-104) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.1e-104: tmp = (x / y) / (t - z) else: tmp = (x / (y - z)) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.1e-104) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 2.1e-104)
tmp = (x / y) / (t - z);
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 2.1e-104], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.1 \cdot 10^{-104}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if t < 2.09999999999999999e-104Initial program 90.0%
associate-/r*97.8%
div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in x around 0 90.0%
associate-/l/97.8%
Simplified97.8%
Taylor expanded in y around inf 62.9%
associate-/r*64.5%
Simplified64.5%
if 2.09999999999999999e-104 < t Initial program 88.4%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in x around 0 88.4%
associate-/l/98.6%
Simplified98.6%
Taylor expanded in t around inf 76.3%
*-commutative76.3%
associate-/r*82.8%
Simplified82.8%
Final simplification70.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 1e-58) (/ (/ x y) t) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-58) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 1d-58) then
tmp = (x / y) / t
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1e-58) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 1e-58: tmp = (x / y) / t else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 1e-58) tmp = Float64(Float64(x / y) / t); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 1e-58)
tmp = (x / y) / t;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 1e-58], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-58}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < 1e-58Initial program 89.6%
associate-/r*97.9%
div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in x around 0 89.6%
associate-/l/97.9%
Simplified97.9%
Taylor expanded in z around 0 40.5%
*-commutative40.5%
associate-/r*46.4%
Simplified46.4%
if 1e-58 < t Initial program 89.1%
Taylor expanded in y around inf 46.4%
*-commutative46.4%
associate-/r*53.5%
Simplified53.5%
Taylor expanded in t around inf 49.0%
Final simplification47.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / (y * t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 89.5%
Taylor expanded in z around 0 40.8%
Final simplification40.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x 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(Float64(x / 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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t}}{y}
\end{array}
Initial program 89.5%
Taylor expanded in y around inf 58.3%
*-commutative58.3%
associate-/r*62.3%
Simplified62.3%
Taylor expanded in t around inf 43.7%
Final simplification43.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2024018
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))