
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ -1.0 (- z y)) (/ (- t z) x)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (-1.0 / (z - y)) / ((t - z) / x);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((-1.0d0) / (z - y)) / ((t - z) / x)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (-1.0 / (z - y)) / ((t - z) / x);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (-1.0 / (z - y)) / ((t - z) / x)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(-1.0 / Float64(z - y)) / Float64(Float64(t - z) / x)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (-1.0 / (z - y)) / ((t - z) / x);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(-1.0 / N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{-1}{z - y}}{\frac{t - z}{x}}
\end{array}
Initial program 87.9%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.6%
Applied egg-rr97.6%
Final simplification97.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x (- t z)) y)
(if (<= t_1 8e+297) (/ x t_1) (/ -1.0 (* z (/ (- y z) x)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (t - z)) / y;
} else if (t_1 <= 8e+297) {
tmp = x / t_1;
} else {
tmp = -1.0 / (z * ((y - z) / x));
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (t - z)) / y;
} else if (t_1 <= 8e+297) {
tmp = x / t_1;
} else {
tmp = -1.0 / (z * ((y - z) / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / (t - z)) / y elif t_1 <= 8e+297: tmp = x / t_1 else: tmp = -1.0 / (z * ((y - z) / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t_1 <= 8e+297) tmp = Float64(x / t_1); else tmp = Float64(-1.0 / Float64(z * Float64(Float64(y - z) / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (y - z) * (t - z);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / (t - z)) / y;
elseif (t_1 <= 8e+297)
tmp = x / t_1;
else
tmp = -1.0 / (z * ((y - z) / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 8e+297], N[(x / t$95$1), $MachinePrecision], N[(-1.0 / N[(z * N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t\_1 \leq 8 \cdot 10^{+297}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{z \cdot \frac{y - z}{x}}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 64.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6457.5%
Simplified57.5%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.4%
Applied egg-rr84.4%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 8.0000000000000001e297Initial program 97.5%
if 8.0000000000000001e297 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 75.7%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
associate-/l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
frac-2negN/A
associate-/r/N/A
*-lowering-*.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in z around inf
Simplified88.8%
Final simplification93.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 (<= t -4.5e-57) (/ (/ x y) (- t z)) (if (<= t 1.1e+43) (/ (/ x z) (- z y)) (/ (/ 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 <= -4.5e-57) {
tmp = (x / y) / (t - z);
} else if (t <= 1.1e+43) {
tmp = (x / z) / (z - y);
} 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 <= (-4.5d-57)) then
tmp = (x / y) / (t - z)
else if (t <= 1.1d+43) then
tmp = (x / z) / (z - y)
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 <= -4.5e-57) {
tmp = (x / y) / (t - z);
} else if (t <= 1.1e+43) {
tmp = (x / z) / (z - y);
} 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 <= -4.5e-57: tmp = (x / y) / (t - z) elif t <= 1.1e+43: tmp = (x / z) / (z - y) 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 <= -4.5e-57) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.1e+43) tmp = Float64(Float64(x / z) / Float64(z - y)); 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 <= -4.5e-57)
tmp = (x / y) / (t - z);
elseif (t <= 1.1e+43)
tmp = (x / z) / (z - y);
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, -4.5e-57], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+43], N[(N[(x / z), $MachinePrecision] / N[(z - y), $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 -4.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+43}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.49999999999999973e-57Initial program 85.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6458.8%
Simplified58.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Applied egg-rr65.0%
if -4.49999999999999973e-57 < t < 1.1e43Initial program 90.0%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.3%
Applied egg-rr98.3%
Taylor expanded in t around 0
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
--lowering--.f6485.7%
Simplified85.7%
if 1.1e43 < t Initial program 84.6%
Taylor expanded in t around inf
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.2%
Simplified82.2%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.5%
Applied egg-rr86.5%
Final simplification80.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2.02e-57) (/ (/ x y) (- t z)) (if (<= t 3.6e+52) (/ (/ x (- z y)) 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.02e-57) {
tmp = (x / y) / (t - z);
} else if (t <= 3.6e+52) {
tmp = (x / (z - y)) / 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.02d-57)) then
tmp = (x / y) / (t - z)
else if (t <= 3.6d+52) then
tmp = (x / (z - y)) / 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.02e-57) {
tmp = (x / y) / (t - z);
} else if (t <= 3.6e+52) {
tmp = (x / (z - y)) / 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.02e-57: tmp = (x / y) / (t - z) elif t <= 3.6e+52: tmp = (x / (z - y)) / 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.02e-57) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.6e+52) tmp = Float64(Float64(x / Float64(z - y)) / 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.02e-57)
tmp = (x / y) / (t - z);
elseif (t <= 3.6e+52)
tmp = (x / (z - y)) / 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.02e-57], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+52], N[(N[(x / N[(z - y), $MachinePrecision]), $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}\;t \leq -2.02 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+52}:\\
\;\;\;\;\frac{\frac{x}{z - y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.02000000000000009e-57Initial program 85.7%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6458.8%
Simplified58.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6465.0%
Applied egg-rr65.0%
if -2.02000000000000009e-57 < t < 3.6e52Initial program 90.3%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.4%
Applied egg-rr98.4%
associate-/l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6498.3%
Applied egg-rr98.3%
frac-2negN/A
associate-/r/N/A
*-lowering-*.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f64N/A
neg-sub0N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
--lowering--.f6499.0%
Applied egg-rr99.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.9%
Simplified84.9%
if 3.6e52 < t Initial program 83.2%
Taylor expanded in t around inf
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6486.9%
Simplified86.9%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6491.6%
Applied egg-rr91.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (/ x z) (- z t)))) (if (<= z -3.35) t_1 (if (<= z 1.95e-59) (/ (/ x (- t z)) y) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -3.35) {
tmp = t_1;
} else if (z <= 1.95e-59) {
tmp = (x / (t - z)) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / (z - t)
if (z <= (-3.35d0)) then
tmp = t_1
else if (z <= 1.95d-59) then
tmp = (x / (t - z)) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -3.35) {
tmp = t_1;
} else if (z <= 1.95e-59) {
tmp = (x / (t - z)) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (z - t) tmp = 0 if z <= -3.35: tmp = t_1 elif z <= 1.95e-59: tmp = (x / (t - z)) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (z <= -3.35) tmp = t_1; elseif (z <= 1.95e-59) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (z <= -3.35)
tmp = t_1;
elseif (z <= 1.95e-59)
tmp = (x / (t - z)) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.35], t$95$1, If[LessEqual[z, 1.95e-59], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;z \leq -3.35:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-59}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.35000000000000009 or 1.95000000000000009e-59 < z Initial program 86.2%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
--lowering--.f6484.5%
Simplified84.5%
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.5%
Applied egg-rr84.5%
if -3.35000000000000009 < z < 1.95000000000000009e-59Initial program 90.3%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.7%
Simplified78.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6483.0%
Applied egg-rr83.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (/ x z) (- z t)))) (if (<= z -2.1) t_1 (if (<= z 8.2e-60) (/ (/ x y) (- t z)) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -2.1) {
tmp = t_1;
} else if (z <= 8.2e-60) {
tmp = (x / y) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / (z - t)
if (z <= (-2.1d0)) then
tmp = t_1
else if (z <= 8.2d-60) then
tmp = (x / y) / (t - z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (z <= -2.1) {
tmp = t_1;
} else if (z <= 8.2e-60) {
tmp = (x / y) / (t - z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (z - t) tmp = 0 if z <= -2.1: tmp = t_1 elif z <= 8.2e-60: tmp = (x / y) / (t - z) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (z <= -2.1) tmp = t_1; elseif (z <= 8.2e-60) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (z <= -2.1)
tmp = t_1;
elseif (z <= 8.2e-60)
tmp = (x / y) / (t - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1], t$95$1, If[LessEqual[z, 8.2e-60], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;z \leq -2.1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.10000000000000009 or 8.20000000000000025e-60 < z Initial program 86.2%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
mul-1-negN/A
associate-/r*N/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
--lowering--.f6484.5%
Simplified84.5%
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.5%
Applied egg-rr84.5%
if -2.10000000000000009 < z < 8.20000000000000025e-60Initial program 90.3%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6478.7%
Simplified78.7%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.0%
Applied egg-rr84.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ z (/ x z))))) (if (<= z -85000000.0) t_1 (if (<= z 1.25e-53) (/ (/ x t) (- y z)) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -85000000.0) {
tmp = t_1;
} else if (z <= 1.25e-53) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-85000000.0d0)) then
tmp = t_1
else if (z <= 1.25d-53) then
tmp = (x / t) / (y - z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -85000000.0) {
tmp = t_1;
} else if (z <= 1.25e-53) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -85000000.0: tmp = t_1 elif z <= 1.25e-53: tmp = (x / t) / (y - z) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -85000000.0) tmp = t_1; elseif (z <= 1.25e-53) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -85000000.0)
tmp = t_1;
elseif (z <= 1.25e-53)
tmp = (x / t) / (y - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -85000000.0], t$95$1, If[LessEqual[z, 1.25e-53], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -85000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.5e7 or 1.25e-53 < z Initial program 86.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6476.8%
Applied egg-rr76.8%
if -8.5e7 < z < 1.25e-53Initial program 90.5%
Taylor expanded in t around inf
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.1%
Simplified74.1%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.5%
Applied egg-rr70.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ z (/ x z))))) (if (<= z -40000000.0) t_1 (if (<= z 1.5e-53) (/ x (* y (- t z))) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -40000000.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = x / (y * (t - z));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-40000000.0d0)) then
tmp = t_1
else if (z <= 1.5d-53) then
tmp = x / (y * (t - z))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -40000000.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = x / (y * (t - z));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -40000000.0: tmp = t_1 elif z <= 1.5e-53: tmp = x / (y * (t - z)) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -40000000.0) tmp = t_1; elseif (z <= 1.5e-53) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -40000000.0)
tmp = t_1;
elseif (z <= 1.5e-53)
tmp = x / (y * (t - z));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -40000000.0], t$95$1, If[LessEqual[z, 1.5e-53], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -40000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4e7 or 1.5000000000000001e-53 < z Initial program 86.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6476.8%
Applied egg-rr76.8%
if -4e7 < z < 1.5000000000000001e-53Initial program 90.5%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6479.3%
Simplified79.3%
Final simplification77.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ z (/ x z))))) (if (<= z -3150.0) t_1 (if (<= z 7.5e-54) (/ (/ x t) y) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -3150.0) {
tmp = t_1;
} else if (z <= 7.5e-54) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-3150.0d0)) then
tmp = t_1
else if (z <= 7.5d-54) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -3150.0) {
tmp = t_1;
} else if (z <= 7.5e-54) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -3150.0: tmp = t_1 elif z <= 7.5e-54: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -3150.0) tmp = t_1; elseif (z <= 7.5e-54) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -3150.0)
tmp = t_1;
elseif (z <= 7.5e-54)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3150.0], t$95$1, If[LessEqual[z, 7.5e-54], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -3150:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3150 or 7.5000000000000005e-54 < z Initial program 86.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6476.8%
Applied egg-rr76.8%
if -3150 < z < 7.5000000000000005e-54Initial program 90.5%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6459.3%
Simplified59.3%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.6%
Applied egg-rr62.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (/ x z) z))) (if (<= z -95000.0) t_1 (if (<= z 1.5e-53) (/ (/ x t) y) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -95000.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-95000.0d0)) then
tmp = t_1
else if (z <= 1.5d-53) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -95000.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -95000.0: tmp = t_1 elif z <= 1.5e-53: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -95000.0) tmp = t_1; elseif (z <= 1.5e-53) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -95000.0)
tmp = t_1;
elseif (z <= 1.5e-53)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -95000.0], t$95$1, If[LessEqual[z, 1.5e-53], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -95000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -95000 or 1.5000000000000001e-53 < z Initial program 86.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6475.9%
Applied egg-rr75.9%
if -95000 < z < 1.5000000000000001e-53Initial program 90.5%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6459.3%
Simplified59.3%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.6%
Applied egg-rr62.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* z z)))) (if (<= z -500.0) t_1 (if (<= z 1.5e-53) (/ (/ x t) y) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -500.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (z * z)
if (z <= (-500.0d0)) then
tmp = t_1
else if (z <= 1.5d-53) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -500.0) {
tmp = t_1;
} else if (z <= 1.5e-53) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * z) tmp = 0 if z <= -500.0: tmp = t_1 elif z <= 1.5e-53: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * z)) tmp = 0.0 if (z <= -500.0) tmp = t_1; elseif (z <= 1.5e-53) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * z);
tmp = 0.0;
if (z <= -500.0)
tmp = t_1;
elseif (z <= 1.5e-53)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -500.0], t$95$1, If[LessEqual[z, 1.5e-53], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -500:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -500 or 1.5000000000000001e-53 < z Initial program 86.0%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6469.6%
Simplified69.6%
if -500 < z < 1.5000000000000001e-53Initial program 90.5%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6459.3%
Simplified59.3%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.6%
Applied egg-rr62.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* z z)))) (if (<= z -1.16e-26) t_1 (if (<= z 1.32e-53) (/ x (* y t)) t_1))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -1.16e-26) {
tmp = t_1;
} else if (z <= 1.32e-53) {
tmp = x / (y * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (z * z)
if (z <= (-1.16d-26)) then
tmp = t_1
else if (z <= 1.32d-53) then
tmp = x / (y * t)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -1.16e-26) {
tmp = t_1;
} else if (z <= 1.32e-53) {
tmp = x / (y * t);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * z) tmp = 0 if z <= -1.16e-26: tmp = t_1 elif z <= 1.32e-53: tmp = x / (y * t) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * z)) tmp = 0.0 if (z <= -1.16e-26) tmp = t_1; elseif (z <= 1.32e-53) tmp = Float64(x / Float64(y * t)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * z);
tmp = 0.0;
if (z <= -1.16e-26)
tmp = t_1;
elseif (z <= 1.32e-53)
tmp = x / (y * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e-26], t$95$1, If[LessEqual[z, 1.32e-53], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.16000000000000002e-26 or 1.31999999999999997e-53 < z Initial program 85.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6468.1%
Simplified68.1%
if -1.16000000000000002e-26 < z < 1.31999999999999997e-53Initial program 91.0%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6461.9%
Simplified61.9%
Final simplification65.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (t - z)) / (y - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 87.9%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / (y * t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 87.9%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6435.5%
Simplified35.5%
Final simplification35.5%
(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 2024160
(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))))