
(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 21 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 (* (/ (pow (cbrt x) 2.0) (- y z)) (/ (cbrt x) (- t z))))
assert(y < t);
double code(double x, double y, double z, double t) {
return (pow(cbrt(x), 2.0) / (y - z)) * (cbrt(x) / (t - z));
}
assert y < t;
public static double code(double x, double y, double z, double t) {
return (Math.pow(Math.cbrt(x), 2.0) / (y - z)) * (Math.cbrt(x) / (t - z));
}
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64((cbrt(x) ^ 2.0) / Float64(y - z)) * Float64(cbrt(x) / Float64(t - z))) end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}
\end{array}
Initial program 89.7%
add-cube-cbrt89.1%
times-frac98.0%
pow298.0%
Applied egg-rr98.0%
Final simplification98.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) y)))
(if (<= z -4.8e+70)
t_1
(if (<= z -2.5e-15)
(/ (- x) (* y z))
(if (<= z -2.15e-44)
(/ (- x) (* z t))
(if (<= z 6e+84) (/ (/ x t) y) t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / y;
double tmp;
if (z <= -4.8e+70) {
tmp = t_1;
} else if (z <= -2.5e-15) {
tmp = -x / (y * z);
} else if (z <= -2.15e-44) {
tmp = -x / (z * t);
} else if (z <= 6e+84) {
tmp = (x / t) / y;
} 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) / y
if (z <= (-4.8d+70)) then
tmp = t_1
else if (z <= (-2.5d-15)) then
tmp = -x / (y * z)
else if (z <= (-2.15d-44)) then
tmp = -x / (z * t)
else if (z <= 6d+84) then
tmp = (x / t) / y
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) / y;
double tmp;
if (z <= -4.8e+70) {
tmp = t_1;
} else if (z <= -2.5e-15) {
tmp = -x / (y * z);
} else if (z <= -2.15e-44) {
tmp = -x / (z * t);
} else if (z <= 6e+84) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / y tmp = 0 if z <= -4.8e+70: tmp = t_1 elif z <= -2.5e-15: tmp = -x / (y * z) elif z <= -2.15e-44: tmp = -x / (z * t) elif z <= 6e+84: tmp = (x / t) / y else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / y) tmp = 0.0 if (z <= -4.8e+70) tmp = t_1; elseif (z <= -2.5e-15) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= -2.15e-44) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 6e+84) tmp = Float64(Float64(x / t) / y); 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) / y;
tmp = 0.0;
if (z <= -4.8e+70)
tmp = t_1;
elseif (z <= -2.5e-15)
tmp = -x / (y * z);
elseif (z <= -2.15e-44)
tmp = -x / (z * t);
elseif (z <= 6e+84)
tmp = (x / t) / y;
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[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -4.8e+70], t$95$1, If[LessEqual[z, -2.5e-15], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-44], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+84], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{y}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+84}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.79999999999999974e70 or 5.99999999999999992e84 < z Initial program 82.7%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
associate-/r*59.4%
Simplified59.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
expm1-log1p-u57.7%
expm1-udef70.5%
associate-/l/70.5%
add-sqr-sqrt36.0%
sqrt-unprod69.3%
sqr-neg69.3%
sqrt-unprod34.5%
add-sqr-sqrt70.5%
*-commutative70.5%
Applied egg-rr70.5%
expm1-def46.5%
expm1-log1p46.9%
associate-/r*57.2%
Simplified57.2%
if -4.79999999999999974e70 < z < -2.5e-15Initial program 99.5%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-/r*56.2%
Simplified56.2%
Taylor expanded in t around 0 38.3%
associate-*r/38.3%
neg-mul-138.3%
*-commutative38.3%
Simplified38.3%
if -2.5e-15 < z < -2.15000000000000007e-44Initial program 100.0%
Taylor expanded in t around inf 19.2%
Taylor expanded in y around 0 18.8%
associate-*r/18.8%
neg-mul-118.8%
Simplified18.8%
if -2.15000000000000007e-44 < z < 5.99999999999999992e84Initial program 94.1%
Taylor expanded in y around inf 65.2%
*-commutative65.2%
associate-/r*69.6%
Simplified69.6%
Taylor expanded in t around inf 60.1%
Final simplification56.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -1.8e-228)
(/ (/ x y) (- t z))
(if (<= t 9.5e-134)
(/ (/ (- x) z) y)
(if (<= t 2.6e-47) (/ x (* y (- t z))) (/ x (* (- y z) t))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.8e-228) {
tmp = (x / y) / (t - z);
} else if (t <= 9.5e-134) {
tmp = (-x / z) / y;
} else if (t <= 2.6e-47) {
tmp = x / (y * (t - 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 (t <= (-1.8d-228)) then
tmp = (x / y) / (t - z)
else if (t <= 9.5d-134) then
tmp = (-x / z) / y
else if (t <= 2.6d-47) then
tmp = x / (y * (t - 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 (t <= -1.8e-228) {
tmp = (x / y) / (t - z);
} else if (t <= 9.5e-134) {
tmp = (-x / z) / y;
} else if (t <= 2.6e-47) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -1.8e-228: tmp = (x / y) / (t - z) elif t <= 9.5e-134: tmp = (-x / z) / y elif t <= 2.6e-47: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.8e-228) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 9.5e-134) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 2.6e-47) tmp = Float64(x / Float64(y * Float64(t - 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 (t <= -1.8e-228)
tmp = (x / y) / (t - z);
elseif (t <= 9.5e-134)
tmp = (-x / z) / y;
elseif (t <= 2.6e-47)
tmp = x / (y * (t - 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[LessEqual[t, -1.8e-228], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-134], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.6e-47], N[(x / N[(y * N[(t - 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}\;t \leq -1.8 \cdot 10^{-228}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.8000000000000001e-228Initial program 89.6%
add-cube-cbrt88.9%
times-frac97.7%
pow297.7%
Applied egg-rr97.7%
Taylor expanded in y around inf 60.1%
associate-/r*61.5%
Simplified61.5%
if -1.8000000000000001e-228 < t < 9.5000000000000008e-134Initial program 95.1%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-/r*62.4%
Simplified62.4%
Taylor expanded in t around 0 59.4%
associate-*r/59.4%
neg-mul-159.4%
Simplified59.4%
if 9.5000000000000008e-134 < t < 2.6e-47Initial program 86.1%
Taylor expanded in y around inf 42.3%
*-commutative42.3%
Simplified42.3%
if 2.6e-47 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification63.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.6e+114) (not (<= z 2.4e+76))) (/ (/ (- x) z) (- y z)) (/ x (* (- y z) (- t z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.6e+114) || !(z <= 2.4e+76)) {
tmp = (-x / z) / (y - z);
} else {
tmp = x / ((y - z) * (t - 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 ((z <= (-4.6d+114)) .or. (.not. (z <= 2.4d+76))) then
tmp = (-x / z) / (y - z)
else
tmp = x / ((y - z) * (t - 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 ((z <= -4.6e+114) || !(z <= 2.4e+76)) {
tmp = (-x / z) / (y - z);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.6e+114) or not (z <= 2.4e+76): tmp = (-x / z) / (y - z) else: tmp = x / ((y - z) * (t - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.6e+114) || !(z <= 2.4e+76)) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.6e+114) || ~((z <= 2.4e+76)))
tmp = (-x / z) / (y - z);
else
tmp = x / ((y - z) * (t - 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[Or[LessEqual[z, -4.6e+114], N[Not[LessEqual[z, 2.4e+76]], $MachinePrecision]], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+114} \lor \neg \left(z \leq 2.4 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -4.6000000000000001e114 or 2.4e76 < z Initial program 81.7%
add-cube-cbrt81.5%
times-frac99.4%
pow299.4%
Applied egg-rr99.4%
Taylor expanded in t around 0 81.7%
mul-1-neg81.7%
associate-/r*92.9%
distribute-neg-frac92.9%
distribute-frac-neg92.9%
Simplified92.9%
if -4.6000000000000001e114 < z < 2.4e76Initial program 95.2%
Final simplification94.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.8e-227) (/ (/ x y) (- t z)) (if (<= t 5.4e-49) (* (/ (- x) z) (/ -1.0 z)) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.8e-227) {
tmp = (x / y) / (t - z);
} else if (t <= 5.4e-49) {
tmp = (-x / z) * (-1.0 / 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 (t <= (-1.8d-227)) then
tmp = (x / y) / (t - z)
else if (t <= 5.4d-49) then
tmp = (-x / z) * ((-1.0d0) / 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 (t <= -1.8e-227) {
tmp = (x / y) / (t - z);
} else if (t <= 5.4e-49) {
tmp = (-x / z) * (-1.0 / z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -1.8e-227: tmp = (x / y) / (t - z) elif t <= 5.4e-49: tmp = (-x / z) * (-1.0 / z) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.8e-227) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 5.4e-49) tmp = Float64(Float64(Float64(-x) / z) * Float64(-1.0 / 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 (t <= -1.8e-227)
tmp = (x / y) / (t - z);
elseif (t <= 5.4e-49)
tmp = (-x / z) * (-1.0 / 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[LessEqual[t, -1.8e-227], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-49], N[(N[((-x) / z), $MachinePrecision] * N[(-1.0 / z), $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}\;t \leq -1.8 \cdot 10^{-227}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-49}:\\
\;\;\;\;\frac{-x}{z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.8e-227Initial program 89.6%
add-cube-cbrt88.9%
times-frac97.7%
pow297.7%
Applied egg-rr97.7%
Taylor expanded in y around inf 60.1%
associate-/r*61.5%
Simplified61.5%
if -1.8e-227 < t < 5.3999999999999999e-49Initial program 92.3%
*-un-lft-identity92.3%
times-frac97.6%
Applied egg-rr97.6%
Taylor expanded in y around 0 72.6%
Taylor expanded in t around 0 71.5%
associate-*r/48.4%
neg-mul-148.4%
Simplified71.5%
if 5.3999999999999999e-49 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification69.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4e-33) (/ (/ x y) (- t z)) (if (<= y 2.25e-132) (/ (- x) (* z (- t z))) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e-33) {
tmp = (x / y) / (t - z);
} else if (y <= 2.25e-132) {
tmp = -x / (z * (t - 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 (y <= (-4d-33)) then
tmp = (x / y) / (t - z)
else if (y <= 2.25d-132) then
tmp = -x / (z * (t - 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 (y <= -4e-33) {
tmp = (x / y) / (t - z);
} else if (y <= 2.25e-132) {
tmp = -x / (z * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4e-33: tmp = (x / y) / (t - z) elif y <= 2.25e-132: tmp = -x / (z * (t - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4e-33) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2.25e-132) tmp = Float64(Float64(-x) / Float64(z * Float64(t - 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 (y <= -4e-33)
tmp = (x / y) / (t - z);
elseif (y <= 2.25e-132)
tmp = -x / (z * (t - 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[LessEqual[y, -4e-33], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e-132], N[((-x) / N[(z * N[(t - 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}\;y \leq -4 \cdot 10^{-33}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-132}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.0000000000000002e-33Initial program 91.2%
add-cube-cbrt90.8%
times-frac98.9%
pow298.9%
Applied egg-rr98.9%
Taylor expanded in y around inf 82.7%
associate-/r*84.1%
Simplified84.1%
if -4.0000000000000002e-33 < y < 2.25e-132Initial program 91.7%
Taylor expanded in y around 0 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
if 2.25e-132 < y Initial program 86.9%
Taylor expanded in t around inf 54.0%
Final simplification70.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2.9e-210) (/ (/ x (- t z)) y) (if (<= t 1.35e-45) (/ (- x) (* z (- y z))) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.9e-210) {
tmp = (x / (t - z)) / y;
} else if (t <= 1.35e-45) {
tmp = -x / (z * (y - 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 (t <= (-2.9d-210)) then
tmp = (x / (t - z)) / y
else if (t <= 1.35d-45) then
tmp = -x / (z * (y - 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 (t <= -2.9e-210) {
tmp = (x / (t - z)) / y;
} else if (t <= 1.35e-45) {
tmp = -x / (z * (y - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.9e-210: tmp = (x / (t - z)) / y elif t <= 1.35e-45: tmp = -x / (z * (y - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.9e-210) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 1.35e-45) tmp = Float64(Float64(-x) / Float64(z * Float64(y - 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 (t <= -2.9e-210)
tmp = (x / (t - z)) / y;
elseif (t <= 1.35e-45)
tmp = -x / (z * (y - 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[LessEqual[t, -2.9e-210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.35e-45], N[((-x) / N[(z * N[(y - 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}\;t \leq -2.9 \cdot 10^{-210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-45}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -2.90000000000000006e-210Initial program 89.9%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
associate-/r*65.6%
Simplified65.6%
if -2.90000000000000006e-210 < t < 1.34999999999999992e-45Initial program 91.8%
Taylor expanded in t around 0 83.6%
associate-*r/83.6%
neg-mul-183.6%
Simplified83.6%
if 1.34999999999999992e-45 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification75.5%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3e-210) (/ (/ x (- t z)) y) (if (<= t 3.8e-44) (/ (/ (- x) z) (- y z)) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e-210) {
tmp = (x / (t - z)) / y;
} else if (t <= 3.8e-44) {
tmp = (-x / z) / (y - 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 (t <= (-3d-210)) then
tmp = (x / (t - z)) / y
else if (t <= 3.8d-44) then
tmp = (-x / z) / (y - 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 (t <= -3e-210) {
tmp = (x / (t - z)) / y;
} else if (t <= 3.8e-44) {
tmp = (-x / z) / (y - z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -3e-210: tmp = (x / (t - z)) / y elif t <= 3.8e-44: tmp = (-x / z) / (y - z) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3e-210) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 3.8e-44) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - 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 (t <= -3e-210)
tmp = (x / (t - z)) / y;
elseif (t <= 3.8e-44)
tmp = (-x / z) / (y - 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[LessEqual[t, -3e-210], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 3.8e-44], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $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}\;t \leq -3 \cdot 10^{-210}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -3.0000000000000001e-210Initial program 89.9%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
associate-/r*65.6%
Simplified65.6%
if -3.0000000000000001e-210 < t < 3.8000000000000001e-44Initial program 91.8%
add-cube-cbrt91.1%
times-frac97.8%
pow297.8%
Applied egg-rr97.8%
Taylor expanded in t around 0 83.6%
mul-1-neg83.6%
associate-/r*89.8%
distribute-neg-frac89.8%
distribute-frac-neg89.8%
Simplified89.8%
if 3.8000000000000001e-44 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification77.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= t -6.6e-165) (not (<= t 1.75e-95))) (/ x (* (- y z) t)) (* (/ -1.0 y) (/ x z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.6e-165) || !(t <= 1.75e-95)) {
tmp = x / ((y - z) * t);
} else {
tmp = (-1.0 / y) * (x / 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 ((t <= (-6.6d-165)) .or. (.not. (t <= 1.75d-95))) then
tmp = x / ((y - z) * t)
else
tmp = ((-1.0d0) / y) * (x / 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 ((t <= -6.6e-165) || !(t <= 1.75e-95)) {
tmp = x / ((y - z) * t);
} else {
tmp = (-1.0 / y) * (x / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (t <= -6.6e-165) or not (t <= 1.75e-95): tmp = x / ((y - z) * t) else: tmp = (-1.0 / y) * (x / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((t <= -6.6e-165) || !(t <= 1.75e-95)) tmp = Float64(x / Float64(Float64(y - z) * t)); else tmp = Float64(Float64(-1.0 / y) * Float64(x / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((t <= -6.6e-165) || ~((t <= 1.75e-95)))
tmp = x / ((y - z) * t);
else
tmp = (-1.0 / y) * (x / 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[Or[LessEqual[t, -6.6e-165], N[Not[LessEqual[t, 1.75e-95]], $MachinePrecision]], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-165} \lor \neg \left(t \leq 1.75 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\
\end{array}
\end{array}
if t < -6.5999999999999996e-165 or 1.7499999999999999e-95 < t Initial program 87.9%
Taylor expanded in t around inf 71.3%
if -6.5999999999999996e-165 < t < 1.7499999999999999e-95Initial program 93.4%
Taylor expanded in y around inf 54.2%
*-commutative54.2%
associate-/r*61.5%
Simplified61.5%
Taylor expanded in t around 0 55.4%
associate-*r/55.4%
neg-mul-155.4%
Simplified55.4%
associate-/l/49.8%
neg-mul-149.8%
times-frac55.4%
Applied egg-rr55.4%
Final simplification66.0%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -7.6e+144) (not (<= z 1.1e+57))) (/ x (* z (- y z))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.6e+144) || !(z <= 1.1e+57)) {
tmp = x / (z * (y - 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 <= (-7.6d+144)) .or. (.not. (z <= 1.1d+57))) then
tmp = x / (z * (y - 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 <= -7.6e+144) || !(z <= 1.1e+57)) {
tmp = x / (z * (y - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -7.6e+144) or not (z <= 1.1e+57): tmp = x / (z * (y - 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 <= -7.6e+144) || !(z <= 1.1e+57)) tmp = Float64(x / Float64(z * Float64(y - 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 <= -7.6e+144) || ~((z <= 1.1e+57)))
tmp = x / (z * (y - 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, -7.6e+144], N[Not[LessEqual[z, 1.1e+57]], $MachinePrecision]], N[(x / N[(z * N[(y - 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 -7.6 \cdot 10^{+144} \lor \neg \left(z \leq 1.1 \cdot 10^{+57}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -7.60000000000000053e144 or 1.1e57 < z Initial program 83.4%
add-cube-cbrt83.3%
times-frac99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 83.4%
mul-1-neg83.4%
associate-/r*93.9%
distribute-neg-frac93.9%
distribute-frac-neg93.9%
Simplified93.9%
expm1-log1p-u92.8%
expm1-udef81.6%
associate-/l/81.6%
add-sqr-sqrt39.0%
sqrt-unprod77.6%
sqr-neg77.6%
sqrt-unprod41.7%
add-sqr-sqrt80.3%
Applied egg-rr80.3%
expm1-def80.3%
expm1-log1p80.3%
*-commutative80.3%
Simplified80.3%
if -7.60000000000000053e144 < z < 1.1e57Initial program 94.0%
Taylor expanded in t around inf 61.0%
Final simplification68.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -1.4e-68) (/ (/ (- x) z) y) (if (<= z 6.4e+81) (/ (/ x t) y) (* (/ -1.0 y) (/ x z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.4e-68) {
tmp = (-x / z) / y;
} else if (z <= 6.4e+81) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / y) * (x / 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 (z <= (-1.4d-68)) then
tmp = (-x / z) / y
else if (z <= 6.4d+81) then
tmp = (x / t) / y
else
tmp = ((-1.0d0) / y) * (x / 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 (z <= -1.4e-68) {
tmp = (-x / z) / y;
} else if (z <= 6.4e+81) {
tmp = (x / t) / y;
} else {
tmp = (-1.0 / y) * (x / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -1.4e-68: tmp = (-x / z) / y elif z <= 6.4e+81: tmp = (x / t) / y else: tmp = (-1.0 / y) * (x / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.4e-68) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (z <= 6.4e+81) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(-1.0 / y) * Float64(x / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -1.4e-68)
tmp = (-x / z) / y;
elseif (z <= 6.4e+81)
tmp = (x / t) / y;
else
tmp = (-1.0 / y) * (x / 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[z, -1.4e-68], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 6.4e+81], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(-1.0 / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+81}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y} \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -1.4000000000000001e-68Initial program 87.1%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
associate-/r*56.1%
Simplified56.1%
Taylor expanded in t around 0 50.4%
associate-*r/50.4%
neg-mul-150.4%
Simplified50.4%
if -1.4000000000000001e-68 < z < 6.4e81Initial program 94.8%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in t around inf 61.2%
if 6.4e81 < z Initial program 82.8%
Taylor expanded in y around inf 51.2%
*-commutative51.2%
associate-/r*63.5%
Simplified63.5%
Taylor expanded in t around 0 61.7%
associate-*r/61.7%
neg-mul-161.7%
Simplified61.7%
associate-/l/48.1%
neg-mul-148.1%
times-frac61.7%
Applied egg-rr61.7%
Final simplification57.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.1e-72) (not (<= z 3.05e+82))) (/ (/ (- x) z) y) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.1e-72) || !(z <= 3.05e+82)) {
tmp = (-x / z) / y;
} 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 <= (-4.1d-72)) .or. (.not. (z <= 3.05d+82))) then
tmp = (-x / z) / y
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 <= -4.1e-72) || !(z <= 3.05e+82)) {
tmp = (-x / z) / y;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.1e-72) or not (z <= 3.05e+82): tmp = (-x / z) / y else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.1e-72) || !(z <= 3.05e+82)) tmp = Float64(Float64(Float64(-x) / z) / y); 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 <= -4.1e-72) || ~((z <= 3.05e+82)))
tmp = (-x / z) / y;
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, -4.1e-72], N[Not[LessEqual[z, 3.05e+82]], $MachinePrecision]], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{-72} \lor \neg \left(z \leq 3.05 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -4.10000000000000003e-72 or 3.0499999999999999e82 < z Initial program 85.3%
Taylor expanded in y around inf 51.6%
*-commutative51.6%
associate-/r*59.1%
Simplified59.1%
Taylor expanded in t around 0 55.0%
associate-*r/55.0%
neg-mul-155.0%
Simplified55.0%
if -4.10000000000000003e-72 < z < 3.0499999999999999e82Initial program 94.8%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in t around inf 61.2%
Final simplification57.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -1.06e+120) (not (<= z 48000000000000.0))) (/ x (* z t)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.06e+120) || !(z <= 48000000000000.0)) {
tmp = x / (z * t);
} 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 <= (-1.06d+120)) .or. (.not. (z <= 48000000000000.0d0))) then
tmp = x / (z * t)
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 <= -1.06e+120) || !(z <= 48000000000000.0)) {
tmp = x / (z * t);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.06e+120) or not (z <= 48000000000000.0): tmp = x / (z * t) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.06e+120) || !(z <= 48000000000000.0)) tmp = Float64(x / Float64(z * t)); 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 <= -1.06e+120) || ~((z <= 48000000000000.0)))
tmp = x / (z * t);
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, -1.06e+120], N[Not[LessEqual[z, 48000000000000.0]], $MachinePrecision]], N[(x / N[(z * t), $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 -1.06 \cdot 10^{+120} \lor \neg \left(z \leq 48000000000000\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.05999999999999994e120 or 4.8e13 < z Initial program 83.7%
Taylor expanded in t around inf 42.4%
Taylor expanded in y around 0 39.1%
associate-*r/39.1%
neg-mul-139.1%
Simplified39.1%
expm1-log1p-u38.9%
expm1-udef72.6%
add-sqr-sqrt35.7%
sqrt-unprod70.2%
sqr-neg70.2%
sqrt-unprod36.6%
add-sqr-sqrt72.3%
*-commutative72.3%
associate-/r*72.3%
Applied egg-rr72.3%
expm1-def46.1%
expm1-log1p46.4%
associate-/l/37.5%
*-commutative37.5%
Simplified37.5%
if -1.05999999999999994e120 < z < 4.8e13Initial program 94.7%
Taylor expanded in z around 0 51.5%
Final simplification45.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 -3.1e+64) (not (<= z 7.2e+48))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.1e+64) || !(z <= 7.2e+48)) {
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 <= (-3.1d+64)) .or. (.not. (z <= 7.2d+48))) 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 <= -3.1e+64) || !(z <= 7.2e+48)) {
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 <= -3.1e+64) or not (z <= 7.2e+48): 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 <= -3.1e+64) || !(z <= 7.2e+48)) 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 <= -3.1e+64) || ~((z <= 7.2e+48)))
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, -3.1e+64], N[Not[LessEqual[z, 7.2e+48]], $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 -3.1 \cdot 10^{+64} \lor \neg \left(z \leq 7.2 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.0999999999999999e64 or 7.19999999999999967e48 < z Initial program 83.7%
Taylor expanded in y around inf 49.8%
*-commutative49.8%
associate-/r*59.4%
Simplified59.4%
Taylor expanded in t around 0 56.4%
associate-*r/56.4%
neg-mul-156.4%
Simplified56.4%
expm1-log1p-u56.2%
expm1-udef70.5%
associate-/l/70.5%
add-sqr-sqrt34.7%
sqrt-unprod70.2%
sqr-neg70.2%
sqrt-unprod35.8%
add-sqr-sqrt70.5%
*-commutative70.5%
Applied egg-rr70.5%
expm1-def45.6%
expm1-log1p46.0%
Simplified46.0%
if -3.0999999999999999e64 < z < 7.19999999999999967e48Initial program 94.8%
Taylor expanded in z around 0 52.2%
Final simplification49.4%
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.15e+69) (not (<= z 1.75e+86))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.15e+69) || !(z <= 1.75e+86)) {
tmp = x / (y * 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 <= (-3.15d+69)) .or. (.not. (z <= 1.75d+86))) then
tmp = x / (y * 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 <= -3.15e+69) || !(z <= 1.75e+86)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.15e+69) or not (z <= 1.75e+86): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.15e+69) || !(z <= 1.75e+86)) tmp = Float64(x / Float64(y * 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 <= -3.15e+69) || ~((z <= 1.75e+86)))
tmp = x / (y * 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, -3.15e+69], N[Not[LessEqual[z, 1.75e+86]], $MachinePrecision]], N[(x / N[(y * 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 -3.15 \cdot 10^{+69} \lor \neg \left(z \leq 1.75 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.15000000000000004e69 or 1.75000000000000009e86 < z Initial program 82.7%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
associate-/r*59.4%
Simplified59.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
expm1-log1p-u57.7%
expm1-udef70.5%
associate-/l/70.5%
add-sqr-sqrt36.0%
sqrt-unprod69.3%
sqr-neg69.3%
sqrt-unprod34.5%
add-sqr-sqrt70.5%
*-commutative70.5%
Applied egg-rr70.5%
expm1-def46.5%
expm1-log1p46.9%
Simplified46.9%
if -3.15000000000000004e69 < z < 1.75000000000000009e86Initial program 95.0%
Taylor expanded in y around inf 64.2%
*-commutative64.2%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around inf 54.6%
Final simplification51.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2.45e+118) (not (<= z 3.3e+47))) (/ (/ x z) t) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.45e+118) || !(z <= 3.3e+47)) {
tmp = (x / z) / t;
} 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 <= (-2.45d+118)) .or. (.not. (z <= 3.3d+47))) then
tmp = (x / z) / t
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 <= -2.45e+118) || !(z <= 3.3e+47)) {
tmp = (x / z) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.45e+118) or not (z <= 3.3e+47): tmp = (x / z) / t else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.45e+118) || !(z <= 3.3e+47)) tmp = Float64(Float64(x / z) / t); 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 <= -2.45e+118) || ~((z <= 3.3e+47)))
tmp = (x / z) / t;
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, -2.45e+118], N[Not[LessEqual[z, 3.3e+47]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+118} \lor \neg \left(z \leq 3.3 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.4500000000000002e118 or 3.2999999999999999e47 < z Initial program 83.1%
Taylor expanded in t around inf 39.7%
Taylor expanded in y around 0 39.6%
associate-*r/39.6%
neg-mul-139.6%
Simplified39.6%
expm1-log1p-u39.4%
expm1-udef74.2%
add-sqr-sqrt36.1%
sqrt-unprod71.9%
sqr-neg71.9%
sqrt-unprod38.1%
add-sqr-sqrt74.2%
*-commutative74.2%
associate-/r*74.2%
Applied egg-rr74.2%
expm1-def49.1%
expm1-log1p49.4%
Simplified49.4%
if -2.4500000000000002e118 < z < 3.2999999999999999e47Initial program 94.4%
Taylor expanded in y around inf 65.5%
*-commutative65.5%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around inf 53.6%
Final simplification51.9%
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.8e+69) (not (<= z 4.6e+86))) (/ (/ x z) y) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+69) || !(z <= 4.6e+86)) {
tmp = (x / z) / y;
} 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 <= (-3.8d+69)) .or. (.not. (z <= 4.6d+86))) then
tmp = (x / z) / y
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 <= -3.8e+69) || !(z <= 4.6e+86)) {
tmp = (x / z) / y;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.8e+69) or not (z <= 4.6e+86): tmp = (x / z) / y else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.8e+69) || !(z <= 4.6e+86)) tmp = Float64(Float64(x / z) / y); 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 <= -3.8e+69) || ~((z <= 4.6e+86)))
tmp = (x / z) / y;
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, -3.8e+69], N[Not[LessEqual[z, 4.6e+86]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+69} \lor \neg \left(z \leq 4.6 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.80000000000000028e69 or 4.59999999999999979e86 < z Initial program 82.7%
Taylor expanded in y around inf 51.0%
*-commutative51.0%
associate-/r*59.4%
Simplified59.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
expm1-log1p-u57.7%
expm1-udef70.5%
associate-/l/70.5%
add-sqr-sqrt36.0%
sqrt-unprod69.3%
sqr-neg69.3%
sqrt-unprod34.5%
add-sqr-sqrt70.5%
*-commutative70.5%
Applied egg-rr70.5%
expm1-def46.5%
expm1-log1p46.9%
associate-/r*57.2%
Simplified57.2%
if -3.80000000000000028e69 < z < 4.59999999999999979e86Initial program 95.0%
Taylor expanded in y around inf 64.2%
*-commutative64.2%
associate-/r*67.9%
Simplified67.9%
Taylor expanded in t around inf 54.6%
Final simplification55.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 1.7e-44) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.7e-44) {
tmp = x / (y * (t - 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 (t <= 1.7d-44) then
tmp = x / (y * (t - 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 (t <= 1.7e-44) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 1.7e-44: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 1.7e-44) tmp = Float64(x / Float64(y * Float64(t - 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 (t <= 1.7e-44)
tmp = x / (y * (t - 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[LessEqual[t, 1.7e-44], N[(x / N[(y * N[(t - 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}\;t \leq 1.7 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 1.70000000000000008e-44Initial program 90.7%
Taylor expanded in y around inf 56.5%
*-commutative56.5%
Simplified56.5%
if 1.70000000000000008e-44 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification61.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 1.75e-46) (/ (/ x (- t z)) y) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.75e-46) {
tmp = (x / (t - z)) / y;
} 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 (t <= 1.75d-46) then
tmp = (x / (t - z)) / y
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 (t <= 1.75e-46) {
tmp = (x / (t - z)) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 1.75e-46: tmp = (x / (t - z)) / y else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 1.75e-46) tmp = Float64(Float64(x / Float64(t - z)) / y); 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 (t <= 1.75e-46)
tmp = (x / (t - z)) / y;
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[LessEqual[t, 1.75e-46], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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}\;t \leq 1.75 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 1.7500000000000001e-46Initial program 90.7%
Taylor expanded in y around inf 56.5%
*-commutative56.5%
associate-/r*61.0%
Simplified61.0%
if 1.7500000000000001e-46 < t Initial program 86.2%
Taylor expanded in t around inf 81.2%
Final simplification65.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 89.7%
add-cube-cbrt89.1%
times-frac98.0%
pow298.0%
Applied egg-rr98.0%
associate-*r/95.7%
associate-*l/95.7%
unpow295.7%
add-cube-cbrt96.5%
Applied egg-rr96.5%
Final simplification96.5%
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 89.7%
Taylor expanded in z around 0 41.0%
Final simplification41.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023308
(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))))