
(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 17 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: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (* (/ 1.0 (- y z)) (/ x (- t z))))
assert(y < t);
double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) * (x / (t - z));
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (1.0d0 / (y - z)) * (x / (t - z))
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return (1.0 / (y - z)) * (x / (t - z));
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (1.0 / (y - z)) * (x / (t - z))
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(1.0 / Float64(y - z)) * Float64(x / Float64(t - z))) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (1.0 / (y - z)) * (x / (t - z));
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(1.0 / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{1}{y - z} \cdot \frac{x}{t - z}
\end{array}
Initial program 88.9%
*-un-lft-identity88.9%
times-frac97.3%
Applied egg-rr97.3%
Final simplification97.3%
NOTE: y 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))))
(t_2 (/ 1.0 (/ z (/ x z))))
(t_3 (/ x (* (- y z) t))))
(if (<= z -6.5e+87)
t_2
(if (<= z -6.6e-33)
t_1
(if (<= z 2.7e-176)
t_3
(if (<= z 1.4e-97) t_1 (if (<= z 1.5e+58) t_3 t_2)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double t_2 = 1.0 / (z / (x / z));
double t_3 = x / ((y - z) * t);
double tmp;
if (z <= -6.5e+87) {
tmp = t_2;
} else if (z <= -6.6e-33) {
tmp = t_1;
} else if (z <= 2.7e-176) {
tmp = t_3;
} else if (z <= 1.4e-97) {
tmp = t_1;
} else if (z <= 1.5e+58) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y 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 - z))
t_2 = 1.0d0 / (z / (x / z))
t_3 = x / ((y - z) * t)
if (z <= (-6.5d+87)) then
tmp = t_2
else if (z <= (-6.6d-33)) then
tmp = t_1
else if (z <= 2.7d-176) then
tmp = t_3
else if (z <= 1.4d-97) then
tmp = t_1
else if (z <= 1.5d+58) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (y * (t - z));
double t_2 = 1.0 / (z / (x / z));
double t_3 = x / ((y - z) * t);
double tmp;
if (z <= -6.5e+87) {
tmp = t_2;
} else if (z <= -6.6e-33) {
tmp = t_1;
} else if (z <= 2.7e-176) {
tmp = t_3;
} else if (z <= 1.4e-97) {
tmp = t_1;
} else if (z <= 1.5e+58) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / (y * (t - z)) t_2 = 1.0 / (z / (x / z)) t_3 = x / ((y - z) * t) tmp = 0 if z <= -6.5e+87: tmp = t_2 elif z <= -6.6e-33: tmp = t_1 elif z <= 2.7e-176: tmp = t_3 elif z <= 1.4e-97: tmp = t_1 elif z <= 1.5e+58: tmp = t_3 else: tmp = t_2 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(y * Float64(t - z))) t_2 = Float64(1.0 / Float64(z / Float64(x / z))) t_3 = Float64(x / Float64(Float64(y - z) * t)) tmp = 0.0 if (z <= -6.5e+87) tmp = t_2; elseif (z <= -6.6e-33) tmp = t_1; elseif (z <= 2.7e-176) tmp = t_3; elseif (z <= 1.4e-97) tmp = t_1; elseif (z <= 1.5e+58) tmp = t_3; else tmp = t_2; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (y * (t - z));
t_2 = 1.0 / (z / (x / z));
t_3 = x / ((y - z) * t);
tmp = 0.0;
if (z <= -6.5e+87)
tmp = t_2;
elseif (z <= -6.6e-33)
tmp = t_1;
elseif (z <= 2.7e-176)
tmp = t_3;
elseif (z <= 1.4e-97)
tmp = t_1;
elseif (z <= 1.5e+58)
tmp = t_3;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+87], t$95$2, If[LessEqual[z, -6.6e-33], t$95$1, If[LessEqual[z, 2.7e-176], t$95$3, If[LessEqual[z, 1.4e-97], t$95$1, If[LessEqual[z, 1.5e+58], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \left(t - z\right)}\\
t_2 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
t_3 := \frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-176}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+58}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -6.5000000000000002e87 or 1.5000000000000001e58 < z Initial program 85.3%
Taylor expanded in z around inf 82.7%
unpow282.7%
Simplified82.7%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
associate-/l*93.8%
Simplified93.8%
if -6.5000000000000002e87 < z < -6.6000000000000005e-33 or 2.6999999999999998e-176 < z < 1.4000000000000001e-97Initial program 88.1%
Taylor expanded in y around inf 60.2%
*-commutative60.2%
Simplified60.2%
if -6.6000000000000005e-33 < z < 2.6999999999999998e-176 or 1.4000000000000001e-97 < z < 1.5000000000000001e58Initial program 92.0%
Taylor expanded in t around inf 70.3%
Final simplification77.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (* z (/ z x)))))
(if (<= z -9.5e+33)
t_1
(if (<= z 1.8e-43)
(/ (/ x t) y)
(if (<= z 7.2e+57) (/ (- x) (* z t)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z * (z / x));
double tmp;
if (z <= -9.5e+33) {
tmp = t_1;
} else if (z <= 1.8e-43) {
tmp = (x / t) / y;
} else if (z <= 7.2e+57) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z * (z / x))
if (z <= (-9.5d+33)) then
tmp = t_1
else if (z <= 1.8d-43) then
tmp = (x / t) / y
else if (z <= 7.2d+57) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z * (z / x));
double tmp;
if (z <= -9.5e+33) {
tmp = t_1;
} else if (z <= 1.8e-43) {
tmp = (x / t) / y;
} else if (z <= 7.2e+57) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = 1.0 / (z * (z / x)) tmp = 0 if z <= -9.5e+33: tmp = t_1 elif z <= 1.8e-43: tmp = (x / t) / y elif z <= 7.2e+57: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z * Float64(z / x))) tmp = 0.0 if (z <= -9.5e+33) tmp = t_1; elseif (z <= 1.8e-43) tmp = Float64(Float64(x / t) / y); elseif (z <= 7.2e+57) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z * (z / x));
tmp = 0.0;
if (z <= -9.5e+33)
tmp = t_1;
elseif (z <= 1.8e-43)
tmp = (x / t) / y;
elseif (z <= 7.2e+57)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e+33], t$95$1, If[LessEqual[z, 1.8e-43], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 7.2e+57], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{z \cdot \frac{z}{x}}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+57}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.5000000000000003e33 or 7.2000000000000005e57 < z Initial program 85.3%
Taylor expanded in z around inf 79.0%
unpow279.0%
Simplified79.0%
clear-num78.6%
inv-pow78.6%
Applied egg-rr78.6%
unpow-178.6%
associate-/l*89.5%
Simplified89.5%
associate-/r/89.4%
Applied egg-rr89.4%
if -9.5000000000000003e33 < z < 1.7999999999999999e-43Initial program 89.5%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
Simplified71.0%
associate-/r*76.6%
div-inv76.6%
Applied egg-rr76.6%
associate-*r/76.6%
*-rgt-identity76.6%
Simplified76.6%
Taylor expanded in t around inf 58.4%
associate-/r*64.4%
Simplified64.4%
if 1.7999999999999999e-43 < z < 7.2000000000000005e57Initial program 99.9%
Taylor expanded in y around 0 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in z around 0 42.2%
associate-*r/42.2%
neg-mul-142.2%
*-commutative42.2%
Simplified42.2%
Final simplification71.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (/ z (/ x z)))))
(if (<= z -3.3e+33)
t_1
(if (<= z 1.15e-43)
(/ (/ x t) y)
(if (<= z 1.35e+59) (/ (- x) (* z t)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -3.3e+33) {
tmp = t_1;
} else if (z <= 1.15e-43) {
tmp = (x / t) / y;
} else if (z <= 1.35e+59) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-3.3d+33)) then
tmp = t_1
else if (z <= 1.15d-43) then
tmp = (x / t) / y
else if (z <= 1.35d+59) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -3.3e+33) {
tmp = t_1;
} else if (z <= 1.15e-43) {
tmp = (x / t) / y;
} else if (z <= 1.35e+59) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -3.3e+33: tmp = t_1 elif z <= 1.15e-43: tmp = (x / t) / y elif z <= 1.35e+59: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -3.3e+33) tmp = t_1; elseif (z <= 1.15e-43) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.35e+59) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -3.3e+33)
tmp = t_1;
elseif (z <= 1.15e-43)
tmp = (x / t) / y;
elseif (z <= 1.35e+59)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+33], t$95$1, If[LessEqual[z, 1.15e-43], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.35e+59], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-43}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+59}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.29999999999999976e33 or 1.3500000000000001e59 < z Initial program 85.3%
Taylor expanded in z around inf 79.0%
unpow279.0%
Simplified79.0%
clear-num78.6%
inv-pow78.6%
Applied egg-rr78.6%
unpow-178.6%
associate-/l*89.5%
Simplified89.5%
if -3.29999999999999976e33 < z < 1.1499999999999999e-43Initial program 89.5%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
Simplified71.0%
associate-/r*76.6%
div-inv76.6%
Applied egg-rr76.6%
associate-*r/76.6%
*-rgt-identity76.6%
Simplified76.6%
Taylor expanded in t around inf 58.4%
associate-/r*64.4%
Simplified64.4%
if 1.1499999999999999e-43 < z < 1.3500000000000001e59Initial program 99.9%
Taylor expanded in y around 0 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in z around 0 42.2%
associate-*r/42.2%
neg-mul-142.2%
*-commutative42.2%
Simplified42.2%
Final simplification71.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (/ z (/ x z)))))
(if (<= z -1.75e+82)
t_1
(if (<= z -6.5e-32)
(/ x (* y (- t z)))
(if (<= z 5e+67) (/ (/ x t) (- y z)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -1.75e+82) {
tmp = t_1;
} else if (z <= -6.5e-32) {
tmp = x / (y * (t - z));
} else if (z <= 5e+67) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-1.75d+82)) then
tmp = t_1
else if (z <= (-6.5d-32)) then
tmp = x / (y * (t - z))
else if (z <= 5d+67) then
tmp = (x / t) / (y - z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -1.75e+82) {
tmp = t_1;
} else if (z <= -6.5e-32) {
tmp = x / (y * (t - z));
} else if (z <= 5e+67) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -1.75e+82: tmp = t_1 elif z <= -6.5e-32: tmp = x / (y * (t - z)) elif z <= 5e+67: tmp = (x / t) / (y - z) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -1.75e+82) tmp = t_1; elseif (z <= -6.5e-32) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (z <= 5e+67) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -1.75e+82)
tmp = t_1;
elseif (z <= -6.5e-32)
tmp = x / (y * (t - z));
elseif (z <= 5e+67)
tmp = (x / t) / (y - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+82], t$95$1, If[LessEqual[z, -6.5e-32], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+67], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.75e82 or 4.99999999999999976e67 < z Initial program 85.3%
Taylor expanded in z around inf 82.7%
unpow282.7%
Simplified82.7%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
associate-/l*93.8%
Simplified93.8%
if -1.75e82 < z < -6.49999999999999988e-32Initial program 87.5%
Taylor expanded in y around inf 58.7%
*-commutative58.7%
Simplified58.7%
if -6.49999999999999988e-32 < z < 4.99999999999999976e67Initial program 91.6%
Taylor expanded in t around inf 68.3%
associate-/r*70.8%
Simplified70.8%
Final simplification78.2%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (/ z (/ x z)))))
(if (<= z -2.3e+81)
t_1
(if (<= z -8e-33)
(/ (/ x y) (- t z))
(if (<= z 4.9e+61) (/ (/ x t) (- y z)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -2.3e+81) {
tmp = t_1;
} else if (z <= -8e-33) {
tmp = (x / y) / (t - z);
} else if (z <= 4.9e+61) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (z / (x / z))
if (z <= (-2.3d+81)) then
tmp = t_1
else if (z <= (-8d-33)) then
tmp = (x / y) / (t - z)
else if (z <= 4.9d+61) then
tmp = (x / t) / (y - z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (z / (x / z));
double tmp;
if (z <= -2.3e+81) {
tmp = t_1;
} else if (z <= -8e-33) {
tmp = (x / y) / (t - z);
} else if (z <= 4.9e+61) {
tmp = (x / t) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = 1.0 / (z / (x / z)) tmp = 0 if z <= -2.3e+81: tmp = t_1 elif z <= -8e-33: tmp = (x / y) / (t - z) elif z <= 4.9e+61: tmp = (x / t) / (y - z) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(1.0 / Float64(z / Float64(x / z))) tmp = 0.0 if (z <= -2.3e+81) tmp = t_1; elseif (z <= -8e-33) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (z <= 4.9e+61) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = 1.0 / (z / (x / z));
tmp = 0.0;
if (z <= -2.3e+81)
tmp = t_1;
elseif (z <= -8e-33)
tmp = (x / y) / (t - z);
elseif (z <= 4.9e+61)
tmp = (x / t) / (y - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+81], t$95$1, If[LessEqual[z, -8e-33], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e+61], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-33}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+61}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.2999999999999999e81 or 4.90000000000000025e61 < z Initial program 85.3%
Taylor expanded in z around inf 82.7%
unpow282.7%
Simplified82.7%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
associate-/l*93.8%
Simplified93.8%
if -2.2999999999999999e81 < z < -8.0000000000000004e-33Initial program 87.5%
*-un-lft-identity87.5%
times-frac99.5%
Applied egg-rr99.5%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 58.7%
associate-/r*66.8%
Simplified66.8%
if -8.0000000000000004e-33 < z < 4.90000000000000025e61Initial program 91.6%
Taylor expanded in t around inf 68.3%
associate-/r*70.8%
Simplified70.8%
Final simplification79.0%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -6.8e+161) (/ (/ (- x) z) (- y z)) (if (<= z 4.2e+102) (/ x (* (- y z) (- t z))) (/ (/ x z) (- z t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+161) {
tmp = (-x / z) / (y - z);
} else if (z <= 4.2e+102) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
NOTE: y 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 <= (-6.8d+161)) then
tmp = (-x / z) / (y - z)
else if (z <= 4.2d+102) then
tmp = x / ((y - z) * (t - z))
else
tmp = (x / z) / (z - t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+161) {
tmp = (-x / z) / (y - z);
} else if (z <= 4.2e+102) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -6.8e+161: tmp = (-x / z) / (y - z) elif z <= 4.2e+102: tmp = x / ((y - z) * (t - z)) else: tmp = (x / z) / (z - t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.8e+161) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); elseif (z <= 4.2e+102) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -6.8e+161)
tmp = (-x / z) / (y - z);
elseif (z <= 4.2e+102)
tmp = x / ((y - z) * (t - z));
else
tmp = (x / z) / (z - t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -6.8e+161], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+102], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+161}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -6.79999999999999986e161Initial program 71.4%
Taylor expanded in t around 0 71.4%
associate-*r/71.4%
neg-mul-171.4%
associate-/r*95.6%
Simplified95.6%
if -6.79999999999999986e161 < z < 4.20000000000000003e102Initial program 92.3%
if 4.20000000000000003e102 < z Initial program 83.5%
frac-2neg83.5%
div-inv83.4%
distribute-rgt-neg-in83.4%
Applied egg-rr83.4%
associate-/r*87.3%
Simplified87.3%
Taylor expanded in y around 0 82.5%
associate-/r*94.8%
Simplified94.8%
Final simplification93.0%
NOTE: y 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.65e+34)
t_1
(if (<= z 3.5e-42)
(/ (/ x t) y)
(if (<= z 7.5e+57) (/ (- x) (* z t)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -1.65e+34) {
tmp = t_1;
} else if (z <= 3.5e-42) {
tmp = (x / t) / y;
} else if (z <= 7.5e+57) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y 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.65d+34)) then
tmp = t_1
else if (z <= 3.5d-42) then
tmp = (x / t) / y
else if (z <= 7.5d+57) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * z);
double tmp;
if (z <= -1.65e+34) {
tmp = t_1;
} else if (z <= 3.5e-42) {
tmp = (x / t) / y;
} else if (z <= 7.5e+57) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / (z * z) tmp = 0 if z <= -1.65e+34: tmp = t_1 elif z <= 3.5e-42: tmp = (x / t) / y elif z <= 7.5e+57: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * z)) tmp = 0.0 if (z <= -1.65e+34) tmp = t_1; elseif (z <= 3.5e-42) tmp = Float64(Float64(x / t) / y); elseif (z <= 7.5e+57) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * z);
tmp = 0.0;
if (z <= -1.65e+34)
tmp = t_1;
elseif (z <= 3.5e-42)
tmp = (x / t) / y;
elseif (z <= 7.5e+57)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+34], t$95$1, If[LessEqual[z, 3.5e-42], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 7.5e+57], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.64999999999999994e34 or 7.5000000000000006e57 < z Initial program 85.3%
Taylor expanded in z around inf 79.0%
unpow279.0%
Simplified79.0%
if -1.64999999999999994e34 < z < 3.5000000000000002e-42Initial program 89.5%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
Simplified71.0%
associate-/r*76.6%
div-inv76.6%
Applied egg-rr76.6%
associate-*r/76.6%
*-rgt-identity76.6%
Simplified76.6%
Taylor expanded in t around inf 58.4%
associate-/r*64.4%
Simplified64.4%
if 3.5000000000000002e-42 < z < 7.5000000000000006e57Initial program 99.9%
Taylor expanded in y around 0 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in z around 0 42.2%
associate-*r/42.2%
neg-mul-142.2%
*-commutative42.2%
Simplified42.2%
Final simplification67.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -5.5e+33) (not (<= z 3.8e+63))) (/ 1.0 (/ z (/ x z))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.5e+33) || !(z <= 3.8e+63)) {
tmp = 1.0 / (z / (x / z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y 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.5d+33)) .or. (.not. (z <= 3.8d+63))) then
tmp = 1.0d0 / (z / (x / z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.5e+33) || !(z <= 3.8e+63)) {
tmp = 1.0 / (z / (x / z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -5.5e+33) or not (z <= 3.8e+63): tmp = 1.0 / (z / (x / z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5.5e+33) || !(z <= 3.8e+63)) tmp = Float64(1.0 / Float64(z / Float64(x / z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -5.5e+33) || ~((z <= 3.8e+63)))
tmp = 1.0 / (z / (x / z));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.5e+33], N[Not[LessEqual[z, 3.8e+63]], $MachinePrecision]], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+33} \lor \neg \left(z \leq 3.8 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -5.5000000000000006e33 or 3.8000000000000001e63 < z Initial program 85.3%
Taylor expanded in z around inf 79.0%
unpow279.0%
Simplified79.0%
clear-num78.6%
inv-pow78.6%
Applied egg-rr78.6%
unpow-178.6%
associate-/l*89.5%
Simplified89.5%
if -5.5000000000000006e33 < z < 3.8000000000000001e63Initial program 91.3%
Taylor expanded in t around inf 66.8%
Final simplification75.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -9.2e+32) (/ (/ x y) (- t z)) (if (<= y 2.6e-107) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e+32) {
tmp = (x / y) / (t - z);
} else if (y <= 2.6e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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 <= (-9.2d+32)) then
tmp = (x / y) / (t - z)
else if (y <= 2.6d-107) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.2e+32) {
tmp = (x / y) / (t - z);
} else if (y <= 2.6e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -9.2e+32: tmp = (x / y) / (t - z) elif y <= 2.6e-107: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -9.2e+32) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2.6e-107) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -9.2e+32)
tmp = (x / y) / (t - z);
elseif (y <= 2.6e-107)
tmp = (x / z) / (z - t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -9.2e+32], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-107], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -9.1999999999999998e32Initial program 89.1%
*-un-lft-identity89.1%
times-frac98.4%
Applied egg-rr98.4%
clear-num98.3%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in y around inf 87.5%
associate-/r*90.8%
Simplified90.8%
if -9.1999999999999998e32 < y < 2.6000000000000001e-107Initial program 87.3%
frac-2neg87.3%
div-inv87.2%
distribute-rgt-neg-in87.2%
Applied egg-rr87.2%
associate-/r*87.5%
Simplified87.5%
Taylor expanded in y around 0 72.4%
associate-/r*81.6%
Simplified81.6%
if 2.6000000000000001e-107 < y Initial program 91.0%
Taylor expanded in t around inf 61.9%
associate-/r*65.5%
Simplified65.5%
Final simplification78.4%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.2e+33) (/ (/ x (- t z)) y) (if (<= y 6.8e-107) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+33) {
tmp = (x / (t - z)) / y;
} else if (y <= 6.8e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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 <= (-4.2d+33)) then
tmp = (x / (t - z)) / y
else if (y <= 6.8d-107) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+33) {
tmp = (x / (t - z)) / y;
} else if (y <= 6.8e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.2e+33: tmp = (x / (t - z)) / y elif y <= 6.8e-107: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+33) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 6.8e-107) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.2e+33)
tmp = (x / (t - z)) / y;
elseif (y <= 6.8e-107)
tmp = (x / z) / (z - t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+33], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 6.8e-107], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.2000000000000001e33Initial program 89.1%
Taylor expanded in y around inf 87.5%
*-commutative87.5%
Simplified87.5%
associate-/r*92.1%
div-inv92.1%
Applied egg-rr92.1%
associate-*r/92.1%
*-rgt-identity92.1%
Simplified92.1%
if -4.2000000000000001e33 < y < 6.79999999999999989e-107Initial program 87.3%
frac-2neg87.3%
div-inv87.2%
distribute-rgt-neg-in87.2%
Applied egg-rr87.2%
associate-/r*87.5%
Simplified87.5%
Taylor expanded in y around 0 72.4%
associate-/r*81.6%
Simplified81.6%
if 6.79999999999999989e-107 < y Initial program 91.0%
Taylor expanded in t around inf 61.9%
associate-/r*65.5%
Simplified65.5%
Final simplification78.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.06e+33) (* (/ x (- t z)) (/ 1.0 y)) (if (<= y 9.8e-107) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.06e+33) {
tmp = (x / (t - z)) * (1.0 / y);
} else if (y <= 9.8e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y 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.06d+33)) then
tmp = (x / (t - z)) * (1.0d0 / y)
else if (y <= 9.8d-107) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.06e+33) {
tmp = (x / (t - z)) * (1.0 / y);
} else if (y <= 9.8e-107) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.06e+33: tmp = (x / (t - z)) * (1.0 / y) elif y <= 9.8e-107: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.06e+33) tmp = Float64(Float64(x / Float64(t - z)) * Float64(1.0 / y)); elseif (y <= 9.8e-107) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.06e+33)
tmp = (x / (t - z)) * (1.0 / y);
elseif (y <= 9.8e-107)
tmp = (x / z) / (z - t);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.06e+33], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-107], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.06 \cdot 10^{+33}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{1}{y}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.05999999999999993e33Initial program 89.1%
Taylor expanded in y around inf 87.5%
*-commutative87.5%
Simplified87.5%
associate-/r*92.1%
div-inv92.1%
Applied egg-rr92.1%
if -2.05999999999999993e33 < y < 9.79999999999999959e-107Initial program 87.3%
frac-2neg87.3%
div-inv87.2%
distribute-rgt-neg-in87.2%
Applied egg-rr87.2%
associate-/r*87.5%
Simplified87.5%
Taylor expanded in y around 0 72.4%
associate-/r*81.6%
Simplified81.6%
if 9.79999999999999959e-107 < y Initial program 91.0%
Taylor expanded in t around inf 61.9%
associate-/r*65.5%
Simplified65.5%
Final simplification78.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -5.1e+33) (not (<= z 1.26e+36))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.1e+33) || !(z <= 1.26e+36)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y 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+33)) .or. (.not. (z <= 1.26d+36))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.1e+33) || !(z <= 1.26e+36)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -5.1e+33) or not (z <= 1.26e+36): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5.1e+33) || !(z <= 1.26e+36)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -5.1e+33) || ~((z <= 1.26e+36)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.1e+33], N[Not[LessEqual[z, 1.26e+36]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+33} \lor \neg \left(z \leq 1.26 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -5.0999999999999999e33 or 1.25999999999999994e36 < z Initial program 86.0%
Taylor expanded in y around inf 45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in t around 0 41.3%
associate-*r/41.3%
neg-mul-141.3%
*-commutative41.3%
Simplified41.3%
expm1-log1p-u41.0%
expm1-udef59.0%
add-sqr-sqrt30.7%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod28.2%
add-sqr-sqrt58.9%
*-commutative58.9%
Applied egg-rr58.9%
expm1-def39.2%
expm1-log1p39.5%
*-commutative39.5%
Simplified39.5%
if -5.0999999999999999e33 < z < 1.25999999999999994e36Initial program 91.0%
Taylor expanded in z around 0 53.3%
Final simplification47.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.1e+33) (not (<= z 6.8e+55))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e+33) || !(z <= 6.8e+55)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y 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.1d+33)) .or. (.not. (z <= 6.8d+55))) then
tmp = x / (z * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e+33) || !(z <= 6.8e+55)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.1e+33) or not (z <= 6.8e+55): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.1e+33) || !(z <= 6.8e+55)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.1e+33) || ~((z <= 6.8e+55)))
tmp = x / (z * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.1e+33], N[Not[LessEqual[z, 6.8e+55]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+33} \lor \neg \left(z \leq 6.8 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.1e33 or 6.7999999999999996e55 < z Initial program 85.4%
Taylor expanded in z around inf 78.3%
unpow278.3%
Simplified78.3%
if -3.1e33 < z < 6.7999999999999996e55Initial program 91.3%
Taylor expanded in z around 0 53.3%
Final simplification63.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -8.6e+33) (not (<= z 7e+55))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.6e+33) || !(z <= 7e+55)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-8.6d+33)) .or. (.not. (z <= 7d+55))) then
tmp = x / (z * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.6e+33) || !(z <= 7e+55)) {
tmp = x / (z * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -8.6e+33) or not (z <= 7e+55): tmp = x / (z * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -8.6e+33) || !(z <= 7e+55)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -8.6e+33) || ~((z <= 7e+55)))
tmp = x / (z * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.6e+33], N[Not[LessEqual[z, 7e+55]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+33} \lor \neg \left(z \leq 7 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -8.60000000000000057e33 or 7.00000000000000021e55 < z Initial program 85.4%
Taylor expanded in z around inf 78.3%
unpow278.3%
Simplified78.3%
if -8.60000000000000057e33 < z < 7.00000000000000021e55Initial program 91.3%
Taylor expanded in y around inf 68.6%
*-commutative68.6%
Simplified68.6%
associate-/r*75.1%
div-inv75.0%
Applied egg-rr75.0%
associate-*r/75.1%
*-rgt-identity75.1%
Simplified75.1%
Taylor expanded in t around inf 53.3%
associate-/r*60.1%
Simplified60.1%
Final simplification67.4%
NOTE: y 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(y < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (t - z);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 88.9%
associate-/r*97.1%
Simplified97.1%
Final simplification97.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y 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 y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y 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}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 88.9%
Taylor expanded in z around 0 40.7%
Final simplification40.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023297
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))