
(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 22 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 (if (<= (* (- y z) (- t z)) 1e-107) (/ (/ x (- y z)) (- t z)) (/ (/ x (- t z)) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (((y - z) * (t - z)) <= 1e-107) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((y - z) * (t - z)) <= 1d-107) then
tmp = (x / (y - z)) / (t - z)
else
tmp = (x / (t - z)) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (((y - z) * (t - z)) <= 1e-107) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if ((y - z) * (t - z)) <= 1e-107: tmp = (x / (y - z)) / (t - z) else: tmp = (x / (t - z)) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(y - z) * Float64(t - z)) <= 1e-107) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (((y - z) * (t - z)) <= 1e-107)
tmp = (x / (y - z)) / (t - z);
else
tmp = (x / (t - z)) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], 1e-107], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y - z\right) \cdot \left(t - z\right) \leq 10^{-107}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < 1e-107Initial program 94.0%
Taylor expanded in x around 0 94.0%
associate-/l/94.9%
Simplified94.9%
if 1e-107 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 93.4%
associate-/l/97.4%
Simplified97.4%
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 (<= y -7.4)
(/ (/ x y) (- t z))
(if (<= y -3.3e-46)
t_1
(if (<= y -3.8e-71)
(/ x (* (- y z) t))
(if (<= y -1.7e-229)
(* (/ x (- t z)) (/ -1.0 z))
(if (<= y 5.5e-278)
(/ x (* z (- z t)))
(if (<= y 9.5e-154) t_1 (/ (/ x t) (- y z))))))))))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 (y <= -7.4) {
tmp = (x / y) / (t - z);
} else if (y <= -3.3e-46) {
tmp = t_1;
} else if (y <= -3.8e-71) {
tmp = x / ((y - z) * t);
} else if (y <= -1.7e-229) {
tmp = (x / (t - z)) * (-1.0 / z);
} else if (y <= 5.5e-278) {
tmp = x / (z * (z - t));
} else if (y <= 9.5e-154) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / z) / (z - t)
if (y <= (-7.4d0)) then
tmp = (x / y) / (t - z)
else if (y <= (-3.3d-46)) then
tmp = t_1
else if (y <= (-3.8d-71)) then
tmp = x / ((y - z) * t)
else if (y <= (-1.7d-229)) then
tmp = (x / (t - z)) * ((-1.0d0) / z)
else if (y <= 5.5d-278) then
tmp = x / (z * (z - t))
else if (y <= 9.5d-154) then
tmp = t_1
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 t_1 = (x / z) / (z - t);
double tmp;
if (y <= -7.4) {
tmp = (x / y) / (t - z);
} else if (y <= -3.3e-46) {
tmp = t_1;
} else if (y <= -3.8e-71) {
tmp = x / ((y - z) * t);
} else if (y <= -1.7e-229) {
tmp = (x / (t - z)) * (-1.0 / z);
} else if (y <= 5.5e-278) {
tmp = x / (z * (z - t));
} else if (y <= 9.5e-154) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
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 y <= -7.4: tmp = (x / y) / (t - z) elif y <= -3.3e-46: tmp = t_1 elif y <= -3.8e-71: tmp = x / ((y - z) * t) elif y <= -1.7e-229: tmp = (x / (t - z)) * (-1.0 / z) elif y <= 5.5e-278: tmp = x / (z * (z - t)) elif y <= 9.5e-154: tmp = t_1 else: tmp = (x / t) / (y - z) 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 (y <= -7.4) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -3.3e-46) tmp = t_1; elseif (y <= -3.8e-71) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= -1.7e-229) tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z)); elseif (y <= 5.5e-278) tmp = Float64(x / Float64(z * Float64(z - t))); elseif (y <= 9.5e-154) tmp = t_1; 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)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (y <= -7.4)
tmp = (x / y) / (t - z);
elseif (y <= -3.3e-46)
tmp = t_1;
elseif (y <= -3.8e-71)
tmp = x / ((y - z) * t);
elseif (y <= -1.7e-229)
tmp = (x / (t - z)) * (-1.0 / z);
elseif (y <= 5.5e-278)
tmp = x / (z * (z - t));
elseif (y <= 9.5e-154)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.4], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e-46], t$95$1, If[LessEqual[y, -3.8e-71], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-229], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-278], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-154], t$95$1, 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}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;y \leq -7.4:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-71}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-229}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-278}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.4000000000000004Initial program 88.6%
associate-/l/98.3%
div-inv98.3%
Applied egg-rr98.3%
clear-num98.2%
associate-*l/98.4%
*-un-lft-identity98.4%
Applied egg-rr98.4%
Taylor expanded in y around inf 84.4%
associate-/r*89.0%
Simplified89.0%
if -7.4000000000000004 < y < -3.30000000000000013e-46 or 5.49999999999999989e-278 < y < 9.50000000000000057e-154Initial program 93.2%
Taylor expanded in y around 0 82.4%
associate-*r/82.4%
neg-mul-182.4%
Simplified82.4%
div-inv82.4%
add-sqr-sqrt36.5%
sqrt-unprod44.1%
sqr-neg44.1%
sqrt-unprod16.5%
add-sqr-sqrt29.5%
associate-/r*29.5%
Applied egg-rr29.5%
*-commutative29.5%
associate-*l/29.5%
associate-*r/29.4%
associate-*l/29.4%
*-lft-identity29.4%
Simplified29.4%
frac-2neg29.4%
div-inv29.4%
distribute-neg-frac229.4%
sub-neg29.4%
distribute-neg-in29.4%
remove-double-neg29.4%
add-sqr-sqrt13.4%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod45.4%
add-sqr-sqrt88.2%
Applied egg-rr88.2%
associate-*l/88.1%
associate-*r/88.2%
*-rgt-identity88.2%
+-commutative88.2%
unsub-neg88.2%
Simplified88.2%
if -3.30000000000000013e-46 < y < -3.79999999999999992e-71Initial program 99.5%
Taylor expanded in t around inf 83.7%
if -3.79999999999999992e-71 < y < -1.7e-229Initial program 95.5%
associate-/l/97.3%
div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in y around 0 92.2%
if -1.7e-229 < y < 5.49999999999999989e-278Initial program 99.9%
Taylor expanded in y around 0 95.8%
associate-*r/95.8%
neg-mul-195.8%
Simplified95.8%
div-inv95.7%
add-sqr-sqrt43.3%
sqrt-unprod63.4%
sqr-neg63.4%
sqrt-unprod33.9%
add-sqr-sqrt53.2%
associate-/r*53.2%
Applied egg-rr53.2%
*-commutative53.2%
associate-*l/53.2%
associate-*r/53.3%
associate-*l/53.3%
*-lft-identity53.3%
Simplified53.3%
frac-2neg53.3%
div-inv53.3%
distribute-neg-frac253.3%
sub-neg53.3%
distribute-neg-in53.3%
remove-double-neg53.3%
add-sqr-sqrt38.5%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod24.9%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
associate-*l/86.5%
associate-*r/86.6%
*-rgt-identity86.6%
+-commutative86.6%
unsub-neg86.6%
Simplified86.6%
Taylor expanded in x around 0 95.8%
if 9.50000000000000057e-154 < y Initial program 94.8%
associate-/l/95.4%
Simplified95.4%
Taylor expanded in t around inf 60.2%
Final simplification79.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -3.5e+42)
(/ (/ x z) z)
(if (<= z -8e-15)
(/ (/ x y) t)
(if (<= z -2.8e-15)
(* (/ x z) (/ 1.0 z))
(if (<= z 7e-120)
(/ (/ x t) y)
(if (<= z 2.15e-16)
(/ (/ x (- y)) z)
(if (<= z 7.2e+84) (/ (/ x (- z)) t) (/ 1.0 (* z (/ z x))))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+42) {
tmp = (x / z) / z;
} else if (z <= -8e-15) {
tmp = (x / y) / t;
} else if (z <= -2.8e-15) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 7e-120) {
tmp = (x / t) / y;
} else if (z <= 2.15e-16) {
tmp = (x / -y) / z;
} else if (z <= 7.2e+84) {
tmp = (x / -z) / t;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.5d+42)) then
tmp = (x / z) / z
else if (z <= (-8d-15)) then
tmp = (x / y) / t
else if (z <= (-2.8d-15)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 7d-120) then
tmp = (x / t) / y
else if (z <= 2.15d-16) then
tmp = (x / -y) / z
else if (z <= 7.2d+84) then
tmp = (x / -z) / t
else
tmp = 1.0d0 / (z * (z / x))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+42) {
tmp = (x / z) / z;
} else if (z <= -8e-15) {
tmp = (x / y) / t;
} else if (z <= -2.8e-15) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 7e-120) {
tmp = (x / t) / y;
} else if (z <= 2.15e-16) {
tmp = (x / -y) / z;
} else if (z <= 7.2e+84) {
tmp = (x / -z) / t;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -3.5e+42: tmp = (x / z) / z elif z <= -8e-15: tmp = (x / y) / t elif z <= -2.8e-15: tmp = (x / z) * (1.0 / z) elif z <= 7e-120: tmp = (x / t) / y elif z <= 2.15e-16: tmp = (x / -y) / z elif z <= 7.2e+84: tmp = (x / -z) / t else: tmp = 1.0 / (z * (z / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+42) tmp = Float64(Float64(x / z) / z); elseif (z <= -8e-15) tmp = Float64(Float64(x / y) / t); elseif (z <= -2.8e-15) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 7e-120) tmp = Float64(Float64(x / t) / y); elseif (z <= 2.15e-16) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 7.2e+84) tmp = Float64(Float64(x / Float64(-z)) / t); else tmp = Float64(1.0 / Float64(z * Float64(z / x))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -3.5e+42)
tmp = (x / z) / z;
elseif (z <= -8e-15)
tmp = (x / y) / t;
elseif (z <= -2.8e-15)
tmp = (x / z) * (1.0 / z);
elseif (z <= 7e-120)
tmp = (x / t) / y;
elseif (z <= 2.15e-16)
tmp = (x / -y) / z;
elseif (z <= 7.2e+84)
tmp = (x / -z) / t;
else
tmp = 1.0 / (z * (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_] := If[LessEqual[z, -3.5e+42], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8e-15], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -2.8e-15], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-120], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.15e-16], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7.2e+84], N[(N[(x / (-z)), $MachinePrecision] / t), $MachinePrecision], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-120}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -3.50000000000000023e42Initial program 95.7%
Taylor expanded in y around 0 87.5%
associate-*r/87.5%
neg-mul-187.5%
Simplified87.5%
div-inv87.5%
add-sqr-sqrt43.7%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod41.7%
add-sqr-sqrt74.8%
associate-/r*74.8%
Applied egg-rr74.8%
*-commutative74.8%
associate-*l/72.7%
associate-*r/72.7%
associate-*l/72.7%
*-lft-identity72.7%
Simplified72.7%
Taylor expanded in t around 0 68.6%
associate-*r/92.2%
neg-mul-192.2%
Simplified68.6%
div-inv68.6%
frac-2neg68.6%
add-sqr-sqrt29.0%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod41.7%
add-sqr-sqrt81.5%
distribute-neg-frac281.5%
distribute-frac-neg81.5%
remove-double-neg81.5%
Applied egg-rr81.5%
un-div-inv81.5%
Applied egg-rr81.5%
if -3.50000000000000023e42 < z < -8.0000000000000006e-15Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -8.0000000000000006e-15 < z < -2.80000000000000014e-15Initial program 98.4%
Taylor expanded in y around 0 98.4%
associate-*r/98.4%
neg-mul-198.4%
Simplified98.4%
div-inv98.4%
add-sqr-sqrt0.0%
sqrt-unprod0.2%
sqr-neg0.2%
sqrt-unprod0.3%
add-sqr-sqrt0.3%
associate-/r*0.3%
Applied egg-rr0.3%
*-commutative0.3%
associate-*l/0.3%
associate-*r/0.3%
associate-*l/0.3%
*-lft-identity0.3%
Simplified0.3%
Taylor expanded in t around 0 0.3%
associate-*r/80.4%
neg-mul-180.4%
Simplified0.3%
div-inv0.3%
frac-2neg0.3%
add-sqr-sqrt0.0%
sqrt-unprod6.2%
sqr-neg6.2%
sqrt-unprod80.4%
add-sqr-sqrt80.4%
distribute-neg-frac280.4%
distribute-frac-neg80.4%
remove-double-neg80.4%
Applied egg-rr80.4%
if -2.80000000000000014e-15 < z < 7e-120Initial program 95.0%
associate-/l/92.5%
div-inv92.6%
Applied egg-rr92.6%
clear-num92.5%
associate-*l/94.1%
*-un-lft-identity94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 69.1%
associate-/r*67.5%
Simplified67.5%
if 7e-120 < z < 2.1499999999999999e-16Initial program 95.4%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 49.7%
mul-1-neg49.7%
associate-/r*57.0%
distribute-neg-frac257.0%
Simplified57.0%
if 2.1499999999999999e-16 < z < 7.1999999999999999e84Initial program 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 58.7%
Taylor expanded in y around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
associate-/r*45.2%
distribute-neg-frac245.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
*-lft-identity45.2%
*-commutative45.2%
times-frac45.2%
associate-*r/45.2%
distribute-neg-frac245.2%
associate-*l/45.2%
*-lft-identity45.2%
Simplified45.2%
if 7.1999999999999999e84 < z Initial program 84.0%
Taylor expanded in y around 0 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
div-inv81.3%
add-sqr-sqrt42.3%
sqrt-unprod66.7%
sqr-neg66.7%
sqrt-unprod32.5%
add-sqr-sqrt71.3%
associate-/r*70.0%
Applied egg-rr70.0%
*-commutative70.0%
associate-*l/68.9%
associate-*r/68.9%
associate-*l/68.9%
*-lft-identity68.9%
Simplified68.9%
Taylor expanded in t around 0 64.8%
associate-*r/92.8%
neg-mul-192.8%
Simplified64.8%
div-inv64.8%
frac-2neg64.8%
add-sqr-sqrt34.1%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod38.9%
add-sqr-sqrt81.0%
distribute-neg-frac281.0%
distribute-frac-neg81.0%
remove-double-neg81.0%
Applied egg-rr81.0%
clear-num81.0%
frac-times81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification69.1%
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.2e+44)
t_1
(if (<= z -5.6e-14)
(/ (/ x y) t)
(if (<= z -3e-15)
(* (/ x z) (/ 1.0 z))
(if (<= z 8.8e-120)
(/ (/ x t) y)
(if (<= z 5.5e-18)
(/ (/ x (- y)) z)
(if (<= z 7e+84) (/ (/ x (- z)) 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.2e+44) {
tmp = t_1;
} else if (z <= -5.6e-14) {
tmp = (x / y) / t;
} else if (z <= -3e-15) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 8.8e-120) {
tmp = (x / t) / y;
} else if (z <= 5.5e-18) {
tmp = (x / -y) / z;
} else if (z <= 7e+84) {
tmp = (x / -z) / 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.2d+44)) then
tmp = t_1
else if (z <= (-5.6d-14)) then
tmp = (x / y) / t
else if (z <= (-3d-15)) then
tmp = (x / z) * (1.0d0 / z)
else if (z <= 8.8d-120) then
tmp = (x / t) / y
else if (z <= 5.5d-18) then
tmp = (x / -y) / z
else if (z <= 7d+84) then
tmp = (x / -z) / 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.2e+44) {
tmp = t_1;
} else if (z <= -5.6e-14) {
tmp = (x / y) / t;
} else if (z <= -3e-15) {
tmp = (x / z) * (1.0 / z);
} else if (z <= 8.8e-120) {
tmp = (x / t) / y;
} else if (z <= 5.5e-18) {
tmp = (x / -y) / z;
} else if (z <= 7e+84) {
tmp = (x / -z) / 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.2e+44: tmp = t_1 elif z <= -5.6e-14: tmp = (x / y) / t elif z <= -3e-15: tmp = (x / z) * (1.0 / z) elif z <= 8.8e-120: tmp = (x / t) / y elif z <= 5.5e-18: tmp = (x / -y) / z elif z <= 7e+84: tmp = (x / -z) / 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(Float64(x / z) / z) tmp = 0.0 if (z <= -1.2e+44) tmp = t_1; elseif (z <= -5.6e-14) tmp = Float64(Float64(x / y) / t); elseif (z <= -3e-15) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); elseif (z <= 8.8e-120) tmp = Float64(Float64(x / t) / y); elseif (z <= 5.5e-18) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 7e+84) tmp = Float64(Float64(x / Float64(-z)) / 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.2e+44)
tmp = t_1;
elseif (z <= -5.6e-14)
tmp = (x / y) / t;
elseif (z <= -3e-15)
tmp = (x / z) * (1.0 / z);
elseif (z <= 8.8e-120)
tmp = (x / t) / y;
elseif (z <= 5.5e-18)
tmp = (x / -y) / z;
elseif (z <= 7e+84)
tmp = (x / -z) / 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.2e+44], t$95$1, If[LessEqual[z, -5.6e-14], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -3e-15], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-120], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 5.5e-18], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e+84], N[(N[(x / (-z)), $MachinePrecision] / t), $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 -1.2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-120}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.20000000000000007e44 or 6.9999999999999998e84 < z Initial program 89.5%
Taylor expanded in y around 0 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
div-inv84.2%
add-sqr-sqrt43.0%
sqrt-unprod69.5%
sqr-neg69.5%
sqrt-unprod36.8%
add-sqr-sqrt72.9%
associate-/r*72.2%
Applied egg-rr72.2%
*-commutative72.2%
associate-*l/70.7%
associate-*r/70.7%
associate-*l/70.7%
*-lft-identity70.7%
Simplified70.7%
Taylor expanded in t around 0 66.6%
associate-*r/92.5%
neg-mul-192.5%
Simplified66.6%
div-inv66.6%
frac-2neg66.6%
add-sqr-sqrt31.7%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod40.2%
add-sqr-sqrt81.2%
distribute-neg-frac281.2%
distribute-frac-neg81.2%
remove-double-neg81.2%
Applied egg-rr81.2%
un-div-inv81.3%
Applied egg-rr81.3%
if -1.20000000000000007e44 < z < -5.6000000000000001e-14Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -5.6000000000000001e-14 < z < -3e-15Initial program 98.4%
Taylor expanded in y around 0 98.4%
associate-*r/98.4%
neg-mul-198.4%
Simplified98.4%
div-inv98.4%
add-sqr-sqrt0.0%
sqrt-unprod0.2%
sqr-neg0.2%
sqrt-unprod0.3%
add-sqr-sqrt0.3%
associate-/r*0.3%
Applied egg-rr0.3%
*-commutative0.3%
associate-*l/0.3%
associate-*r/0.3%
associate-*l/0.3%
*-lft-identity0.3%
Simplified0.3%
Taylor expanded in t around 0 0.3%
associate-*r/80.4%
neg-mul-180.4%
Simplified0.3%
div-inv0.3%
frac-2neg0.3%
add-sqr-sqrt0.0%
sqrt-unprod6.2%
sqr-neg6.2%
sqrt-unprod80.4%
add-sqr-sqrt80.4%
distribute-neg-frac280.4%
distribute-frac-neg80.4%
remove-double-neg80.4%
Applied egg-rr80.4%
if -3e-15 < z < 8.8000000000000005e-120Initial program 95.0%
associate-/l/92.5%
div-inv92.6%
Applied egg-rr92.6%
clear-num92.5%
associate-*l/94.1%
*-un-lft-identity94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 69.1%
associate-/r*67.5%
Simplified67.5%
if 8.8000000000000005e-120 < z < 5.5e-18Initial program 95.4%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 49.7%
mul-1-neg49.7%
associate-/r*57.0%
distribute-neg-frac257.0%
Simplified57.0%
if 5.5e-18 < z < 6.9999999999999998e84Initial program 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 58.7%
Taylor expanded in y around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
associate-/r*45.2%
distribute-neg-frac245.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
*-lft-identity45.2%
*-commutative45.2%
times-frac45.2%
associate-*r/45.2%
distribute-neg-frac245.2%
associate-*l/45.2%
*-lft-identity45.2%
Simplified45.2%
Final simplification68.9%
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 -4.5e+46)
t_1
(if (<= z -1.26e-11)
(/ (/ x y) t)
(if (<= z -7.5e-16)
t_1
(if (<= z 8.8e-120)
(/ (/ x t) y)
(if (<= z 4.1e-13)
(/ (/ x (- y)) z)
(if (<= z 1.18e+85) (/ (/ x (- z)) 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 <= -4.5e+46) {
tmp = t_1;
} else if (z <= -1.26e-11) {
tmp = (x / y) / t;
} else if (z <= -7.5e-16) {
tmp = t_1;
} else if (z <= 8.8e-120) {
tmp = (x / t) / y;
} else if (z <= 4.1e-13) {
tmp = (x / -y) / z;
} else if (z <= 1.18e+85) {
tmp = (x / -z) / 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 <= (-4.5d+46)) then
tmp = t_1
else if (z <= (-1.26d-11)) then
tmp = (x / y) / t
else if (z <= (-7.5d-16)) then
tmp = t_1
else if (z <= 8.8d-120) then
tmp = (x / t) / y
else if (z <= 4.1d-13) then
tmp = (x / -y) / z
else if (z <= 1.18d+85) then
tmp = (x / -z) / 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 <= -4.5e+46) {
tmp = t_1;
} else if (z <= -1.26e-11) {
tmp = (x / y) / t;
} else if (z <= -7.5e-16) {
tmp = t_1;
} else if (z <= 8.8e-120) {
tmp = (x / t) / y;
} else if (z <= 4.1e-13) {
tmp = (x / -y) / z;
} else if (z <= 1.18e+85) {
tmp = (x / -z) / 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 <= -4.5e+46: tmp = t_1 elif z <= -1.26e-11: tmp = (x / y) / t elif z <= -7.5e-16: tmp = t_1 elif z <= 8.8e-120: tmp = (x / t) / y elif z <= 4.1e-13: tmp = (x / -y) / z elif z <= 1.18e+85: tmp = (x / -z) / 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(Float64(x / z) / z) tmp = 0.0 if (z <= -4.5e+46) tmp = t_1; elseif (z <= -1.26e-11) tmp = Float64(Float64(x / y) / t); elseif (z <= -7.5e-16) tmp = t_1; elseif (z <= 8.8e-120) tmp = Float64(Float64(x / t) / y); elseif (z <= 4.1e-13) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 1.18e+85) tmp = Float64(Float64(x / Float64(-z)) / 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 <= -4.5e+46)
tmp = t_1;
elseif (z <= -1.26e-11)
tmp = (x / y) / t;
elseif (z <= -7.5e-16)
tmp = t_1;
elseif (z <= 8.8e-120)
tmp = (x / t) / y;
elseif (z <= 4.1e-13)
tmp = (x / -y) / z;
elseif (z <= 1.18e+85)
tmp = (x / -z) / 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -4.5e+46], t$95$1, If[LessEqual[z, -1.26e-11], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -7.5e-16], t$95$1, If[LessEqual[z, 8.8e-120], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4.1e-13], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.18e+85], N[(N[(x / (-z)), $MachinePrecision] / t), $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 -4.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.26 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-120}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+85}:\\
\;\;\;\;\frac{\frac{x}{-z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5000000000000001e46 or -1.26e-11 < z < -7.5e-16 or 1.17999999999999997e85 < z Initial program 89.5%
Taylor expanded in y around 0 84.3%
associate-*r/84.3%
neg-mul-184.3%
Simplified84.3%
div-inv84.3%
add-sqr-sqrt42.5%
sqrt-unprod68.8%
sqr-neg68.8%
sqrt-unprod36.4%
add-sqr-sqrt72.2%
associate-/r*71.5%
Applied egg-rr71.5%
*-commutative71.5%
associate-*l/70.0%
associate-*r/70.0%
associate-*l/70.0%
*-lft-identity70.0%
Simplified70.0%
Taylor expanded in t around 0 65.9%
associate-*r/92.4%
neg-mul-192.4%
Simplified65.9%
div-inv65.9%
frac-2neg65.9%
add-sqr-sqrt31.4%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod40.6%
add-sqr-sqrt81.2%
distribute-neg-frac281.2%
distribute-frac-neg81.2%
remove-double-neg81.2%
Applied egg-rr81.2%
un-div-inv81.2%
Applied egg-rr81.2%
if -4.5000000000000001e46 < z < -1.26e-11Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -7.5e-16 < z < 8.8000000000000005e-120Initial program 95.0%
associate-/l/92.5%
div-inv92.6%
Applied egg-rr92.6%
clear-num92.5%
associate-*l/94.1%
*-un-lft-identity94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 69.1%
associate-/r*67.5%
Simplified67.5%
if 8.8000000000000005e-120 < z < 4.1000000000000002e-13Initial program 95.4%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 49.7%
mul-1-neg49.7%
associate-/r*57.0%
distribute-neg-frac257.0%
Simplified57.0%
if 4.1000000000000002e-13 < z < 1.17999999999999997e85Initial program 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 58.7%
Taylor expanded in y around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
associate-/r*45.2%
distribute-neg-frac245.2%
Simplified45.2%
Taylor expanded in x around 0 45.2%
mul-1-neg45.2%
*-lft-identity45.2%
*-commutative45.2%
times-frac45.2%
associate-*r/45.2%
distribute-neg-frac245.2%
associate-*l/45.2%
*-lft-identity45.2%
Simplified45.2%
Final simplification68.9%
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 -2.6e+45)
t_1
(if (<= z -1.3e-13)
(/ (/ x y) t)
(if (<= z -3e-15)
t_1
(if (<= z 7e-120)
(/ (/ x t) y)
(if (<= z 1.4e-13)
(/ (/ x (- y)) z)
(if (<= z 7e+84) (/ x (- (* z 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 <= -2.6e+45) {
tmp = t_1;
} else if (z <= -1.3e-13) {
tmp = (x / y) / t;
} else if (z <= -3e-15) {
tmp = t_1;
} else if (z <= 7e-120) {
tmp = (x / t) / y;
} else if (z <= 1.4e-13) {
tmp = (x / -y) / z;
} else if (z <= 7e+84) {
tmp = x / -(z * 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 <= (-2.6d+45)) then
tmp = t_1
else if (z <= (-1.3d-13)) then
tmp = (x / y) / t
else if (z <= (-3d-15)) then
tmp = t_1
else if (z <= 7d-120) then
tmp = (x / t) / y
else if (z <= 1.4d-13) then
tmp = (x / -y) / z
else if (z <= 7d+84) then
tmp = x / -(z * 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 <= -2.6e+45) {
tmp = t_1;
} else if (z <= -1.3e-13) {
tmp = (x / y) / t;
} else if (z <= -3e-15) {
tmp = t_1;
} else if (z <= 7e-120) {
tmp = (x / t) / y;
} else if (z <= 1.4e-13) {
tmp = (x / -y) / z;
} else if (z <= 7e+84) {
tmp = x / -(z * 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 <= -2.6e+45: tmp = t_1 elif z <= -1.3e-13: tmp = (x / y) / t elif z <= -3e-15: tmp = t_1 elif z <= 7e-120: tmp = (x / t) / y elif z <= 1.4e-13: tmp = (x / -y) / z elif z <= 7e+84: tmp = x / -(z * 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(Float64(x / z) / z) tmp = 0.0 if (z <= -2.6e+45) tmp = t_1; elseif (z <= -1.3e-13) tmp = Float64(Float64(x / y) / t); elseif (z <= -3e-15) tmp = t_1; elseif (z <= 7e-120) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.4e-13) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 7e+84) tmp = Float64(x / Float64(-Float64(z * 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 <= -2.6e+45)
tmp = t_1;
elseif (z <= -1.3e-13)
tmp = (x / y) / t;
elseif (z <= -3e-15)
tmp = t_1;
elseif (z <= 7e-120)
tmp = (x / t) / y;
elseif (z <= 1.4e-13)
tmp = (x / -y) / z;
elseif (z <= 7e+84)
tmp = x / -(z * 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.6e+45], t$95$1, If[LessEqual[z, -1.3e-13], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -3e-15], t$95$1, If[LessEqual[z, 7e-120], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.4e-13], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e+84], N[(x / (-N[(z * 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{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-120}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{-z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.60000000000000007e45 or -1.3e-13 < z < -3e-15 or 6.9999999999999998e84 < z Initial program 89.5%
Taylor expanded in y around 0 84.3%
associate-*r/84.3%
neg-mul-184.3%
Simplified84.3%
div-inv84.3%
add-sqr-sqrt42.5%
sqrt-unprod68.8%
sqr-neg68.8%
sqrt-unprod36.4%
add-sqr-sqrt72.2%
associate-/r*71.5%
Applied egg-rr71.5%
*-commutative71.5%
associate-*l/70.0%
associate-*r/70.0%
associate-*l/70.0%
*-lft-identity70.0%
Simplified70.0%
Taylor expanded in t around 0 65.9%
associate-*r/92.4%
neg-mul-192.4%
Simplified65.9%
div-inv65.9%
frac-2neg65.9%
add-sqr-sqrt31.4%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod40.6%
add-sqr-sqrt81.2%
distribute-neg-frac281.2%
distribute-frac-neg81.2%
remove-double-neg81.2%
Applied egg-rr81.2%
un-div-inv81.2%
Applied egg-rr81.2%
if -2.60000000000000007e45 < z < -1.3e-13Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -3e-15 < z < 7e-120Initial program 95.0%
associate-/l/92.5%
div-inv92.6%
Applied egg-rr92.6%
clear-num92.5%
associate-*l/94.1%
*-un-lft-identity94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 69.1%
associate-/r*67.5%
Simplified67.5%
if 7e-120 < z < 1.4000000000000001e-13Initial program 95.4%
Taylor expanded in y around inf 71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 49.7%
mul-1-neg49.7%
associate-/r*57.0%
distribute-neg-frac257.0%
Simplified57.0%
if 1.4000000000000001e-13 < z < 6.9999999999999998e84Initial program 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 58.7%
Taylor expanded in y around 0 45.2%
associate-*r/45.2%
mul-1-neg45.2%
Simplified45.2%
Final simplification68.9%
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 -6.4e+42)
t_1
(if (<= z -1.5e-14)
(/ (/ x y) t)
(if (<= z -4e-15)
t_1
(if (<= z 3.8e-108)
(/ (/ x t) y)
(if (<= z 2.5e-19)
(/ x (* y (- z)))
(if (<= z 1.95e+85) (/ x (- (* z 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 <= -6.4e+42) {
tmp = t_1;
} else if (z <= -1.5e-14) {
tmp = (x / y) / t;
} else if (z <= -4e-15) {
tmp = t_1;
} else if (z <= 3.8e-108) {
tmp = (x / t) / y;
} else if (z <= 2.5e-19) {
tmp = x / (y * -z);
} else if (z <= 1.95e+85) {
tmp = x / -(z * 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 <= (-6.4d+42)) then
tmp = t_1
else if (z <= (-1.5d-14)) then
tmp = (x / y) / t
else if (z <= (-4d-15)) then
tmp = t_1
else if (z <= 3.8d-108) then
tmp = (x / t) / y
else if (z <= 2.5d-19) then
tmp = x / (y * -z)
else if (z <= 1.95d+85) then
tmp = x / -(z * 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 <= -6.4e+42) {
tmp = t_1;
} else if (z <= -1.5e-14) {
tmp = (x / y) / t;
} else if (z <= -4e-15) {
tmp = t_1;
} else if (z <= 3.8e-108) {
tmp = (x / t) / y;
} else if (z <= 2.5e-19) {
tmp = x / (y * -z);
} else if (z <= 1.95e+85) {
tmp = x / -(z * 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 <= -6.4e+42: tmp = t_1 elif z <= -1.5e-14: tmp = (x / y) / t elif z <= -4e-15: tmp = t_1 elif z <= 3.8e-108: tmp = (x / t) / y elif z <= 2.5e-19: tmp = x / (y * -z) elif z <= 1.95e+85: tmp = x / -(z * 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(Float64(x / z) / z) tmp = 0.0 if (z <= -6.4e+42) tmp = t_1; elseif (z <= -1.5e-14) tmp = Float64(Float64(x / y) / t); elseif (z <= -4e-15) tmp = t_1; elseif (z <= 3.8e-108) tmp = Float64(Float64(x / t) / y); elseif (z <= 2.5e-19) tmp = Float64(x / Float64(y * Float64(-z))); elseif (z <= 1.95e+85) tmp = Float64(x / Float64(-Float64(z * 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 <= -6.4e+42)
tmp = t_1;
elseif (z <= -1.5e-14)
tmp = (x / y) / t;
elseif (z <= -4e-15)
tmp = t_1;
elseif (z <= 3.8e-108)
tmp = (x / t) / y;
elseif (z <= 2.5e-19)
tmp = x / (y * -z);
elseif (z <= 1.95e+85)
tmp = x / -(z * 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -6.4e+42], t$95$1, If[LessEqual[z, -1.5e-14], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -4e-15], t$95$1, If[LessEqual[z, 3.8e-108], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.5e-19], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+85], N[(x / (-N[(z * 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{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+85}:\\
\;\;\;\;\frac{x}{-z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.40000000000000004e42 or -1.4999999999999999e-14 < z < -4.0000000000000003e-15 or 1.95000000000000017e85 < z Initial program 89.4%
Taylor expanded in y around 0 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
div-inv84.2%
add-sqr-sqrt42.0%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod36.8%
add-sqr-sqrt71.9%
associate-/r*71.2%
Applied egg-rr71.2%
*-commutative71.2%
associate-*l/69.7%
associate-*r/69.7%
associate-*l/69.7%
*-lft-identity69.7%
Simplified69.7%
Taylor expanded in t around 0 65.6%
associate-*r/92.3%
neg-mul-192.3%
Simplified65.6%
div-inv65.6%
frac-2neg65.6%
add-sqr-sqrt30.7%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod41.0%
add-sqr-sqrt81.0%
distribute-neg-frac281.0%
distribute-frac-neg81.0%
remove-double-neg81.0%
Applied egg-rr81.0%
un-div-inv81.1%
Applied egg-rr81.1%
if -6.40000000000000004e42 < z < -1.4999999999999999e-14Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -4.0000000000000003e-15 < z < 3.79999999999999973e-108Initial program 95.1%
associate-/l/92.7%
div-inv92.7%
Applied egg-rr92.7%
clear-num92.6%
associate-*l/94.2%
*-un-lft-identity94.2%
Applied egg-rr94.2%
Taylor expanded in z around 0 69.7%
associate-/r*68.1%
Simplified68.1%
if 3.79999999999999973e-108 < z < 2.5000000000000002e-19Initial program 94.9%
associate-/l/95.0%
Simplified95.0%
Taylor expanded in t around 0 59.5%
associate-*r/59.5%
neg-mul-159.5%
Simplified59.5%
Taylor expanded in z around 0 54.2%
associate-*r/54.2%
mul-1-neg54.2%
*-commutative54.2%
Simplified54.2%
if 2.5000000000000002e-19 < z < 1.95000000000000017e85Initial program 99.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 56.6%
Taylor expanded in y around 0 43.7%
associate-*r/43.7%
mul-1-neg43.7%
Simplified43.7%
Final simplification68.7%
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 -2.75e+42)
t_1
(if (<= z -4.8e-15)
(/ (/ x y) t)
(if (<= z -2.8e-15)
t_1
(if (<= z 2.5e-65)
(/ (/ x t) y)
(if (<= z 7.6e+84) (/ x (- (* z 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 <= -2.75e+42) {
tmp = t_1;
} else if (z <= -4.8e-15) {
tmp = (x / y) / t;
} else if (z <= -2.8e-15) {
tmp = t_1;
} else if (z <= 2.5e-65) {
tmp = (x / t) / y;
} else if (z <= 7.6e+84) {
tmp = x / -(z * 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 <= (-2.75d+42)) then
tmp = t_1
else if (z <= (-4.8d-15)) then
tmp = (x / y) / t
else if (z <= (-2.8d-15)) then
tmp = t_1
else if (z <= 2.5d-65) then
tmp = (x / t) / y
else if (z <= 7.6d+84) then
tmp = x / -(z * 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 <= -2.75e+42) {
tmp = t_1;
} else if (z <= -4.8e-15) {
tmp = (x / y) / t;
} else if (z <= -2.8e-15) {
tmp = t_1;
} else if (z <= 2.5e-65) {
tmp = (x / t) / y;
} else if (z <= 7.6e+84) {
tmp = x / -(z * 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 <= -2.75e+42: tmp = t_1 elif z <= -4.8e-15: tmp = (x / y) / t elif z <= -2.8e-15: tmp = t_1 elif z <= 2.5e-65: tmp = (x / t) / y elif z <= 7.6e+84: tmp = x / -(z * 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(Float64(x / z) / z) tmp = 0.0 if (z <= -2.75e+42) tmp = t_1; elseif (z <= -4.8e-15) tmp = Float64(Float64(x / y) / t); elseif (z <= -2.8e-15) tmp = t_1; elseif (z <= 2.5e-65) tmp = Float64(Float64(x / t) / y); elseif (z <= 7.6e+84) tmp = Float64(x / Float64(-Float64(z * 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 <= -2.75e+42)
tmp = t_1;
elseif (z <= -4.8e-15)
tmp = (x / y) / t;
elseif (z <= -2.8e-15)
tmp = t_1;
elseif (z <= 2.5e-65)
tmp = (x / t) / y;
elseif (z <= 7.6e+84)
tmp = x / -(z * 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.75e+42], t$95$1, If[LessEqual[z, -4.8e-15], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -2.8e-15], t$95$1, If[LessEqual[z, 2.5e-65], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 7.6e+84], N[(x / (-N[(z * 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{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{-z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.75000000000000001e42 or -4.7999999999999999e-15 < z < -2.80000000000000014e-15 or 7.6000000000000002e84 < z Initial program 89.5%
Taylor expanded in y around 0 84.3%
associate-*r/84.3%
neg-mul-184.3%
Simplified84.3%
div-inv84.3%
add-sqr-sqrt42.5%
sqrt-unprod68.8%
sqr-neg68.8%
sqrt-unprod36.4%
add-sqr-sqrt72.2%
associate-/r*71.5%
Applied egg-rr71.5%
*-commutative71.5%
associate-*l/70.0%
associate-*r/70.0%
associate-*l/70.0%
*-lft-identity70.0%
Simplified70.0%
Taylor expanded in t around 0 65.9%
associate-*r/92.4%
neg-mul-192.4%
Simplified65.9%
div-inv65.9%
frac-2neg65.9%
add-sqr-sqrt31.4%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod40.6%
add-sqr-sqrt81.2%
distribute-neg-frac281.2%
distribute-frac-neg81.2%
remove-double-neg81.2%
Applied egg-rr81.2%
un-div-inv81.2%
Applied egg-rr81.2%
if -2.75000000000000001e42 < z < -4.7999999999999999e-15Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -2.80000000000000014e-15 < z < 2.49999999999999991e-65Initial program 95.5%
associate-/l/93.3%
div-inv93.4%
Applied egg-rr93.4%
clear-num93.3%
associate-*l/94.8%
*-un-lft-identity94.8%
Applied egg-rr94.8%
Taylor expanded in z around 0 68.7%
associate-/r*67.9%
Simplified67.9%
if 2.49999999999999991e-65 < z < 7.6000000000000002e84Initial program 96.8%
associate-/l/97.0%
Simplified97.0%
Taylor expanded in t around inf 52.2%
Taylor expanded in y around 0 39.4%
associate-*r/39.4%
mul-1-neg39.4%
Simplified39.4%
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
(let* ((t_1 (/ (/ x z) (- z t))))
(if (<= y -5.0)
(/ (/ x y) (- t z))
(if (<= y -5.2e-46)
t_1
(if (<= y -8e-72)
(/ x (* (- y z) t))
(if (<= y 3.9e-280) t_1 (/ (/ x t) (- y z))))))))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 (y <= -5.0) {
tmp = (x / y) / (t - z);
} else if (y <= -5.2e-46) {
tmp = t_1;
} else if (y <= -8e-72) {
tmp = x / ((y - z) * t);
} else if (y <= 3.9e-280) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / z) / (z - t)
if (y <= (-5.0d0)) then
tmp = (x / y) / (t - z)
else if (y <= (-5.2d-46)) then
tmp = t_1
else if (y <= (-8d-72)) then
tmp = x / ((y - z) * t)
else if (y <= 3.9d-280) then
tmp = t_1
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 t_1 = (x / z) / (z - t);
double tmp;
if (y <= -5.0) {
tmp = (x / y) / (t - z);
} else if (y <= -5.2e-46) {
tmp = t_1;
} else if (y <= -8e-72) {
tmp = x / ((y - z) * t);
} else if (y <= 3.9e-280) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
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 y <= -5.0: tmp = (x / y) / (t - z) elif y <= -5.2e-46: tmp = t_1 elif y <= -8e-72: tmp = x / ((y - z) * t) elif y <= 3.9e-280: tmp = t_1 else: tmp = (x / t) / (y - z) 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 (y <= -5.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -5.2e-46) tmp = t_1; elseif (y <= -8e-72) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (y <= 3.9e-280) tmp = t_1; 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)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (y <= -5.0)
tmp = (x / y) / (t - z);
elseif (y <= -5.2e-46)
tmp = t_1;
elseif (y <= -8e-72)
tmp = x / ((y - z) * t);
elseif (y <= 3.9e-280)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-46], t$95$1, If[LessEqual[y, -8e-72], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e-280], t$95$1, 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}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;y \leq -5:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-72}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-280}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5Initial program 88.6%
associate-/l/98.3%
div-inv98.3%
Applied egg-rr98.3%
clear-num98.2%
associate-*l/98.4%
*-un-lft-identity98.4%
Applied egg-rr98.4%
Taylor expanded in y around inf 84.4%
associate-/r*89.0%
Simplified89.0%
if -5 < y < -5.2000000000000004e-46 or -7.9999999999999997e-72 < y < 3.89999999999999998e-280Initial program 97.4%
Taylor expanded in y around 0 86.4%
associate-*r/86.4%
neg-mul-186.4%
Simplified86.4%
div-inv85.1%
add-sqr-sqrt42.5%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod21.1%
add-sqr-sqrt43.7%
associate-/r*43.7%
Applied egg-rr43.7%
*-commutative43.7%
associate-*l/43.7%
associate-*r/46.7%
associate-*l/46.7%
*-lft-identity46.7%
Simplified46.7%
frac-2neg46.7%
div-inv46.7%
distribute-neg-frac246.7%
sub-neg46.7%
distribute-neg-in46.7%
remove-double-neg46.7%
add-sqr-sqrt19.5%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod50.4%
add-sqr-sqrt89.6%
Applied egg-rr89.6%
associate-*l/83.6%
associate-*r/83.6%
*-rgt-identity83.6%
+-commutative83.6%
unsub-neg83.6%
Simplified83.6%
if -5.2000000000000004e-46 < y < -7.9999999999999997e-72Initial program 85.9%
Taylor expanded in t around inf 72.6%
if 3.89999999999999998e-280 < y Initial program 94.9%
associate-/l/95.6%
Simplified95.6%
Taylor expanded in t around inf 60.1%
Final simplification73.9%
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 (* (- y z) t))))
(if (<= z -3.3e+45)
(/ x (* z (+ z t)))
(if (<= z 1.95e-101)
t_1
(if (<= z 9.5e-30)
(/ (/ x (- y)) z)
(if (<= z 1.18e+85) t_1 (/ 1.0 (* z (/ z x)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -3.3e+45) {
tmp = x / (z * (z + t));
} else if (z <= 1.95e-101) {
tmp = t_1;
} else if (z <= 9.5e-30) {
tmp = (x / -y) / z;
} else if (z <= 1.18e+85) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
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 / ((y - z) * t)
if (z <= (-3.3d+45)) then
tmp = x / (z * (z + t))
else if (z <= 1.95d-101) then
tmp = t_1
else if (z <= 9.5d-30) then
tmp = (x / -y) / z
else if (z <= 1.18d+85) then
tmp = t_1
else
tmp = 1.0d0 / (z * (z / x))
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 / ((y - z) * t);
double tmp;
if (z <= -3.3e+45) {
tmp = x / (z * (z + t));
} else if (z <= 1.95e-101) {
tmp = t_1;
} else if (z <= 9.5e-30) {
tmp = (x / -y) / z;
} else if (z <= 1.18e+85) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if z <= -3.3e+45: tmp = x / (z * (z + t)) elif z <= 1.95e-101: tmp = t_1 elif z <= 9.5e-30: tmp = (x / -y) / z elif z <= 1.18e+85: tmp = t_1 else: tmp = 1.0 / (z * (z / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -3.3e+45) tmp = Float64(x / Float64(z * Float64(z + t))); elseif (z <= 1.95e-101) tmp = t_1; elseif (z <= 9.5e-30) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 1.18e+85) tmp = t_1; else tmp = Float64(1.0 / Float64(z * Float64(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 = x / ((y - z) * t);
tmp = 0.0;
if (z <= -3.3e+45)
tmp = x / (z * (z + t));
elseif (z <= 1.95e-101)
tmp = t_1;
elseif (z <= 9.5e-30)
tmp = (x / -y) / z;
elseif (z <= 1.18e+85)
tmp = t_1;
else
tmp = 1.0 / (z * (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[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+45], N[(x / N[(z * N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-101], t$95$1, If[LessEqual[z, 9.5e-30], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.18e+85], t$95$1, N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+45}:\\
\;\;\;\;\frac{x}{z \cdot \left(z + t\right)}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -3.3000000000000001e45Initial program 95.7%
Taylor expanded in y around 0 87.5%
associate-*r/87.5%
neg-mul-187.5%
Simplified87.5%
div-inv87.5%
add-sqr-sqrt43.7%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod41.7%
add-sqr-sqrt74.8%
associate-/r*74.8%
Applied egg-rr74.8%
*-commutative74.8%
associate-*l/72.7%
associate-*r/72.7%
associate-*l/72.7%
*-lft-identity72.7%
Simplified72.7%
*-un-lft-identity72.7%
associate-/l/74.8%
sub-neg74.8%
distribute-rgt-in63.9%
add-sqr-sqrt63.9%
sqrt-unprod63.9%
sqr-neg63.9%
sqrt-unprod0.0%
add-sqr-sqrt74.5%
+-commutative74.5%
distribute-rgt-out87.5%
Applied egg-rr87.5%
*-lft-identity87.5%
Simplified87.5%
if -3.3000000000000001e45 < z < 1.95000000000000008e-101 or 9.49999999999999939e-30 < z < 1.17999999999999997e85Initial program 96.5%
Taylor expanded in t around inf 72.0%
if 1.95000000000000008e-101 < z < 9.49999999999999939e-30Initial program 93.5%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in t around 0 54.6%
mul-1-neg54.6%
associate-/r*58.8%
distribute-neg-frac258.8%
Simplified58.8%
if 1.17999999999999997e85 < z Initial program 84.0%
Taylor expanded in y around 0 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
div-inv81.3%
add-sqr-sqrt42.3%
sqrt-unprod66.7%
sqr-neg66.7%
sqrt-unprod32.5%
add-sqr-sqrt71.3%
associate-/r*70.0%
Applied egg-rr70.0%
*-commutative70.0%
associate-*l/68.9%
associate-*r/68.9%
associate-*l/68.9%
*-lft-identity68.9%
Simplified68.9%
Taylor expanded in t around 0 64.8%
associate-*r/92.8%
neg-mul-192.8%
Simplified64.8%
div-inv64.8%
frac-2neg64.8%
add-sqr-sqrt34.1%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod38.9%
add-sqr-sqrt81.0%
distribute-neg-frac281.0%
distribute-frac-neg81.0%
remove-double-neg81.0%
Applied egg-rr81.0%
clear-num81.0%
frac-times81.9%
metadata-eval81.9%
Applied egg-rr81.9%
Final simplification76.1%
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 (* (- y z) t))))
(if (<= z -4.5e+133)
(/ (/ x z) z)
(if (<= z 1.95e-101)
t_1
(if (<= z 9.2e-30)
(/ (/ x (- y)) z)
(if (<= z 5.6e+55) t_1 (/ 1.0 (* z (/ z x)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * t);
double tmp;
if (z <= -4.5e+133) {
tmp = (x / z) / z;
} else if (z <= 1.95e-101) {
tmp = t_1;
} else if (z <= 9.2e-30) {
tmp = (x / -y) / z;
} else if (z <= 5.6e+55) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
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 / ((y - z) * t)
if (z <= (-4.5d+133)) then
tmp = (x / z) / z
else if (z <= 1.95d-101) then
tmp = t_1
else if (z <= 9.2d-30) then
tmp = (x / -y) / z
else if (z <= 5.6d+55) then
tmp = t_1
else
tmp = 1.0d0 / (z * (z / x))
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 / ((y - z) * t);
double tmp;
if (z <= -4.5e+133) {
tmp = (x / z) / z;
} else if (z <= 1.95e-101) {
tmp = t_1;
} else if (z <= 9.2e-30) {
tmp = (x / -y) / z;
} else if (z <= 5.6e+55) {
tmp = t_1;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / ((y - z) * t) tmp = 0 if z <= -4.5e+133: tmp = (x / z) / z elif z <= 1.95e-101: tmp = t_1 elif z <= 9.2e-30: tmp = (x / -y) / z elif z <= 5.6e+55: tmp = t_1 else: tmp = 1.0 / (z * (z / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -4.5e+133) tmp = Float64(Float64(x / z) / z); elseif (z <= 1.95e-101) tmp = t_1; elseif (z <= 9.2e-30) tmp = Float64(Float64(x / Float64(-y)) / z); elseif (z <= 5.6e+55) tmp = t_1; else tmp = Float64(1.0 / Float64(z * Float64(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 = x / ((y - z) * t);
tmp = 0.0;
if (z <= -4.5e+133)
tmp = (x / z) / z;
elseif (z <= 1.95e-101)
tmp = t_1;
elseif (z <= 9.2e-30)
tmp = (x / -y) / z;
elseif (z <= 5.6e+55)
tmp = t_1;
else
tmp = 1.0 / (z * (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[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+133], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.95e-101], t$95$1, If[LessEqual[z, 9.2e-30], N[(N[(x / (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.6e+55], t$95$1, N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+133}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -4.49999999999999985e133Initial program 99.8%
Taylor expanded in y around 0 99.8%
associate-*r/99.8%
neg-mul-199.8%
Simplified99.8%
div-inv99.8%
add-sqr-sqrt44.0%
sqrt-unprod84.2%
sqr-neg84.2%
sqrt-unprod52.1%
add-sqr-sqrt96.1%
associate-/r*96.1%
Applied egg-rr96.1%
*-commutative96.1%
associate-*l/96.0%
associate-*r/96.0%
associate-*l/96.0%
*-lft-identity96.0%
Simplified96.0%
Taylor expanded in t around 0 96.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified96.0%
div-inv96.0%
frac-2neg96.0%
add-sqr-sqrt44.0%
sqrt-unprod88.2%
sqr-neg88.2%
sqrt-unprod55.9%
add-sqr-sqrt100.0%
distribute-neg-frac2100.0%
distribute-frac-neg100.0%
remove-double-neg100.0%
Applied egg-rr100.0%
un-div-inv100.0%
Applied egg-rr100.0%
if -4.49999999999999985e133 < z < 1.95000000000000008e-101 or 9.19999999999999937e-30 < z < 5.6000000000000002e55Initial program 95.6%
Taylor expanded in t around inf 66.7%
if 1.95000000000000008e-101 < z < 9.19999999999999937e-30Initial program 93.5%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in t around 0 54.6%
mul-1-neg54.6%
associate-/r*58.8%
distribute-neg-frac258.8%
Simplified58.8%
if 5.6000000000000002e55 < z Initial program 85.6%
Taylor expanded in y around 0 83.2%
associate-*r/83.2%
neg-mul-183.2%
Simplified83.2%
div-inv83.2%
add-sqr-sqrt43.1%
sqrt-unprod66.7%
sqr-neg66.7%
sqrt-unprod32.7%
add-sqr-sqrt70.9%
associate-/r*69.7%
Applied egg-rr69.7%
*-commutative69.7%
associate-*l/68.7%
associate-*r/68.7%
associate-*l/68.7%
*-lft-identity68.7%
Simplified68.7%
Taylor expanded in t around 0 60.4%
associate-*r/85.5%
neg-mul-185.5%
Simplified60.4%
div-inv60.4%
frac-2neg60.4%
add-sqr-sqrt30.9%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod36.8%
add-sqr-sqrt74.9%
distribute-neg-frac274.9%
distribute-frac-neg74.9%
remove-double-neg74.9%
Applied egg-rr74.9%
clear-num74.9%
frac-times75.7%
metadata-eval75.7%
Applied egg-rr75.7%
Final simplification71.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 -4.7e+42)
t_1
(if (<= z -1.05e-14)
(/ (/ x y) t)
(if (or (<= z -1.15e-15) (not (<= z 3.1e-69))) t_1 (/ (/ x t) y))))))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 <= -4.7e+42) {
tmp = t_1;
} else if (z <= -1.05e-14) {
tmp = (x / y) / t;
} else if ((z <= -1.15e-15) || !(z <= 3.1e-69)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-4.7d+42)) then
tmp = t_1
else if (z <= (-1.05d-14)) then
tmp = (x / y) / t
else if ((z <= (-1.15d-15)) .or. (.not. (z <= 3.1d-69))) then
tmp = t_1
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 t_1 = (x / z) / z;
double tmp;
if (z <= -4.7e+42) {
tmp = t_1;
} else if (z <= -1.05e-14) {
tmp = (x / y) / t;
} else if ((z <= -1.15e-15) || !(z <= 3.1e-69)) {
tmp = t_1;
} else {
tmp = (x / t) / y;
}
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 <= -4.7e+42: tmp = t_1 elif z <= -1.05e-14: tmp = (x / y) / t elif (z <= -1.15e-15) or not (z <= 3.1e-69): tmp = t_1 else: tmp = (x / t) / y 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 <= -4.7e+42) tmp = t_1; elseif (z <= -1.05e-14) tmp = Float64(Float64(x / y) / t); elseif ((z <= -1.15e-15) || !(z <= 3.1e-69)) tmp = t_1; 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)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -4.7e+42)
tmp = t_1;
elseif (z <= -1.05e-14)
tmp = (x / y) / t;
elseif ((z <= -1.15e-15) || ~((z <= 3.1e-69)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -4.7e+42], t$95$1, If[LessEqual[z, -1.05e-14], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, -1.15e-15], N[Not[LessEqual[z, 3.1e-69]], $MachinePrecision]], t$95$1, N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]
\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 -4.7 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-15} \lor \neg \left(z \leq 3.1 \cdot 10^{-69}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -4.69999999999999986e42 or -1.0499999999999999e-14 < z < -1.14999999999999995e-15 or 3.0999999999999999e-69 < z Initial program 91.4%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
neg-mul-178.2%
Simplified78.2%
div-inv78.2%
add-sqr-sqrt37.3%
sqrt-unprod60.0%
sqr-neg60.0%
sqrt-unprod29.7%
add-sqr-sqrt59.7%
associate-/r*59.2%
Applied egg-rr59.2%
*-commutative59.2%
associate-*l/58.1%
associate-*r/58.1%
associate-*l/58.1%
*-lft-identity58.1%
Simplified58.1%
Taylor expanded in t around 0 51.6%
associate-*r/83.8%
neg-mul-183.8%
Simplified51.6%
div-inv51.6%
frac-2neg51.6%
add-sqr-sqrt24.6%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod34.0%
add-sqr-sqrt67.0%
distribute-neg-frac267.0%
distribute-frac-neg67.0%
remove-double-neg67.0%
Applied egg-rr67.0%
un-div-inv67.0%
Applied egg-rr67.0%
if -4.69999999999999986e42 < z < -1.0499999999999999e-14Initial program 99.8%
associate-/l/100.0%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 44.3%
associate-/l/50.3%
Simplified50.3%
if -1.14999999999999995e-15 < z < 3.0999999999999999e-69Initial program 95.4%
associate-/l/93.2%
div-inv93.3%
Applied egg-rr93.3%
clear-num93.2%
associate-*l/94.7%
*-un-lft-identity94.7%
Applied egg-rr94.7%
Taylor expanded in z around 0 69.7%
associate-/r*68.2%
Simplified68.2%
Final simplification66.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z t))))
(if (<= z -1.2e+59)
t_1
(if (<= z -1.12e-32)
(/ (/ x y) t)
(if (<= z 3.4e+62)
(/ (/ x t) y)
(if (<= z 1.25e+183) (/ x (* y 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 * t);
double tmp;
if (z <= -1.2e+59) {
tmp = t_1;
} else if (z <= -1.12e-32) {
tmp = (x / y) / t;
} else if (z <= 3.4e+62) {
tmp = (x / t) / y;
} else if (z <= 1.25e+183) {
tmp = x / (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 = x / (z * t)
if (z <= (-1.2d+59)) then
tmp = t_1
else if (z <= (-1.12d-32)) then
tmp = (x / y) / t
else if (z <= 3.4d+62) then
tmp = (x / t) / y
else if (z <= 1.25d+183) then
tmp = x / (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 = x / (z * t);
double tmp;
if (z <= -1.2e+59) {
tmp = t_1;
} else if (z <= -1.12e-32) {
tmp = (x / y) / t;
} else if (z <= 3.4e+62) {
tmp = (x / t) / y;
} else if (z <= 1.25e+183) {
tmp = x / (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 = x / (z * t) tmp = 0 if z <= -1.2e+59: tmp = t_1 elif z <= -1.12e-32: tmp = (x / y) / t elif z <= 3.4e+62: tmp = (x / t) / y elif z <= 1.25e+183: tmp = x / (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(x / Float64(z * t)) tmp = 0.0 if (z <= -1.2e+59) tmp = t_1; elseif (z <= -1.12e-32) tmp = Float64(Float64(x / y) / t); elseif (z <= 3.4e+62) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.25e+183) tmp = Float64(x / 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 = x / (z * t);
tmp = 0.0;
if (z <= -1.2e+59)
tmp = t_1;
elseif (z <= -1.12e-32)
tmp = (x / y) / t;
elseif (z <= 3.4e+62)
tmp = (x / t) / y;
elseif (z <= 1.25e+183)
tmp = x / (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[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+59], t$95$1, If[LessEqual[z, -1.12e-32], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.4e+62], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.25e+183], N[(x / 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{x}{z \cdot t}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+62}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+183}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2000000000000001e59 or 1.25000000000000002e183 < z Initial program 90.4%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around inf 52.2%
Taylor expanded in y around 0 55.0%
associate-*r/55.0%
mul-1-neg55.0%
Simplified55.0%
clear-num55.4%
inv-pow55.4%
*-commutative55.4%
associate-/l*51.3%
add-sqr-sqrt28.5%
sqrt-unprod53.7%
sqr-neg53.7%
sqrt-unprod21.4%
add-sqr-sqrt48.5%
Applied egg-rr48.5%
unpow-148.5%
Simplified48.5%
Taylor expanded in z around 0 54.9%
*-commutative54.9%
Simplified54.9%
if -1.2000000000000001e59 < z < -1.12e-32Initial program 99.6%
associate-/l/99.8%
div-inv99.5%
Applied egg-rr99.5%
clear-num99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 38.4%
associate-/l/42.4%
Simplified42.4%
if -1.12e-32 < z < 3.40000000000000014e62Initial program 95.6%
associate-/l/93.8%
div-inv93.9%
Applied egg-rr93.9%
clear-num93.7%
associate-*l/95.0%
*-un-lft-identity95.0%
Applied egg-rr95.0%
Taylor expanded in z around 0 60.5%
associate-/r*60.6%
Simplified60.6%
if 3.40000000000000014e62 < z < 1.25000000000000002e183Initial program 87.8%
Taylor expanded in y around inf 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in t around 0 27.6%
mul-1-neg27.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
div-inv33.6%
metadata-eval33.6%
frac-2neg33.6%
add-sqr-sqrt0.0%
sqrt-unprod28.6%
frac-times28.6%
metadata-eval28.6%
metadata-eval28.6%
frac-times28.6%
sqrt-unprod25.3%
add-sqr-sqrt25.3%
div-inv25.3%
*-un-lft-identity25.3%
associate-/l/25.4%
Applied egg-rr25.4%
*-lft-identity25.4%
Simplified25.4%
Final simplification53.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 -2.6e-38)
(/ (/ x y) (- t z))
(if (or (<= y -4.4e-77) (not (<= y 2.6e-163)))
(/ (/ x t) (- y z))
(/ x (* z (- z t))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e-38) {
tmp = (x / y) / (t - z);
} else if ((y <= -4.4e-77) || !(y <= 2.6e-163)) {
tmp = (x / t) / (y - z);
} else {
tmp = x / (z * (z - t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.6d-38)) then
tmp = (x / y) / (t - z)
else if ((y <= (-4.4d-77)) .or. (.not. (y <= 2.6d-163))) then
tmp = (x / t) / (y - z)
else
tmp = x / (z * (z - t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e-38) {
tmp = (x / y) / (t - z);
} else if ((y <= -4.4e-77) || !(y <= 2.6e-163)) {
tmp = (x / t) / (y - z);
} else {
tmp = x / (z * (z - t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.6e-38: tmp = (x / y) / (t - z) elif (y <= -4.4e-77) or not (y <= 2.6e-163): tmp = (x / t) / (y - z) else: tmp = x / (z * (z - t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.6e-38) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif ((y <= -4.4e-77) || !(y <= 2.6e-163)) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(x / Float64(z * Float64(z - t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.6e-38)
tmp = (x / y) / (t - z);
elseif ((y <= -4.4e-77) || ~((y <= 2.6e-163)))
tmp = (x / t) / (y - z);
else
tmp = x / (z * (z - t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.6e-38], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.4e-77], N[Not[LessEqual[y, 2.6e-163]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-77} \lor \neg \left(y \leq 2.6 \cdot 10^{-163}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\end{array}
\end{array}
if y < -2.60000000000000011e-38Initial program 89.4%
associate-/l/98.4%
div-inv98.4%
Applied egg-rr98.4%
clear-num98.3%
associate-*l/98.4%
*-un-lft-identity98.4%
Applied egg-rr98.4%
Taylor expanded in y around inf 80.2%
associate-/r*84.5%
Simplified84.5%
if -2.60000000000000011e-38 < y < -4.40000000000000014e-77 or 2.60000000000000002e-163 < y Initial program 93.8%
associate-/l/96.0%
Simplified96.0%
Taylor expanded in t around inf 61.3%
if -4.40000000000000014e-77 < y < 2.60000000000000002e-163Initial program 97.4%
Taylor expanded in y around 0 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
div-inv87.5%
add-sqr-sqrt43.2%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod17.5%
add-sqr-sqrt41.5%
associate-/r*41.5%
Applied egg-rr41.5%
*-commutative41.5%
associate-*l/41.4%
associate-*r/43.9%
associate-*l/43.9%
*-lft-identity43.9%
Simplified43.9%
frac-2neg43.9%
div-inv43.9%
distribute-neg-frac243.9%
sub-neg43.9%
distribute-neg-in43.9%
remove-double-neg43.9%
add-sqr-sqrt19.9%
sqrt-unprod66.2%
sqr-neg66.2%
sqrt-unprod51.0%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
associate-*l/86.3%
associate-*r/86.4%
*-rgt-identity86.4%
+-commutative86.4%
unsub-neg86.4%
Simplified86.4%
Taylor expanded in x around 0 88.6%
Final simplification76.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (- z t)))))
(if (<= z -2000000.0)
t_1
(if (<= z 7.2e-102)
(/ x (* (- y z) t))
(if (<= z 1.2e-29) (/ (/ x (- y)) 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 <= -2000000.0) {
tmp = t_1;
} else if (z <= 7.2e-102) {
tmp = x / ((y - z) * t);
} else if (z <= 1.2e-29) {
tmp = (x / -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 = x / (z * (z - t))
if (z <= (-2000000.0d0)) then
tmp = t_1
else if (z <= 7.2d-102) then
tmp = x / ((y - z) * t)
else if (z <= 1.2d-29) then
tmp = (x / -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 = x / (z * (z - t));
double tmp;
if (z <= -2000000.0) {
tmp = t_1;
} else if (z <= 7.2e-102) {
tmp = x / ((y - z) * t);
} else if (z <= 1.2e-29) {
tmp = (x / -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 = x / (z * (z - t)) tmp = 0 if z <= -2000000.0: tmp = t_1 elif z <= 7.2e-102: tmp = x / ((y - z) * t) elif z <= 1.2e-29: tmp = (x / -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(x / Float64(z * Float64(z - t))) tmp = 0.0 if (z <= -2000000.0) tmp = t_1; elseif (z <= 7.2e-102) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (z <= 1.2e-29) tmp = Float64(Float64(x / 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 = x / (z * (z - t));
tmp = 0.0;
if (z <= -2000000.0)
tmp = t_1;
elseif (z <= 7.2e-102)
tmp = x / ((y - z) * t);
elseif (z <= 1.2e-29)
tmp = (x / -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[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2000000.0], t$95$1, If[LessEqual[z, 7.2e-102], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-29], N[(N[(x / (-y)), $MachinePrecision] / z), $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 \left(z - t\right)}\\
\mathbf{if}\;z \leq -2000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{x}{-y}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2e6 or 1.19999999999999996e-29 < z Initial program 92.2%
Taylor expanded in y around 0 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
div-inv79.8%
add-sqr-sqrt39.6%
sqrt-unprod63.8%
sqr-neg63.8%
sqrt-unprod31.8%
add-sqr-sqrt61.3%
associate-/r*60.5%
Applied egg-rr60.5%
*-commutative60.5%
associate-*l/59.3%
associate-*r/59.3%
associate-*l/59.3%
*-lft-identity59.3%
Simplified59.3%
frac-2neg59.3%
div-inv59.3%
distribute-neg-frac259.3%
sub-neg59.3%
distribute-neg-in59.3%
remove-double-neg59.3%
add-sqr-sqrt27.1%
sqrt-unprod71.7%
sqr-neg71.7%
sqrt-unprod47.2%
add-sqr-sqrt82.4%
Applied egg-rr82.4%
associate-*l/82.4%
associate-*r/82.4%
*-rgt-identity82.4%
+-commutative82.4%
unsub-neg82.4%
Simplified82.4%
Taylor expanded in x around 0 79.8%
if -2e6 < z < 7.2e-102Initial program 95.4%
Taylor expanded in t around inf 77.1%
if 7.2e-102 < z < 1.19999999999999996e-29Initial program 93.5%
Taylor expanded in y around inf 69.8%
*-commutative69.8%
Simplified69.8%
Taylor expanded in t around 0 54.6%
mul-1-neg54.6%
associate-/r*58.8%
distribute-neg-frac258.8%
Simplified58.8%
Final simplification77.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 -1e-242) t_1 (/ (/ x (- t z)) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= -1e-242) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (t - z))
if (t_1 <= (-1d-242)) then
tmp = t_1
else
tmp = (x / (t - z)) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= -1e-242) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= -1e-242: tmp = t_1 else: tmp = (x / (t - z)) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= -1e-242) tmp = t_1; else tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
tmp = 0.0;
if (t_1 <= -1e-242)
tmp = t_1;
else
tmp = (x / (t - z)) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-242], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -1e-242Initial program 98.3%
if -1e-242 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 92.3%
associate-/l/96.9%
Simplified96.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z t))))
(if (<= z -4e+248)
t_1
(if (<= z 1.2e+60)
(/ (/ x t) y)
(if (<= z 2.6e+182) (/ x (* y 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 * t);
double tmp;
if (z <= -4e+248) {
tmp = t_1;
} else if (z <= 1.2e+60) {
tmp = (x / t) / y;
} else if (z <= 2.6e+182) {
tmp = x / (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 = x / (z * t)
if (z <= (-4d+248)) then
tmp = t_1
else if (z <= 1.2d+60) then
tmp = (x / t) / y
else if (z <= 2.6d+182) then
tmp = x / (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 = x / (z * t);
double tmp;
if (z <= -4e+248) {
tmp = t_1;
} else if (z <= 1.2e+60) {
tmp = (x / t) / y;
} else if (z <= 2.6e+182) {
tmp = x / (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 = x / (z * t) tmp = 0 if z <= -4e+248: tmp = t_1 elif z <= 1.2e+60: tmp = (x / t) / y elif z <= 2.6e+182: tmp = x / (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(x / Float64(z * t)) tmp = 0.0 if (z <= -4e+248) tmp = t_1; elseif (z <= 1.2e+60) tmp = Float64(Float64(x / t) / y); elseif (z <= 2.6e+182) tmp = Float64(x / 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 = x / (z * t);
tmp = 0.0;
if (z <= -4e+248)
tmp = t_1;
elseif (z <= 1.2e+60)
tmp = (x / t) / y;
elseif (z <= 2.6e+182)
tmp = x / (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[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+248], t$95$1, If[LessEqual[z, 1.2e+60], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 2.6e+182], N[(x / 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{x}{z \cdot t}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+182}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.00000000000000018e248 or 2.6e182 < z Initial program 87.5%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in t around inf 51.3%
Taylor expanded in y around 0 58.8%
associate-*r/58.8%
mul-1-neg58.8%
Simplified58.8%
clear-num59.6%
inv-pow59.6%
*-commutative59.6%
associate-/l*52.1%
add-sqr-sqrt29.9%
sqrt-unprod56.6%
sqr-neg56.6%
sqrt-unprod22.2%
add-sqr-sqrt49.6%
Applied egg-rr49.6%
unpow-149.6%
Simplified49.6%
Taylor expanded in z around 0 58.8%
*-commutative58.8%
Simplified58.8%
if -4.00000000000000018e248 < z < 1.2e60Initial program 95.8%
associate-/l/95.6%
div-inv95.6%
Applied egg-rr95.6%
clear-num95.5%
associate-*l/96.4%
*-un-lft-identity96.4%
Applied egg-rr96.4%
Taylor expanded in z around 0 51.9%
associate-/r*55.6%
Simplified55.6%
if 1.2e60 < z < 2.6e182Initial program 87.8%
Taylor expanded in y around inf 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in t around 0 27.6%
mul-1-neg27.6%
associate-/r*33.6%
distribute-neg-frac233.6%
Simplified33.6%
div-inv33.6%
metadata-eval33.6%
frac-2neg33.6%
add-sqr-sqrt0.0%
sqrt-unprod28.6%
frac-times28.6%
metadata-eval28.6%
metadata-eval28.6%
frac-times28.6%
sqrt-unprod25.3%
add-sqr-sqrt25.3%
div-inv25.3%
*-un-lft-identity25.3%
associate-/l/25.4%
Applied egg-rr25.4%
*-lft-identity25.4%
Simplified25.4%
Final simplification52.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5.2) (/ x (* y (- t z))) (if (<= y 1.5e-153) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2) {
tmp = x / (y * (t - z));
} else if (y <= 1.5e-153) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.2d0)) then
tmp = x / (y * (t - z))
else if (y <= 1.5d-153) then
tmp = x / (z * (z - t))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2) {
tmp = x / (y * (t - z));
} else if (y <= 1.5e-153) {
tmp = x / (z * (z - t));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -5.2: tmp = x / (y * (t - z)) elif y <= 1.5e-153: tmp = x / (z * (z - t)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5.2) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.5e-153) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5.2)
tmp = x / (y * (t - z));
elseif (y <= 1.5e-153)
tmp = x / (z * (z - t));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5.2], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-153], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-153}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -5.20000000000000018Initial program 88.6%
Taylor expanded in y around inf 84.4%
*-commutative84.4%
Simplified84.4%
if -5.20000000000000018 < y < 1.5e-153Initial program 95.9%
Taylor expanded in y around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
Simplified84.0%
div-inv83.1%
add-sqr-sqrt41.6%
sqrt-unprod53.8%
sqr-neg53.8%
sqrt-unprod19.3%
add-sqr-sqrt40.7%
associate-/r*40.7%
Applied egg-rr40.7%
*-commutative40.7%
associate-*l/40.6%
associate-*r/42.6%
associate-*l/42.6%
*-lft-identity42.6%
Simplified42.6%
frac-2neg42.6%
div-inv42.6%
distribute-neg-frac242.6%
sub-neg42.6%
distribute-neg-in42.6%
remove-double-neg42.6%
add-sqr-sqrt20.3%
sqrt-unprod62.3%
sqr-neg62.3%
sqrt-unprod46.8%
add-sqr-sqrt88.1%
Applied egg-rr88.1%
associate-*l/84.1%
associate-*r/84.1%
*-rgt-identity84.1%
+-commutative84.1%
unsub-neg84.1%
Simplified84.1%
Taylor expanded in x around 0 84.0%
if 1.5e-153 < y Initial program 94.8%
associate-/l/95.4%
Simplified95.4%
Taylor expanded in t around inf 60.2%
Final simplification75.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 (<= y -850.0) (/ x (* y (- t z))) (if (<= y 1.38e-154) (/ x (* z (- z t))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -850.0) {
tmp = x / (y * (t - z));
} else if (y <= 1.38e-154) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-850.0d0)) then
tmp = x / (y * (t - z))
else if (y <= 1.38d-154) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -850.0) {
tmp = x / (y * (t - z));
} else if (y <= 1.38e-154) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -850.0: tmp = x / (y * (t - z)) elif y <= 1.38e-154: tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -850.0) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.38e-154) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -850.0)
tmp = x / (y * (t - z));
elseif (y <= 1.38e-154)
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -850.0], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.38e-154], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -850:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{-154}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -850Initial program 88.6%
Taylor expanded in y around inf 84.4%
*-commutative84.4%
Simplified84.4%
if -850 < y < 1.37999999999999995e-154Initial program 95.9%
Taylor expanded in y around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
Simplified84.0%
div-inv83.1%
add-sqr-sqrt41.6%
sqrt-unprod53.8%
sqr-neg53.8%
sqrt-unprod19.3%
add-sqr-sqrt40.7%
associate-/r*40.7%
Applied egg-rr40.7%
*-commutative40.7%
associate-*l/40.6%
associate-*r/42.6%
associate-*l/42.6%
*-lft-identity42.6%
Simplified42.6%
frac-2neg42.6%
div-inv42.6%
distribute-neg-frac242.6%
sub-neg42.6%
distribute-neg-in42.6%
remove-double-neg42.6%
add-sqr-sqrt20.3%
sqrt-unprod62.3%
sqr-neg62.3%
sqrt-unprod46.8%
add-sqr-sqrt88.1%
Applied egg-rr88.1%
associate-*l/84.1%
associate-*r/84.1%
*-rgt-identity84.1%
+-commutative84.1%
unsub-neg84.1%
Simplified84.1%
Taylor expanded in x around 0 84.0%
if 1.37999999999999995e-154 < y Initial program 94.8%
Taylor expanded in t around inf 62.7%
Final simplification76.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -7.5e+66) (not (<= z 3.45e+20))) (/ x (* z t)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.5e+66) || !(z <= 3.45e+20)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-7.5d+66)) .or. (.not. (z <= 3.45d+20))) then
tmp = x / (z * t)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.5e+66) || !(z <= 3.45e+20)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -7.5e+66) or not (z <= 3.45e+20): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -7.5e+66) || !(z <= 3.45e+20)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(x / Float64(y * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -7.5e+66) || ~((z <= 3.45e+20)))
tmp = x / (z * t);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.5e+66], N[Not[LessEqual[z, 3.45e+20]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+66} \lor \neg \left(z \leq 3.45 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -7.50000000000000024e66 or 3.45e20 < z Initial program 90.5%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 51.6%
Taylor expanded in y around 0 51.6%
associate-*r/51.6%
mul-1-neg51.6%
Simplified51.6%
clear-num52.0%
inv-pow52.0%
*-commutative52.0%
associate-/l*50.1%
add-sqr-sqrt25.6%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod21.0%
add-sqr-sqrt44.8%
Applied egg-rr44.8%
unpow-144.8%
Simplified44.8%
Taylor expanded in z around 0 48.8%
*-commutative48.8%
Simplified48.8%
if -7.50000000000000024e66 < z < 3.45e20Initial program 96.0%
Taylor expanded in z around 0 58.2%
Final simplification54.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z 1.9e+85) (/ x (* (- y z) (- t z))) (/ (/ x z) (- z y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.9e+85) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - y);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 1.9d+85) then
tmp = x / ((y - z) * (t - z))
else
tmp = (x / z) / (z - y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.9e+85) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 1.9e+85: tmp = x / ((y - z) * (t - z)) else: tmp = (x / z) / (z - y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 1.9e+85) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(x / z) / Float64(z - y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 1.9e+85)
tmp = x / ((y - z) * (t - z));
else
tmp = (x / z) / (z - y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, 1.9e+85], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{+85}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\end{array}
\end{array}
if z < 1.89999999999999996e85Initial program 96.1%
if 1.89999999999999996e85 < z Initial program 84.0%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 92.8%
associate-*r/92.8%
neg-mul-192.8%
Simplified92.8%
Final simplification95.4%
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 93.6%
Taylor expanded in z around 0 43.0%
Final simplification43.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024105
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))