
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- y z)) (- t z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (y - z)) / (t - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (t - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 91.2%
Taylor expanded in x around 0 91.2%
associate-/l/97.2%
Simplified97.2%
Final simplification97.2%
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) t)) (t_2 (/ x (* z (- t)))) (t_3 (/ x (* z (- y)))))
(if (<= y -5.6e+192)
t_1
(if (<= y -2e+34)
t_3
(if (<= y -18.0)
t_1
(if (<= y -1.9e-63)
t_2
(if (<= y -9.8e-85) t_3 (if (<= y 7e+20) t_2 t_1))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (z * -t);
double t_3 = x / (z * -y);
double tmp;
if (y <= -5.6e+192) {
tmp = t_1;
} else if (y <= -2e+34) {
tmp = t_3;
} else if (y <= -18.0) {
tmp = t_1;
} else if (y <= -1.9e-63) {
tmp = t_2;
} else if (y <= -9.8e-85) {
tmp = t_3;
} else if (y <= 7e+20) {
tmp = t_2;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / y) / t
t_2 = x / (z * -t)
t_3 = x / (z * -y)
if (y <= (-5.6d+192)) then
tmp = t_1
else if (y <= (-2d+34)) then
tmp = t_3
else if (y <= (-18.0d0)) then
tmp = t_1
else if (y <= (-1.9d-63)) then
tmp = t_2
else if (y <= (-9.8d-85)) then
tmp = t_3
else if (y <= 7d+20) then
tmp = t_2
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 / y) / t;
double t_2 = x / (z * -t);
double t_3 = x / (z * -y);
double tmp;
if (y <= -5.6e+192) {
tmp = t_1;
} else if (y <= -2e+34) {
tmp = t_3;
} else if (y <= -18.0) {
tmp = t_1;
} else if (y <= -1.9e-63) {
tmp = t_2;
} else if (y <= -9.8e-85) {
tmp = t_3;
} else if (y <= 7e+20) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / y) / t t_2 = x / (z * -t) t_3 = x / (z * -y) tmp = 0 if y <= -5.6e+192: tmp = t_1 elif y <= -2e+34: tmp = t_3 elif y <= -18.0: tmp = t_1 elif y <= -1.9e-63: tmp = t_2 elif y <= -9.8e-85: tmp = t_3 elif y <= 7e+20: tmp = t_2 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 / y) / t) t_2 = Float64(x / Float64(z * Float64(-t))) t_3 = Float64(x / Float64(z * Float64(-y))) tmp = 0.0 if (y <= -5.6e+192) tmp = t_1; elseif (y <= -2e+34) tmp = t_3; elseif (y <= -18.0) tmp = t_1; elseif (y <= -1.9e-63) tmp = t_2; elseif (y <= -9.8e-85) tmp = t_3; elseif (y <= 7e+20) tmp = t_2; 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 / y) / t;
t_2 = x / (z * -t);
t_3 = x / (z * -y);
tmp = 0.0;
if (y <= -5.6e+192)
tmp = t_1;
elseif (y <= -2e+34)
tmp = t_3;
elseif (y <= -18.0)
tmp = t_1;
elseif (y <= -1.9e-63)
tmp = t_2;
elseif (y <= -9.8e-85)
tmp = t_3;
elseif (y <= 7e+20)
tmp = t_2;
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 / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e+192], t$95$1, If[LessEqual[y, -2e+34], t$95$3, If[LessEqual[y, -18.0], t$95$1, If[LessEqual[y, -1.9e-63], t$95$2, If[LessEqual[y, -9.8e-85], t$95$3, If[LessEqual[y, 7e+20], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{x}{z \cdot \left(-t\right)}\\
t_3 := \frac{x}{z \cdot \left(-y\right)}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+34}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -18:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{-85}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.59999999999999952e192 or -1.99999999999999989e34 < y < -18 or 7e20 < y Initial program 89.9%
Taylor expanded in x around 0 89.9%
associate-/l/97.4%
Simplified97.4%
Taylor expanded in z around 0 59.1%
*-commutative59.1%
associate-/r*64.5%
Simplified64.5%
if -5.59999999999999952e192 < y < -1.99999999999999989e34 or -1.90000000000000009e-63 < y < -9.80000000000000029e-85Initial program 91.7%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around 0 73.8%
associate-*r/73.8%
neg-mul-173.8%
Simplified73.8%
Taylor expanded in z around 0 60.4%
mul-1-neg60.4%
distribute-neg-frac260.4%
*-commutative60.4%
distribute-rgt-neg-out60.4%
Simplified60.4%
if -18 < y < -1.90000000000000009e-63 or -9.80000000000000029e-85 < y < 7e20Initial program 91.8%
Taylor expanded in t around inf 59.7%
associate-/r*60.7%
Simplified60.7%
Taylor expanded in y around 0 43.9%
mul-1-neg43.9%
distribute-neg-frac243.9%
Simplified43.9%
Final simplification52.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) t)) (t_2 (/ x (* z (- t)))) (t_3 (/ x (* z (- y)))))
(if (<= y -1.2e+192)
t_1
(if (<= y -3.2e+34)
t_3
(if (<= y -780.0)
(* x (/ (/ 1.0 t) y))
(if (<= y -5e-63)
t_2
(if (<= y -2.3e-83) t_3 (if (<= y 8.2e+20) t_2 t_1))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (z * -t);
double t_3 = x / (z * -y);
double tmp;
if (y <= -1.2e+192) {
tmp = t_1;
} else if (y <= -3.2e+34) {
tmp = t_3;
} else if (y <= -780.0) {
tmp = x * ((1.0 / t) / y);
} else if (y <= -5e-63) {
tmp = t_2;
} else if (y <= -2.3e-83) {
tmp = t_3;
} else if (y <= 8.2e+20) {
tmp = t_2;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / y) / t
t_2 = x / (z * -t)
t_3 = x / (z * -y)
if (y <= (-1.2d+192)) then
tmp = t_1
else if (y <= (-3.2d+34)) then
tmp = t_3
else if (y <= (-780.0d0)) then
tmp = x * ((1.0d0 / t) / y)
else if (y <= (-5d-63)) then
tmp = t_2
else if (y <= (-2.3d-83)) then
tmp = t_3
else if (y <= 8.2d+20) then
tmp = t_2
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 / y) / t;
double t_2 = x / (z * -t);
double t_3 = x / (z * -y);
double tmp;
if (y <= -1.2e+192) {
tmp = t_1;
} else if (y <= -3.2e+34) {
tmp = t_3;
} else if (y <= -780.0) {
tmp = x * ((1.0 / t) / y);
} else if (y <= -5e-63) {
tmp = t_2;
} else if (y <= -2.3e-83) {
tmp = t_3;
} else if (y <= 8.2e+20) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / y) / t t_2 = x / (z * -t) t_3 = x / (z * -y) tmp = 0 if y <= -1.2e+192: tmp = t_1 elif y <= -3.2e+34: tmp = t_3 elif y <= -780.0: tmp = x * ((1.0 / t) / y) elif y <= -5e-63: tmp = t_2 elif y <= -2.3e-83: tmp = t_3 elif y <= 8.2e+20: tmp = t_2 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 / y) / t) t_2 = Float64(x / Float64(z * Float64(-t))) t_3 = Float64(x / Float64(z * Float64(-y))) tmp = 0.0 if (y <= -1.2e+192) tmp = t_1; elseif (y <= -3.2e+34) tmp = t_3; elseif (y <= -780.0) tmp = Float64(x * Float64(Float64(1.0 / t) / y)); elseif (y <= -5e-63) tmp = t_2; elseif (y <= -2.3e-83) tmp = t_3; elseif (y <= 8.2e+20) tmp = t_2; 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 / y) / t;
t_2 = x / (z * -t);
t_3 = x / (z * -y);
tmp = 0.0;
if (y <= -1.2e+192)
tmp = t_1;
elseif (y <= -3.2e+34)
tmp = t_3;
elseif (y <= -780.0)
tmp = x * ((1.0 / t) / y);
elseif (y <= -5e-63)
tmp = t_2;
elseif (y <= -2.3e-83)
tmp = t_3;
elseif (y <= 8.2e+20)
tmp = t_2;
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 / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+192], t$95$1, If[LessEqual[y, -3.2e+34], t$95$3, If[LessEqual[y, -780.0], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e-63], t$95$2, If[LessEqual[y, -2.3e-83], t$95$3, If[LessEqual[y, 8.2e+20], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{x}{z \cdot \left(-t\right)}\\
t_3 := \frac{x}{z \cdot \left(-y\right)}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+34}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -780:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-83}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1999999999999999e192 or 8.2e20 < y Initial program 89.0%
Taylor expanded in x around 0 89.0%
associate-/l/97.2%
Simplified97.2%
Taylor expanded in z around 0 59.7%
*-commutative59.7%
associate-/r*65.6%
Simplified65.6%
if -1.1999999999999999e192 < y < -3.1999999999999998e34 or -5.0000000000000002e-63 < y < -2.2999999999999999e-83Initial program 91.7%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in t around 0 73.8%
associate-*r/73.8%
neg-mul-173.8%
Simplified73.8%
Taylor expanded in z around 0 60.4%
mul-1-neg60.4%
distribute-neg-frac260.4%
*-commutative60.4%
distribute-rgt-neg-out60.4%
Simplified60.4%
if -3.1999999999999998e34 < y < -780Initial program 100.0%
Taylor expanded in z around 0 61.9%
clear-num61.9%
associate-/r/61.9%
associate-/r*61.9%
Applied egg-rr61.9%
if -780 < y < -5.0000000000000002e-63 or -2.2999999999999999e-83 < y < 8.2e20Initial program 91.8%
Taylor expanded in t around inf 59.3%
associate-/r*60.3%
Simplified60.3%
Taylor expanded in y around 0 43.6%
mul-1-neg43.6%
distribute-neg-frac243.6%
Simplified43.6%
Final simplification52.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 (<= t -1.05e-71)
(/ (/ x t) y)
(if (<= t 1.46e-158)
(/ x (* z (- y)))
(if (<= t 1.4e+18)
(/ (/ x y) t)
(if (<= t 7.8e+174) (/ x (* z (- t))) (/ 1.0 (/ y (/ x t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e-71) {
tmp = (x / t) / y;
} else if (t <= 1.46e-158) {
tmp = x / (z * -y);
} else if (t <= 1.4e+18) {
tmp = (x / y) / t;
} else if (t <= 7.8e+174) {
tmp = x / (z * -t);
} else {
tmp = 1.0 / (y / (x / t));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.05d-71)) then
tmp = (x / t) / y
else if (t <= 1.46d-158) then
tmp = x / (z * -y)
else if (t <= 1.4d+18) then
tmp = (x / y) / t
else if (t <= 7.8d+174) then
tmp = x / (z * -t)
else
tmp = 1.0d0 / (y / (x / t))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e-71) {
tmp = (x / t) / y;
} else if (t <= 1.46e-158) {
tmp = x / (z * -y);
} else if (t <= 1.4e+18) {
tmp = (x / y) / t;
} else if (t <= 7.8e+174) {
tmp = x / (z * -t);
} else {
tmp = 1.0 / (y / (x / t));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1.05e-71: tmp = (x / t) / y elif t <= 1.46e-158: tmp = x / (z * -y) elif t <= 1.4e+18: tmp = (x / y) / t elif t <= 7.8e+174: tmp = x / (z * -t) else: tmp = 1.0 / (y / (x / t)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.05e-71) tmp = Float64(Float64(x / t) / y); elseif (t <= 1.46e-158) tmp = Float64(x / Float64(z * Float64(-y))); elseif (t <= 1.4e+18) tmp = Float64(Float64(x / y) / t); elseif (t <= 7.8e+174) tmp = Float64(x / Float64(z * Float64(-t))); else tmp = Float64(1.0 / Float64(y / Float64(x / t))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.05e-71)
tmp = (x / t) / y;
elseif (t <= 1.46e-158)
tmp = x / (z * -y);
elseif (t <= 1.4e+18)
tmp = (x / y) / t;
elseif (t <= 7.8e+174)
tmp = x / (z * -t);
else
tmp = 1.0 / (y / (x / t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.05e-71], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.46e-158], N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+18], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 7.8e+174], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{-158}:\\
\;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\
\end{array}
\end{array}
if t < -1.0500000000000001e-71Initial program 91.2%
Taylor expanded in z around 0 51.7%
clear-num53.0%
associate-/r/51.6%
associate-/r*51.7%
Applied egg-rr51.7%
associate-*l/58.5%
associate-*l/58.6%
*-un-lft-identity58.6%
Applied egg-rr58.6%
if -1.0500000000000001e-71 < t < 1.4599999999999999e-158Initial program 91.2%
associate-/l/98.7%
Simplified98.7%
Taylor expanded in t around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
Taylor expanded in z around 0 40.1%
mul-1-neg40.1%
distribute-neg-frac240.1%
*-commutative40.1%
distribute-rgt-neg-out40.1%
Simplified40.1%
if 1.4599999999999999e-158 < t < 1.4e18Initial program 91.8%
Taylor expanded in x around 0 91.8%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in z around 0 37.7%
*-commutative37.7%
associate-/r*42.9%
Simplified42.9%
if 1.4e18 < t < 7.79999999999999962e174Initial program 92.6%
Taylor expanded in t around inf 85.4%
associate-/r*84.3%
Simplified84.3%
Taylor expanded in y around 0 61.1%
mul-1-neg61.1%
distribute-neg-frac261.1%
Simplified61.1%
if 7.79999999999999962e174 < t Initial program 89.5%
Taylor expanded in z around 0 59.7%
clear-num59.7%
associate-/r/59.7%
associate-/r*59.7%
Applied egg-rr59.7%
associate-*l/66.5%
clear-num66.6%
associate-*l/66.6%
*-un-lft-identity66.6%
Applied egg-rr66.6%
Final simplification51.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 y) (- t z))))
(if (<= y -1.4e+93)
t_1
(if (<= y -4.6e+32)
(/ x (* z (- z y)))
(if (<= y -14.0)
t_1
(if (<= y 7e-8) (/ (/ 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 t_1 = (x / y) / (t - z);
double tmp;
if (y <= -1.4e+93) {
tmp = t_1;
} else if (y <= -4.6e+32) {
tmp = x / (z * (z - y));
} else if (y <= -14.0) {
tmp = t_1;
} else if (y <= 7e-8) {
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) :: t_1
real(8) :: tmp
t_1 = (x / y) / (t - z)
if (y <= (-1.4d+93)) then
tmp = t_1
else if (y <= (-4.6d+32)) then
tmp = x / (z * (z - y))
else if (y <= (-14.0d0)) then
tmp = t_1
else if (y <= 7d-8) 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 t_1 = (x / y) / (t - z);
double tmp;
if (y <= -1.4e+93) {
tmp = t_1;
} else if (y <= -4.6e+32) {
tmp = x / (z * (z - y));
} else if (y <= -14.0) {
tmp = t_1;
} else if (y <= 7e-8) {
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): t_1 = (x / y) / (t - z) tmp = 0 if y <= -1.4e+93: tmp = t_1 elif y <= -4.6e+32: tmp = x / (z * (z - y)) elif y <= -14.0: tmp = t_1 elif y <= 7e-8: 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) t_1 = Float64(Float64(x / y) / Float64(t - z)) tmp = 0.0 if (y <= -1.4e+93) tmp = t_1; elseif (y <= -4.6e+32) tmp = Float64(x / Float64(z * Float64(z - y))); elseif (y <= -14.0) tmp = t_1; elseif (y <= 7e-8) tmp = Float64(Float64(x / 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)
t_1 = (x / y) / (t - z);
tmp = 0.0;
if (y <= -1.4e+93)
tmp = t_1;
elseif (y <= -4.6e+32)
tmp = x / (z * (z - y));
elseif (y <= -14.0)
tmp = t_1;
elseif (y <= 7e-8)
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_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+93], t$95$1, If[LessEqual[y, -4.6e+32], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -14.0], t$95$1, If[LessEqual[y, 7e-8], N[(N[(x / z), $MachinePrecision] / N[(z - t), $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}
t_1 := \frac{\frac{x}{y}}{t - z}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{elif}\;y \leq -14:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.39999999999999994e93 or -4.5999999999999999e32 < y < -14Initial program 93.9%
Taylor expanded in y around inf 91.9%
associate-/r*93.9%
Simplified93.9%
if -1.39999999999999994e93 < y < -4.5999999999999999e32Initial program 89.3%
associate-/l/99.8%
div-inv99.5%
div-inv99.3%
associate-*l*88.5%
Applied egg-rr88.5%
*-commutative88.5%
associate-*r*99.5%
div-inv99.8%
clear-num99.7%
frac-times99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 89.2%
mul-1-neg89.2%
associate-/l*89.0%
distribute-lft-neg-out89.0%
*-commutative89.0%
Simplified89.0%
associate-/r*88.8%
add-sqr-sqrt44.1%
clear-num44.1%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod11.5%
add-sqr-sqrt12.6%
associate-/r*12.6%
associate-/l/12.6%
frac-2neg12.6%
div-inv12.6%
distribute-neg-frac212.6%
add-sqr-sqrt1.1%
sqrt-unprod45.6%
sqr-neg45.6%
sqrt-unprod44.1%
add-sqr-sqrt88.6%
sub-neg88.6%
distribute-neg-in88.6%
add-sqr-sqrt44.1%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod22.5%
add-sqr-sqrt55.8%
Applied egg-rr88.6%
associate-*r/89.0%
*-rgt-identity89.0%
associate-/r*89.2%
+-commutative89.2%
unsub-neg89.2%
Simplified89.2%
if -14 < y < 7.00000000000000048e-8Initial program 92.0%
Taylor expanded in x around 0 92.0%
associate-/l/96.4%
Simplified96.4%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
distribute-neg-frac279.6%
Simplified79.6%
if 7.00000000000000048e-8 < y Initial program 87.5%
Taylor expanded in t around inf 57.7%
associate-/r*61.3%
Simplified61.3%
Final simplification78.3%
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 -5e-261) 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 <= -5e-261) {
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 <= (-5d-261)) 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 <= -5e-261) {
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 <= -5e-261: 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 <= -5e-261) 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 <= -5e-261)
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, -5e-261], 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 -5 \cdot 10^{-261}:\\
\;\;\;\;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))) < -4.99999999999999981e-261Initial program 97.8%
if -4.99999999999999981e-261 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 88.8%
associate-/l/99.3%
Simplified99.3%
Final simplification98.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -8.8e-52) (/ (/ x t) y) (if (<= t 1.65e-158) (/ x (* z (- y))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.8e-52) {
tmp = (x / t) / y;
} else if (t <= 1.65e-158) {
tmp = x / (z * -y);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8.8d-52)) then
tmp = (x / t) / y
else if (t <= 1.65d-158) then
tmp = x / (z * -y)
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.8e-52) {
tmp = (x / t) / y;
} else if (t <= 1.65e-158) {
tmp = x / (z * -y);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -8.8e-52: tmp = (x / t) / y elif t <= 1.65e-158: tmp = x / (z * -y) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -8.8e-52) tmp = Float64(Float64(x / t) / y); elseif (t <= 1.65e-158) tmp = Float64(x / Float64(z * Float64(-y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -8.8e-52)
tmp = (x / t) / y;
elseif (t <= 1.65e-158)
tmp = x / (z * -y);
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -8.8e-52], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.65e-158], N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-158}:\\
\;\;\;\;\frac{x}{z \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -8.80000000000000036e-52Initial program 90.5%
Taylor expanded in z around 0 53.4%
clear-num54.9%
associate-/r/53.4%
associate-/r*53.4%
Applied egg-rr53.4%
associate-*l/60.9%
associate-*l/61.0%
*-un-lft-identity61.0%
Applied egg-rr61.0%
if -8.80000000000000036e-52 < t < 1.6500000000000001e-158Initial program 91.8%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around 0 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
Taylor expanded in z around 0 40.6%
mul-1-neg40.6%
distribute-neg-frac240.6%
*-commutative40.6%
distribute-rgt-neg-out40.6%
Simplified40.6%
if 1.6500000000000001e-158 < t Initial program 91.3%
Taylor expanded in t around inf 71.3%
Final simplification57.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.38e-45) (/ (/ x t) y) (if (<= t 5.1e+17) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.38e-45) {
tmp = (x / t) / y;
} else if (t <= 5.1e+17) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.38d-45)) then
tmp = (x / t) / y
else if (t <= 5.1d+17) then
tmp = x / (z * (z - y))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.38e-45) {
tmp = (x / t) / y;
} else if (t <= 5.1e+17) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1.38e-45: tmp = (x / t) / y elif t <= 5.1e+17: tmp = x / (z * (z - y)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.38e-45) tmp = Float64(Float64(x / t) / y); elseif (t <= 5.1e+17) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.38e-45)
tmp = (x / t) / y;
elseif (t <= 5.1e+17)
tmp = x / (z * (z - y));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.38e-45], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5.1e+17], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.38 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.38e-45Initial program 90.5%
Taylor expanded in z around 0 53.4%
clear-num54.9%
associate-/r/53.4%
associate-/r*53.4%
Applied egg-rr53.4%
associate-*l/60.9%
associate-*l/61.0%
*-un-lft-identity61.0%
Applied egg-rr61.0%
if -1.38e-45 < t < 5.1e17Initial program 91.8%
associate-/l/99.1%
div-inv99.0%
div-inv98.8%
associate-*l*91.8%
Applied egg-rr91.8%
*-commutative91.8%
associate-*r*98.1%
div-inv98.2%
clear-num98.2%
frac-times97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Taylor expanded in t around 0 77.2%
mul-1-neg77.2%
associate-/l*84.4%
distribute-lft-neg-out84.4%
*-commutative84.4%
Simplified84.4%
associate-/r*85.1%
add-sqr-sqrt50.8%
clear-num50.8%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod17.7%
add-sqr-sqrt37.4%
associate-/r*36.7%
associate-/l/36.6%
frac-2neg36.6%
div-inv36.6%
distribute-neg-frac236.6%
add-sqr-sqrt18.9%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod34.0%
add-sqr-sqrt84.3%
sub-neg84.3%
distribute-neg-in84.3%
add-sqr-sqrt50.1%
sqrt-unprod67.6%
sqr-neg67.6%
sqrt-unprod25.4%
add-sqr-sqrt56.7%
Applied egg-rr84.3%
associate-*r/84.3%
*-rgt-identity84.3%
associate-/r*77.8%
+-commutative77.8%
unsub-neg77.8%
Simplified77.8%
if 5.1e17 < t Initial program 91.0%
Taylor expanded in t around inf 87.5%
Final simplification74.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -5.2e-141) (/ x (* y (- t z))) (if (<= t 4.6e+17) (/ x (* z (- z y))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.2e-141) {
tmp = x / (y * (t - z));
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5.2d-141)) then
tmp = x / (y * (t - z))
else if (t <= 4.6d+17) then
tmp = x / (z * (z - y))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.2e-141) {
tmp = x / (y * (t - z));
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -5.2e-141: tmp = x / (y * (t - z)) elif t <= 4.6e+17: tmp = x / (z * (z - y)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -5.2e-141) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 4.6e+17) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -5.2e-141)
tmp = x / (y * (t - z));
elseif (t <= 4.6e+17)
tmp = x / (z * (z - y));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -5.2e-141], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+17], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-141}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -5.20000000000000022e-141Initial program 91.5%
Taylor expanded in y around inf 52.8%
*-commutative52.8%
Simplified52.8%
if -5.20000000000000022e-141 < t < 4.6e17Initial program 91.0%
associate-/l/98.9%
div-inv98.8%
div-inv98.6%
associate-*l*91.1%
Applied egg-rr91.1%
*-commutative91.1%
associate-*r*97.7%
div-inv97.9%
clear-num97.8%
frac-times97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 78.9%
mul-1-neg78.9%
associate-/l*86.7%
distribute-lft-neg-out86.7%
*-commutative86.7%
Simplified86.7%
associate-/r*87.5%
add-sqr-sqrt53.5%
clear-num53.5%
sqrt-unprod59.0%
sqr-neg59.0%
sqrt-unprod17.8%
add-sqr-sqrt34.8%
associate-/r*34.0%
associate-/l/33.9%
frac-2neg33.9%
div-inv33.9%
distribute-neg-frac233.9%
add-sqr-sqrt16.1%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod33.7%
add-sqr-sqrt86.5%
sub-neg86.5%
distribute-neg-in86.5%
add-sqr-sqrt52.6%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod26.2%
add-sqr-sqrt57.6%
Applied egg-rr86.5%
associate-*r/86.5%
*-rgt-identity86.5%
associate-/r*79.6%
+-commutative79.6%
unsub-neg79.6%
Simplified79.6%
if 4.6e17 < t Initial program 91.0%
Taylor expanded in t around inf 87.5%
Final simplification70.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.5e-140) (/ x (* y (- t z))) (if (<= t 4.6e+17) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.5e-140) {
tmp = x / (y * (t - z));
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.5d-140)) then
tmp = x / (y * (t - z))
else if (t <= 4.6d+17) then
tmp = x / (z * (z - y))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.5e-140) {
tmp = x / (y * (t - z));
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1.5e-140: tmp = x / (y * (t - z)) elif t <= 4.6e+17: tmp = x / (z * (z - y)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.5e-140) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (t <= 4.6e+17) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.5e-140)
tmp = x / (y * (t - z));
elseif (t <= 4.6e+17)
tmp = x / (z * (z - y));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.5e-140], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+17], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-140}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.50000000000000009e-140Initial program 91.5%
Taylor expanded in y around inf 53.3%
*-commutative53.3%
Simplified53.3%
if -1.50000000000000009e-140 < t < 4.6e17Initial program 91.1%
associate-/l/98.9%
div-inv98.8%
div-inv98.6%
associate-*l*91.2%
Applied egg-rr91.2%
*-commutative91.2%
associate-*r*97.8%
div-inv97.9%
clear-num97.8%
frac-times97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 79.1%
mul-1-neg79.1%
associate-/l*86.8%
distribute-lft-neg-out86.8%
*-commutative86.8%
Simplified86.8%
associate-/r*87.6%
add-sqr-sqrt52.9%
clear-num53.0%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod18.6%
add-sqr-sqrt35.5%
associate-/r*34.6%
associate-/l/34.5%
frac-2neg34.5%
div-inv34.5%
distribute-neg-frac234.5%
add-sqr-sqrt15.9%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod34.4%
add-sqr-sqrt86.6%
sub-neg86.6%
distribute-neg-in86.6%
add-sqr-sqrt52.0%
sqrt-unprod70.4%
sqr-neg70.4%
sqrt-unprod27.0%
add-sqr-sqrt58.0%
Applied egg-rr86.6%
associate-*r/86.7%
*-rgt-identity86.7%
associate-/r*79.8%
+-commutative79.8%
unsub-neg79.8%
Simplified79.8%
if 4.6e17 < t Initial program 91.0%
Taylor expanded in t around inf 87.5%
associate-/r*91.7%
Simplified91.7%
Final simplification71.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -4.5e-141) (/ (/ x y) (- t z)) (if (<= t 4.6e+17) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e-141) {
tmp = (x / y) / (t - z);
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.5d-141)) then
tmp = (x / y) / (t - z)
else if (t <= 4.6d+17) then
tmp = x / (z * (z - y))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e-141) {
tmp = (x / y) / (t - z);
} else if (t <= 4.6e+17) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4.5e-141: tmp = (x / y) / (t - z) elif t <= 4.6e+17: tmp = x / (z * (z - y)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.5e-141) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 4.6e+17) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.5e-141)
tmp = (x / y) / (t - z);
elseif (t <= 4.6e+17)
tmp = x / (z * (z - y));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.5e-141], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+17], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-141}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.5e-141Initial program 91.5%
Taylor expanded in y around inf 52.8%
associate-/r*53.2%
Simplified53.2%
if -4.5e-141 < t < 4.6e17Initial program 91.0%
associate-/l/98.9%
div-inv98.8%
div-inv98.6%
associate-*l*91.1%
Applied egg-rr91.1%
*-commutative91.1%
associate-*r*97.7%
div-inv97.9%
clear-num97.8%
frac-times97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 78.9%
mul-1-neg78.9%
associate-/l*86.7%
distribute-lft-neg-out86.7%
*-commutative86.7%
Simplified86.7%
associate-/r*87.5%
add-sqr-sqrt53.5%
clear-num53.5%
sqrt-unprod59.0%
sqr-neg59.0%
sqrt-unprod17.8%
add-sqr-sqrt34.8%
associate-/r*34.0%
associate-/l/33.9%
frac-2neg33.9%
div-inv33.9%
distribute-neg-frac233.9%
add-sqr-sqrt16.1%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod33.7%
add-sqr-sqrt86.5%
sub-neg86.5%
distribute-neg-in86.5%
add-sqr-sqrt52.6%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod26.2%
add-sqr-sqrt57.6%
Applied egg-rr86.5%
associate-*r/86.5%
*-rgt-identity86.5%
associate-/r*79.6%
+-commutative79.6%
unsub-neg79.6%
Simplified79.6%
if 4.6e17 < t Initial program 91.0%
Taylor expanded in t around inf 87.5%
associate-/r*91.7%
Simplified91.7%
Final simplification71.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.6e-140) (/ (/ x y) (- t z)) (if (<= t 3.7e+18) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e-140) {
tmp = (x / y) / (t - z);
} else if (t <= 3.7e+18) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.6d-140)) then
tmp = (x / y) / (t - z)
else if (t <= 3.7d+18) then
tmp = (x / z) / (z - y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.6e-140) {
tmp = (x / y) / (t - z);
} else if (t <= 3.7e+18) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1.6e-140: tmp = (x / y) / (t - z) elif t <= 3.7e+18: tmp = (x / z) / (z - y) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.6e-140) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.7e+18) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.6e-140)
tmp = (x / y) / (t - z);
elseif (t <= 3.7e+18)
tmp = (x / z) / (z - y);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.6e-140], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+18], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-140}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.6000000000000001e-140Initial program 91.5%
Taylor expanded in y around inf 53.3%
associate-/r*53.6%
Simplified53.6%
if -1.6000000000000001e-140 < t < 3.7e18Initial program 91.1%
associate-/l/98.9%
Simplified98.9%
Taylor expanded in t around 0 86.7%
associate-*r/86.7%
neg-mul-186.7%
Simplified86.7%
if 3.7e18 < t Initial program 91.0%
Taylor expanded in t around inf 87.5%
associate-/r*91.7%
Simplified91.7%
Final simplification74.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= y -12.5) (not (<= y 6.8e+20))) (/ (/ x y) t) (/ x (* z (- t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -12.5) || !(y <= 6.8e+20)) {
tmp = (x / y) / t;
} else {
tmp = x / (z * -t);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-12.5d0)) .or. (.not. (y <= 6.8d+20))) then
tmp = (x / y) / t
else
tmp = x / (z * -t)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -12.5) || !(y <= 6.8e+20)) {
tmp = (x / y) / t;
} else {
tmp = x / (z * -t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (y <= -12.5) or not (y <= 6.8e+20): tmp = (x / y) / t else: tmp = x / (z * -t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((y <= -12.5) || !(y <= 6.8e+20)) tmp = Float64(Float64(x / y) / t); else tmp = Float64(x / Float64(z * Float64(-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 <= -12.5) || ~((y <= 6.8e+20)))
tmp = (x / y) / t;
else
tmp = x / (z * -t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[y, -12.5], N[Not[LessEqual[y, 6.8e+20]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -12.5 \lor \neg \left(y \leq 6.8 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\end{array}
\end{array}
if y < -12.5 or 6.8e20 < y Initial program 90.0%
Taylor expanded in x around 0 90.0%
associate-/l/98.1%
Simplified98.1%
Taylor expanded in z around 0 52.4%
*-commutative52.4%
associate-/r*59.8%
Simplified59.8%
if -12.5 < y < 6.8e20Initial program 92.0%
Taylor expanded in t around inf 58.5%
associate-/r*59.4%
Simplified59.4%
Taylor expanded in y around 0 43.2%
mul-1-neg43.2%
distribute-neg-frac243.2%
Simplified43.2%
Final simplification50.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -2.5e+151) (/ (/ x z) (- z t)) (/ x (* (- y z) (- t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.5e+151) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.5d+151)) then
tmp = (x / z) / (z - t)
else
tmp = x / ((y - z) * (t - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.5e+151) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -2.5e+151: tmp = (x / z) / (z - t) else: tmp = x / ((y - z) * (t - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -2.5e+151) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -2.5e+151)
tmp = (x / z) / (z - t);
else
tmp = x / ((y - z) * (t - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -2.5e+151], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -2.5000000000000001e151Initial program 67.6%
Taylor expanded in x around 0 67.6%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in y around 0 95.8%
mul-1-neg95.8%
distribute-neg-frac295.8%
Simplified95.8%
if -2.5000000000000001e151 < z Initial program 94.6%
Final simplification94.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z 5.2e+113) (/ x (* y t)) (/ x (* y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 5.2e+113) {
tmp = x / (y * t);
} else {
tmp = x / (y * z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 5.2d+113) then
tmp = x / (y * t)
else
tmp = x / (y * z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 5.2e+113) {
tmp = x / (y * t);
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 5.2e+113: tmp = x / (y * t) else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 5.2e+113) tmp = Float64(x / Float64(y * t)); else tmp = Float64(x / Float64(y * z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 5.2e+113)
tmp = x / (y * t);
else
tmp = x / (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[z, 5.2e+113], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.2 \cdot 10^{+113}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < 5.1999999999999998e113Initial program 91.9%
Taylor expanded in z around 0 41.5%
if 5.1999999999999998e113 < z Initial program 87.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
associate-*r/94.4%
neg-mul-194.4%
Simplified94.4%
div-inv94.4%
associate-/l*88.8%
add-sqr-sqrt56.2%
sqrt-unprod83.3%
sqr-neg83.3%
sqrt-unprod32.6%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
associate-/r*82.8%
associate-*r/82.8%
*-rgt-identity82.8%
associate-/r*82.3%
Simplified82.3%
Taylor expanded in z around 0 31.7%
*-commutative31.7%
Simplified31.7%
Final simplification40.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 (<= z 5.1e+113) (/ (/ x t) y) (/ x (* y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 5.1e+113) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 5.1d+113) then
tmp = (x / t) / y
else
tmp = x / (y * z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 5.1e+113) {
tmp = (x / t) / y;
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 5.1e+113: tmp = (x / t) / y else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 5.1e+113) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / Float64(y * z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 5.1e+113)
tmp = (x / t) / y;
else
tmp = x / (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[z, 5.1e+113], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.1 \cdot 10^{+113}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < 5.09999999999999994e113Initial program 91.9%
Taylor expanded in z around 0 41.5%
clear-num42.0%
associate-/r/41.5%
associate-/r*41.5%
Applied egg-rr41.5%
associate-*l/44.7%
associate-*l/44.8%
*-un-lft-identity44.8%
Applied egg-rr44.8%
if 5.09999999999999994e113 < z Initial program 87.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
associate-*r/94.4%
neg-mul-194.4%
Simplified94.4%
div-inv94.4%
associate-/l*88.8%
add-sqr-sqrt56.2%
sqrt-unprod83.3%
sqr-neg83.3%
sqrt-unprod32.6%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
associate-/r*82.8%
associate-*r/82.8%
*-rgt-identity82.8%
associate-/r*82.3%
Simplified82.3%
Taylor expanded in z around 0 31.7%
*-commutative31.7%
Simplified31.7%
Final simplification42.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z 1.7e+115) (/ (/ x y) t) (/ x (* y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.7e+115) {
tmp = (x / y) / t;
} else {
tmp = x / (y * z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= 1.7d+115) then
tmp = (x / y) / t
else
tmp = x / (y * z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= 1.7e+115) {
tmp = (x / y) / t;
} else {
tmp = x / (y * z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= 1.7e+115: tmp = (x / y) / t else: tmp = x / (y * z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= 1.7e+115) tmp = Float64(Float64(x / y) / t); else tmp = Float64(x / Float64(y * z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= 1.7e+115)
tmp = (x / y) / t;
else
tmp = x / (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[z, 1.7e+115], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.7 \cdot 10^{+115}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\end{array}
\end{array}
if z < 1.7e115Initial program 91.9%
Taylor expanded in x around 0 91.9%
associate-/l/96.8%
Simplified96.8%
Taylor expanded in z around 0 41.5%
*-commutative41.5%
associate-/r*43.6%
Simplified43.6%
if 1.7e115 < z Initial program 87.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 94.4%
associate-*r/94.4%
neg-mul-194.4%
Simplified94.4%
div-inv94.4%
associate-/l*88.8%
add-sqr-sqrt56.2%
sqrt-unprod83.3%
sqr-neg83.3%
sqrt-unprod32.6%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
associate-/r*82.8%
associate-*r/82.8%
*-rgt-identity82.8%
associate-/r*82.3%
Simplified82.3%
Taylor expanded in z around 0 31.7%
*-commutative31.7%
Simplified31.7%
Final simplification41.9%
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 91.2%
Taylor expanded in z around 0 38.6%
Final simplification38.6%
(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 2024053
(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))))