
(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 20 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 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 -2e-300) t_1 (/ (/ x (- t z)) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= -2e-300) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (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) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (t - z))
if (t_1 <= (-2d-300)) then
tmp = t_1
else
tmp = (x / (t - z)) / (y - z)
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 - z) * (t - z));
double tmp;
if (t_1 <= -2e-300) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= -2e-300: tmp = t_1 else: tmp = (x / (t - z)) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= -2e-300) tmp = t_1; else tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
tmp = 0.0;
if (t_1 <= -2e-300)
tmp = t_1;
else
tmp = (x / (t - z)) / (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_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-300], t$95$1, N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -2.00000000000000005e-300Initial program 98.4%
if -2.00000000000000005e-300 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 84.5%
associate-/l/98.2%
Simplified98.2%
Final simplification98.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 z) z)))
(if (<= z -3.8e-73)
t_1
(if (<= z 5.6e-197)
(/ (/ x y) t)
(if (<= z 1.1e-159)
(* (/ x y) (/ -1.0 z))
(if (<= z 5.7e-95)
(/ (/ x t) y)
(if (<= z 1.45e-29)
(/ (- x) (* z t))
(if (<= z 1.55e-10) (* (/ x t) (/ 1.0 y)) 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 <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (x / y) * (-1.0 / z);
} else if (z <= 5.7e-95) {
tmp = (x / t) / y;
} else if (z <= 1.45e-29) {
tmp = -x / (z * t);
} else if (z <= 1.55e-10) {
tmp = (x / t) * (1.0 / 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) / z
if (z <= (-3.8d-73)) then
tmp = t_1
else if (z <= 5.6d-197) then
tmp = (x / y) / t
else if (z <= 1.1d-159) then
tmp = (x / y) * ((-1.0d0) / z)
else if (z <= 5.7d-95) then
tmp = (x / t) / y
else if (z <= 1.45d-29) then
tmp = -x / (z * t)
else if (z <= 1.55d-10) then
tmp = (x / t) * (1.0d0 / 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) / z;
double tmp;
if (z <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (x / y) * (-1.0 / z);
} else if (z <= 5.7e-95) {
tmp = (x / t) / y;
} else if (z <= 1.45e-29) {
tmp = -x / (z * t);
} else if (z <= 1.55e-10) {
tmp = (x / t) * (1.0 / y);
} 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 <= -3.8e-73: tmp = t_1 elif z <= 5.6e-197: tmp = (x / y) / t elif z <= 1.1e-159: tmp = (x / y) * (-1.0 / z) elif z <= 5.7e-95: tmp = (x / t) / y elif z <= 1.45e-29: tmp = -x / (z * t) elif z <= 1.55e-10: tmp = (x / t) * (1.0 / y) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -3.8e-73) tmp = t_1; elseif (z <= 5.6e-197) tmp = Float64(Float64(x / y) / t); elseif (z <= 1.1e-159) tmp = Float64(Float64(x / y) * Float64(-1.0 / z)); elseif (z <= 5.7e-95) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.45e-29) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.55e-10) tmp = Float64(Float64(x / t) * Float64(1.0 / 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) / z;
tmp = 0.0;
if (z <= -3.8e-73)
tmp = t_1;
elseif (z <= 5.6e-197)
tmp = (x / y) / t;
elseif (z <= 1.1e-159)
tmp = (x / y) * (-1.0 / z);
elseif (z <= 5.7e-95)
tmp = (x / t) / y;
elseif (z <= 1.45e-29)
tmp = -x / (z * t);
elseif (z <= 1.55e-10)
tmp = (x / t) * (1.0 / 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] / z), $MachinePrecision]}, If[LessEqual[z, -3.8e-73], t$95$1, If[LessEqual[z, 5.6e-197], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.1e-159], N[(N[(x / y), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-95], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.45e-29], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-10], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.8000000000000003e-73 or 1.55000000000000008e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -3.8000000000000003e-73 < z < 5.6000000000000004e-197Initial program 93.9%
associate-/l/94.2%
div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 72.6%
associate-/r*74.2%
Simplified74.2%
if 5.6000000000000004e-197 < z < 1.1e-159Initial program 91.3%
Taylor expanded in y around inf 37.4%
*-commutative37.4%
Simplified37.4%
Taylor expanded in t around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
neg-mul-128.6%
*-commutative28.6%
times-frac28.9%
Applied egg-rr28.9%
if 1.1e-159 < z < 5.7e-95Initial program 90.8%
associate-/l/95.2%
div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in t around inf 76.8%
Taylor expanded in y around inf 76.8%
un-div-inv76.9%
Applied egg-rr76.9%
if 5.7e-95 < z < 1.45000000000000012e-29Initial program 99.8%
associate-/l/85.1%
Simplified85.1%
Taylor expanded in t around inf 62.7%
Taylor expanded in y around 0 54.8%
mul-1-neg54.8%
*-commutative54.8%
Simplified54.8%
if 1.45000000000000012e-29 < z < 1.55000000000000008e-10Initial program 99.2%
Taylor expanded in z around 0 97.4%
*-un-lft-identity97.4%
times-frac98.0%
Applied egg-rr98.0%
Final simplification72.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 (/ (/ x z) z)) (t_2 (/ (/ x t) y)))
(if (<= z -3.8e-73)
t_1
(if (<= z 5.6e-197)
(/ (/ x y) t)
(if (<= z 1.1e-159)
(/ (- x) (* y z))
(if (<= z 5.7e-95)
t_2
(if (<= z 8.5e-25)
(/ (- x) (* z t))
(if (<= z 1.8e-10) t_2 t_1))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = (x / t) / y;
double tmp;
if (z <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = -x / (y * z);
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 8.5e-25) {
tmp = -x / (z * t);
} else if (z <= 1.8e-10) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = (x / t) / y
if (z <= (-3.8d-73)) then
tmp = t_1
else if (z <= 5.6d-197) then
tmp = (x / y) / t
else if (z <= 1.1d-159) then
tmp = -x / (y * z)
else if (z <= 5.7d-95) then
tmp = t_2
else if (z <= 8.5d-25) then
tmp = -x / (z * t)
else if (z <= 1.8d-10) then
tmp = t_2
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 t_2 = (x / t) / y;
double tmp;
if (z <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = -x / (y * z);
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 8.5e-25) {
tmp = -x / (z * t);
} else if (z <= 1.8e-10) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = (x / t) / y tmp = 0 if z <= -3.8e-73: tmp = t_1 elif z <= 5.6e-197: tmp = (x / y) / t elif z <= 1.1e-159: tmp = -x / (y * z) elif z <= 5.7e-95: tmp = t_2 elif z <= 8.5e-25: tmp = -x / (z * t) elif z <= 1.8e-10: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -3.8e-73) tmp = t_1; elseif (z <= 5.6e-197) tmp = Float64(Float64(x / y) / t); elseif (z <= 1.1e-159) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (z <= 5.7e-95) tmp = t_2; elseif (z <= 8.5e-25) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.8e-10) tmp = t_2; 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;
t_2 = (x / t) / y;
tmp = 0.0;
if (z <= -3.8e-73)
tmp = t_1;
elseif (z <= 5.6e-197)
tmp = (x / y) / t;
elseif (z <= 1.1e-159)
tmp = -x / (y * z);
elseif (z <= 5.7e-95)
tmp = t_2;
elseif (z <= 8.5e-25)
tmp = -x / (z * t);
elseif (z <= 1.8e-10)
tmp = t_2;
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] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -3.8e-73], t$95$1, If[LessEqual[z, 5.6e-197], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.1e-159], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-95], t$95$2, If[LessEqual[z, 8.5e-25], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-10], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.8000000000000003e-73 or 1.8e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -3.8000000000000003e-73 < z < 5.6000000000000004e-197Initial program 93.9%
associate-/l/94.2%
div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 72.6%
associate-/r*74.2%
Simplified74.2%
if 5.6000000000000004e-197 < z < 1.1e-159Initial program 91.3%
Taylor expanded in y around inf 37.4%
*-commutative37.4%
Simplified37.4%
Taylor expanded in t around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
if 1.1e-159 < z < 5.7e-95 or 8.49999999999999981e-25 < z < 1.8e-10Initial program 91.5%
associate-/l/95.5%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 78.7%
un-div-inv78.7%
Applied egg-rr78.7%
if 5.7e-95 < z < 8.49999999999999981e-25Initial program 99.8%
associate-/l/85.1%
Simplified85.1%
Taylor expanded in t around inf 62.7%
Taylor expanded in y around 0 54.8%
mul-1-neg54.8%
*-commutative54.8%
Simplified54.8%
Final simplification72.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 (/ (/ x z) z)) (t_2 (/ (/ x t) y)))
(if (<= z -3.8e-73)
t_1
(if (<= z 5.6e-197)
(/ (/ x y) t)
(if (<= z 1.1e-159)
(/ (/ (- x) y) z)
(if (<= z 6.9e-97)
t_2
(if (<= z 6e-28)
(/ (- x) (* z t))
(if (<= z 1.75e-10) t_2 t_1))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = (x / t) / y;
double tmp;
if (z <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (-x / y) / z;
} else if (z <= 6.9e-97) {
tmp = t_2;
} else if (z <= 6e-28) {
tmp = -x / (z * t);
} else if (z <= 1.75e-10) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = (x / t) / y
if (z <= (-3.8d-73)) then
tmp = t_1
else if (z <= 5.6d-197) then
tmp = (x / y) / t
else if (z <= 1.1d-159) then
tmp = (-x / y) / z
else if (z <= 6.9d-97) then
tmp = t_2
else if (z <= 6d-28) then
tmp = -x / (z * t)
else if (z <= 1.75d-10) then
tmp = t_2
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 t_2 = (x / t) / y;
double tmp;
if (z <= -3.8e-73) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (-x / y) / z;
} else if (z <= 6.9e-97) {
tmp = t_2;
} else if (z <= 6e-28) {
tmp = -x / (z * t);
} else if (z <= 1.75e-10) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = (x / t) / y tmp = 0 if z <= -3.8e-73: tmp = t_1 elif z <= 5.6e-197: tmp = (x / y) / t elif z <= 1.1e-159: tmp = (-x / y) / z elif z <= 6.9e-97: tmp = t_2 elif z <= 6e-28: tmp = -x / (z * t) elif z <= 1.75e-10: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -3.8e-73) tmp = t_1; elseif (z <= 5.6e-197) tmp = Float64(Float64(x / y) / t); elseif (z <= 1.1e-159) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= 6.9e-97) tmp = t_2; elseif (z <= 6e-28) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.75e-10) tmp = t_2; 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;
t_2 = (x / t) / y;
tmp = 0.0;
if (z <= -3.8e-73)
tmp = t_1;
elseif (z <= 5.6e-197)
tmp = (x / y) / t;
elseif (z <= 1.1e-159)
tmp = (-x / y) / z;
elseif (z <= 6.9e-97)
tmp = t_2;
elseif (z <= 6e-28)
tmp = -x / (z * t);
elseif (z <= 1.75e-10)
tmp = t_2;
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] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -3.8e-73], t$95$1, If[LessEqual[z, 5.6e-197], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.1e-159], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.9e-97], t$95$2, If[LessEqual[z, 6e-28], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-10], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{-97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-28}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.8000000000000003e-73 or 1.7499999999999999e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -3.8000000000000003e-73 < z < 5.6000000000000004e-197Initial program 93.9%
associate-/l/94.2%
div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 72.6%
associate-/r*74.2%
Simplified74.2%
if 5.6000000000000004e-197 < z < 1.1e-159Initial program 91.3%
Taylor expanded in y around inf 37.4%
*-commutative37.4%
Simplified37.4%
Taylor expanded in t around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
Taylor expanded in x around 0 28.6%
associate-*r/28.6%
associate-/r*28.9%
neg-mul-128.9%
Simplified28.9%
if 1.1e-159 < z < 6.8999999999999996e-97 or 6.00000000000000005e-28 < z < 1.7499999999999999e-10Initial program 91.5%
associate-/l/95.5%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 78.7%
un-div-inv78.7%
Applied egg-rr78.7%
if 6.8999999999999996e-97 < z < 6.00000000000000005e-28Initial program 99.8%
associate-/l/85.1%
Simplified85.1%
Taylor expanded in t around inf 62.7%
Taylor expanded in y around 0 54.8%
mul-1-neg54.8%
*-commutative54.8%
Simplified54.8%
Final simplification72.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 (/ (/ x z) z)) (t_2 (/ (/ x t) y)))
(if (<= z -6e-74)
t_1
(if (<= z 5.6e-197)
(/ (/ x y) t)
(if (<= z 1.1e-159)
(* (/ x y) (/ -1.0 z))
(if (<= z 5.7e-95)
t_2
(if (<= z 1.35e-26)
(/ (- x) (* z t))
(if (<= z 1.72e-10) t_2 t_1))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = (x / t) / y;
double tmp;
if (z <= -6e-74) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (x / y) * (-1.0 / z);
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 1.35e-26) {
tmp = -x / (z * t);
} else if (z <= 1.72e-10) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = (x / t) / y
if (z <= (-6d-74)) then
tmp = t_1
else if (z <= 5.6d-197) then
tmp = (x / y) / t
else if (z <= 1.1d-159) then
tmp = (x / y) * ((-1.0d0) / z)
else if (z <= 5.7d-95) then
tmp = t_2
else if (z <= 1.35d-26) then
tmp = -x / (z * t)
else if (z <= 1.72d-10) then
tmp = t_2
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 t_2 = (x / t) / y;
double tmp;
if (z <= -6e-74) {
tmp = t_1;
} else if (z <= 5.6e-197) {
tmp = (x / y) / t;
} else if (z <= 1.1e-159) {
tmp = (x / y) * (-1.0 / z);
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 1.35e-26) {
tmp = -x / (z * t);
} else if (z <= 1.72e-10) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = (x / t) / y tmp = 0 if z <= -6e-74: tmp = t_1 elif z <= 5.6e-197: tmp = (x / y) / t elif z <= 1.1e-159: tmp = (x / y) * (-1.0 / z) elif z <= 5.7e-95: tmp = t_2 elif z <= 1.35e-26: tmp = -x / (z * t) elif z <= 1.72e-10: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -6e-74) tmp = t_1; elseif (z <= 5.6e-197) tmp = Float64(Float64(x / y) / t); elseif (z <= 1.1e-159) tmp = Float64(Float64(x / y) * Float64(-1.0 / z)); elseif (z <= 5.7e-95) tmp = t_2; elseif (z <= 1.35e-26) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.72e-10) tmp = t_2; 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;
t_2 = (x / t) / y;
tmp = 0.0;
if (z <= -6e-74)
tmp = t_1;
elseif (z <= 5.6e-197)
tmp = (x / y) / t;
elseif (z <= 1.1e-159)
tmp = (x / y) * (-1.0 / z);
elseif (z <= 5.7e-95)
tmp = t_2;
elseif (z <= 1.35e-26)
tmp = -x / (z * t);
elseif (z <= 1.72e-10)
tmp = t_2;
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] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -6e-74], t$95$1, If[LessEqual[z, 5.6e-197], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.1e-159], N[(N[(x / y), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-95], t$95$2, If[LessEqual[z, 1.35e-26], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.72e-10], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -6 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{-1}{z}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-26}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.00000000000000014e-74 or 1.72000000000000001e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -6.00000000000000014e-74 < z < 5.6000000000000004e-197Initial program 93.9%
associate-/l/94.2%
div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in z around 0 72.6%
associate-/r*74.2%
Simplified74.2%
if 5.6000000000000004e-197 < z < 1.1e-159Initial program 91.3%
Taylor expanded in y around inf 37.4%
*-commutative37.4%
Simplified37.4%
Taylor expanded in t around 0 28.6%
associate-*r/28.6%
neg-mul-128.6%
Simplified28.6%
neg-mul-128.6%
*-commutative28.6%
times-frac28.9%
Applied egg-rr28.9%
if 1.1e-159 < z < 5.7e-95 or 1.34999999999999991e-26 < z < 1.72000000000000001e-10Initial program 91.5%
associate-/l/95.5%
div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 78.7%
un-div-inv78.7%
Applied egg-rr78.7%
if 5.7e-95 < z < 1.34999999999999991e-26Initial program 99.8%
associate-/l/85.1%
Simplified85.1%
Taylor expanded in t around inf 62.7%
Taylor expanded in y around 0 54.8%
mul-1-neg54.8%
*-commutative54.8%
Simplified54.8%
Final simplification72.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 (/ (/ x z) z)))
(if (<= z -1.9e+19)
t_1
(if (<= z 1.4e-91)
(/ (/ x (- t z)) y)
(if (<= z 1.35e-10)
(/ x (* (- y z) t))
(if (<= z 9e+151) (/ (- x) (* z (- y z))) 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.9e+19) {
tmp = t_1;
} else if (z <= 1.4e-91) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.35e-10) {
tmp = x / ((y - z) * t);
} else if (z <= 9e+151) {
tmp = -x / (z * (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 = (x / z) / z
if (z <= (-1.9d+19)) then
tmp = t_1
else if (z <= 1.4d-91) then
tmp = (x / (t - z)) / y
else if (z <= 1.35d-10) then
tmp = x / ((y - z) * t)
else if (z <= 9d+151) then
tmp = -x / (z * (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 = (x / z) / z;
double tmp;
if (z <= -1.9e+19) {
tmp = t_1;
} else if (z <= 1.4e-91) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.35e-10) {
tmp = x / ((y - z) * t);
} else if (z <= 9e+151) {
tmp = -x / (z * (y - z));
} 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.9e+19: tmp = t_1 elif z <= 1.4e-91: tmp = (x / (t - z)) / y elif z <= 1.35e-10: tmp = x / ((y - z) * t) elif z <= 9e+151: tmp = -x / (z * (y - z)) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -1.9e+19) tmp = t_1; elseif (z <= 1.4e-91) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (z <= 1.35e-10) tmp = Float64(x / Float64(Float64(y - z) * t)); elseif (z <= 9e+151) tmp = Float64(Float64(-x) / Float64(z * 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 = (x / z) / z;
tmp = 0.0;
if (z <= -1.9e+19)
tmp = t_1;
elseif (z <= 1.4e-91)
tmp = (x / (t - z)) / y;
elseif (z <= 1.35e-10)
tmp = x / ((y - z) * t);
elseif (z <= 9e+151)
tmp = -x / (z * (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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.9e+19], t$95$1, If[LessEqual[z, 1.4e-91], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.35e-10], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+151], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+151}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.9e19 or 8.9999999999999997e151 < z Initial program 78.6%
Taylor expanded in z around inf 72.6%
unpow272.6%
associate-/r*86.8%
Simplified86.8%
if -1.9e19 < z < 1.4e-91Initial program 93.8%
associate-/l/94.6%
div-inv94.5%
Applied egg-rr94.5%
frac-times93.8%
clear-num92.7%
*-rgt-identity92.7%
associate-*r/92.0%
associate-/r*92.1%
Applied egg-rr92.1%
*-un-lft-identity92.1%
div-inv91.9%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 76.9%
*-commutative76.9%
associate-/r*78.4%
Simplified78.4%
if 1.4e-91 < z < 1.35e-10Initial program 99.7%
Taylor expanded in t around inf 78.8%
if 1.35e-10 < z < 8.9999999999999997e151Initial program 90.8%
Taylor expanded in t around 0 69.3%
associate-*r/69.3%
neg-mul-169.3%
*-commutative69.3%
Simplified69.3%
Final simplification80.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) z) (- y z))))
(if (<= z -3.1e-93)
t_1
(if (<= z 1.5e-92)
(/ (/ x (- t z)) y)
(if (<= z 1.25e-10) (/ 1.0 (/ (* (- y z) t) x)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / (y - z);
double tmp;
if (z <= -3.1e-93) {
tmp = t_1;
} else if (z <= 1.5e-92) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.25e-10) {
tmp = 1.0 / (((y - z) * t) / x);
} 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 - z)
if (z <= (-3.1d-93)) then
tmp = t_1
else if (z <= 1.5d-92) then
tmp = (x / (t - z)) / y
else if (z <= 1.25d-10) then
tmp = 1.0d0 / (((y - z) * t) / x)
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 - z);
double tmp;
if (z <= -3.1e-93) {
tmp = t_1;
} else if (z <= 1.5e-92) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.25e-10) {
tmp = 1.0 / (((y - z) * t) / x);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (-x / z) / (y - z) tmp = 0 if z <= -3.1e-93: tmp = t_1 elif z <= 1.5e-92: tmp = (x / (t - z)) / y elif z <= 1.25e-10: tmp = 1.0 / (((y - z) * t) / x) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / z) / Float64(y - z)) tmp = 0.0 if (z <= -3.1e-93) tmp = t_1; elseif (z <= 1.5e-92) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (z <= 1.25e-10) tmp = Float64(1.0 / Float64(Float64(Float64(y - z) * t) / x)); 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 - z);
tmp = 0.0;
if (z <= -3.1e-93)
tmp = t_1;
elseif (z <= 1.5e-92)
tmp = (x / (t - z)) / y;
elseif (z <= 1.25e-10)
tmp = 1.0 / (((y - z) * t) / x);
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] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e-93], t$95$1, If[LessEqual[z, 1.5e-92], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.25e-10], N[(1.0 / N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{y - z}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-10}:\\
\;\;\;\;\frac{1}{\frac{\left(y - z\right) \cdot t}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.1e-93 or 1.25000000000000008e-10 < z Initial program 83.6%
Taylor expanded in t around 0 72.9%
associate-*r/72.9%
neg-mul-172.9%
*-commutative72.9%
associate-/r*86.8%
distribute-frac-neg86.8%
Simplified86.8%
if -3.1e-93 < z < 1.50000000000000007e-92Initial program 93.0%
associate-/l/94.0%
div-inv93.9%
Applied egg-rr93.9%
frac-times93.0%
clear-num91.8%
*-rgt-identity91.8%
associate-*r/91.0%
associate-/r*91.1%
Applied egg-rr91.1%
*-un-lft-identity91.1%
div-inv90.9%
times-frac93.8%
Applied egg-rr93.8%
Taylor expanded in y around inf 79.0%
*-commutative79.0%
associate-/r*80.7%
Simplified80.7%
if 1.50000000000000007e-92 < z < 1.25000000000000008e-10Initial program 99.7%
associate-/l/86.0%
div-inv86.3%
Applied egg-rr86.3%
Taylor expanded in t around inf 72.4%
div-inv72.2%
associate-/l/78.8%
clear-num78.9%
*-commutative78.9%
Applied egg-rr78.9%
Final simplification83.7%
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 z))))
(if (<= z -3.1e-93)
t_1
(if (<= z 1.9e-91)
(/ (/ x (- t z)) y)
(if (<= z 1.35e-10) (/ x (* (- y z) t)) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / (y - z);
double tmp;
if (z <= -3.1e-93) {
tmp = t_1;
} else if (z <= 1.9e-91) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.35e-10) {
tmp = x / ((y - 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) / (y - z)
if (z <= (-3.1d-93)) then
tmp = t_1
else if (z <= 1.9d-91) then
tmp = (x / (t - z)) / y
else if (z <= 1.35d-10) then
tmp = x / ((y - 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) / (y - z);
double tmp;
if (z <= -3.1e-93) {
tmp = t_1;
} else if (z <= 1.9e-91) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.35e-10) {
tmp = x / ((y - z) * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (-x / z) / (y - z) tmp = 0 if z <= -3.1e-93: tmp = t_1 elif z <= 1.9e-91: tmp = (x / (t - z)) / y elif z <= 1.35e-10: tmp = x / ((y - z) * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / z) / Float64(y - z)) tmp = 0.0 if (z <= -3.1e-93) tmp = t_1; elseif (z <= 1.9e-91) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (z <= 1.35e-10) tmp = Float64(x / Float64(Float64(y - 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) / (y - z);
tmp = 0.0;
if (z <= -3.1e-93)
tmp = t_1;
elseif (z <= 1.9e-91)
tmp = (x / (t - z)) / y;
elseif (z <= 1.35e-10)
tmp = x / ((y - 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[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e-93], t$95$1, If[LessEqual[z, 1.9e-91], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.35e-10], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{y - z}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.1e-93 or 1.35e-10 < z Initial program 83.6%
Taylor expanded in t around 0 72.9%
associate-*r/72.9%
neg-mul-172.9%
*-commutative72.9%
associate-/r*86.8%
distribute-frac-neg86.8%
Simplified86.8%
if -3.1e-93 < z < 1.89999999999999989e-91Initial program 93.0%
associate-/l/94.0%
div-inv93.9%
Applied egg-rr93.9%
frac-times93.0%
clear-num91.8%
*-rgt-identity91.8%
associate-*r/91.0%
associate-/r*91.1%
Applied egg-rr91.1%
*-un-lft-identity91.1%
div-inv90.9%
times-frac93.8%
Applied egg-rr93.8%
Taylor expanded in y around inf 79.0%
*-commutative79.0%
associate-/r*80.7%
Simplified80.7%
if 1.89999999999999989e-91 < z < 1.35e-10Initial program 99.7%
Taylor expanded in t around inf 78.8%
Final simplification83.7%
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)) (t_2 (/ (/ x t) y)))
(if (<= z -1.45e-73)
t_1
(if (<= z 5.7e-95)
t_2
(if (<= z 5.2e-22) (/ (- x) (* z t)) (if (<= z 1.46e-10) t_2 t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = (x / t) / y;
double tmp;
if (z <= -1.45e-73) {
tmp = t_1;
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 5.2e-22) {
tmp = -x / (z * t);
} else if (z <= 1.46e-10) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = (x / t) / y
if (z <= (-1.45d-73)) then
tmp = t_1
else if (z <= 5.7d-95) then
tmp = t_2
else if (z <= 5.2d-22) then
tmp = -x / (z * t)
else if (z <= 1.46d-10) then
tmp = t_2
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 t_2 = (x / t) / y;
double tmp;
if (z <= -1.45e-73) {
tmp = t_1;
} else if (z <= 5.7e-95) {
tmp = t_2;
} else if (z <= 5.2e-22) {
tmp = -x / (z * t);
} else if (z <= 1.46e-10) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = (x / t) / y tmp = 0 if z <= -1.45e-73: tmp = t_1 elif z <= 5.7e-95: tmp = t_2 elif z <= 5.2e-22: tmp = -x / (z * t) elif z <= 1.46e-10: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(Float64(x / t) / y) tmp = 0.0 if (z <= -1.45e-73) tmp = t_1; elseif (z <= 5.7e-95) tmp = t_2; elseif (z <= 5.2e-22) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.46e-10) tmp = t_2; 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;
t_2 = (x / t) / y;
tmp = 0.0;
if (z <= -1.45e-73)
tmp = t_1;
elseif (z <= 5.7e-95)
tmp = t_2;
elseif (z <= 5.2e-22)
tmp = -x / (z * t);
elseif (z <= 1.46e-10)
tmp = t_2;
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] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -1.45e-73], t$95$1, If[LessEqual[z, 5.7e-95], t$95$2, If[LessEqual[z, 5.2e-22], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.46e-10], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.45e-73 or 1.4600000000000001e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -1.45e-73 < z < 5.7e-95 or 5.2e-22 < z < 1.4600000000000001e-10Initial program 93.2%
associate-/l/94.2%
div-inv94.0%
Applied egg-rr94.0%
Taylor expanded in t around inf 80.8%
Taylor expanded in y around inf 69.5%
un-div-inv69.6%
Applied egg-rr69.6%
if 5.7e-95 < z < 5.2e-22Initial program 99.8%
associate-/l/85.1%
Simplified85.1%
Taylor expanded in t around inf 62.7%
Taylor expanded in y around 0 54.8%
mul-1-neg54.8%
*-commutative54.8%
Simplified54.8%
Final simplification71.7%
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.05e+19)
t_1
(if (<= z 2.95e-93)
(/ x (* y (- t z)))
(if (<= z 1.5e+16) (/ x (* (- y 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.05e+19) {
tmp = t_1;
} else if (z <= 2.95e-93) {
tmp = x / (y * (t - z));
} else if (z <= 1.5e+16) {
tmp = x / ((y - 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.05d+19)) then
tmp = t_1
else if (z <= 2.95d-93) then
tmp = x / (y * (t - z))
else if (z <= 1.5d+16) then
tmp = x / ((y - 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.05e+19) {
tmp = t_1;
} else if (z <= 2.95e-93) {
tmp = x / (y * (t - z));
} else if (z <= 1.5e+16) {
tmp = x / ((y - 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.05e+19: tmp = t_1 elif z <= 2.95e-93: tmp = x / (y * (t - z)) elif z <= 1.5e+16: tmp = x / ((y - z) * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -1.05e+19) tmp = t_1; elseif (z <= 2.95e-93) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (z <= 1.5e+16) tmp = Float64(x / Float64(Float64(y - 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.05e+19)
tmp = t_1;
elseif (z <= 2.95e-93)
tmp = x / (y * (t - z));
elseif (z <= 1.5e+16)
tmp = x / ((y - 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.05e+19], t$95$1, If[LessEqual[z, 2.95e-93], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+16], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.05e19 or 1.5e16 < z Initial program 80.6%
Taylor expanded in z around inf 69.5%
unpow269.5%
associate-/r*80.8%
Simplified80.8%
if -1.05e19 < z < 2.95e-93Initial program 93.8%
Taylor expanded in y around inf 76.9%
*-commutative76.9%
Simplified76.9%
if 2.95e-93 < z < 1.5e16Initial program 99.6%
Taylor expanded in t around inf 66.1%
Final simplification77.7%
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 -6.6e+24)
t_1
(if (<= z 3.7e-93)
(/ (/ x (- t z)) y)
(if (<= z 1.46e+16) (/ x (* (- y 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 <= -6.6e+24) {
tmp = t_1;
} else if (z <= 3.7e-93) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.46e+16) {
tmp = x / ((y - 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 <= (-6.6d+24)) then
tmp = t_1
else if (z <= 3.7d-93) then
tmp = (x / (t - z)) / y
else if (z <= 1.46d+16) then
tmp = x / ((y - 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 <= -6.6e+24) {
tmp = t_1;
} else if (z <= 3.7e-93) {
tmp = (x / (t - z)) / y;
} else if (z <= 1.46e+16) {
tmp = x / ((y - 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 <= -6.6e+24: tmp = t_1 elif z <= 3.7e-93: tmp = (x / (t - z)) / y elif z <= 1.46e+16: tmp = x / ((y - z) * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -6.6e+24) tmp = t_1; elseif (z <= 3.7e-93) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (z <= 1.46e+16) tmp = Float64(x / Float64(Float64(y - 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 <= -6.6e+24)
tmp = t_1;
elseif (z <= 3.7e-93)
tmp = (x / (t - z)) / y;
elseif (z <= 1.46e+16)
tmp = x / ((y - 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[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -6.6e+24], t$95$1, If[LessEqual[z, 3.7e-93], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.46e+16], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.5999999999999998e24 or 1.46e16 < z Initial program 80.6%
Taylor expanded in z around inf 69.5%
unpow269.5%
associate-/r*80.8%
Simplified80.8%
if -6.5999999999999998e24 < z < 3.70000000000000002e-93Initial program 93.8%
associate-/l/94.6%
div-inv94.5%
Applied egg-rr94.5%
frac-times93.8%
clear-num92.7%
*-rgt-identity92.7%
associate-*r/92.0%
associate-/r*92.1%
Applied egg-rr92.1%
*-un-lft-identity92.1%
div-inv91.9%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 76.9%
*-commutative76.9%
associate-/r*78.4%
Simplified78.4%
if 3.70000000000000002e-93 < z < 1.46e16Initial program 99.6%
Taylor expanded in t around inf 66.1%
Final simplification78.5%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3e+82) (not (<= z 2.3e+39))) (/ (/ (- 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 <= -3e+82) || !(z <= 2.3e+39)) {
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 <= (-3d+82)) .or. (.not. (z <= 2.3d+39))) 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 <= -3e+82) || !(z <= 2.3e+39)) {
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 <= -3e+82) or not (z <= 2.3e+39): 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 <= -3e+82) || !(z <= 2.3e+39)) 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 <= -3e+82) || ~((z <= 2.3e+39)))
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, -3e+82], N[Not[LessEqual[z, 2.3e+39]], $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 -3 \cdot 10^{+82} \lor \neg \left(z \leq 2.3 \cdot 10^{+39}\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 < -2.99999999999999989e82 or 2.30000000000000012e39 < z Initial program 77.1%
Taylor expanded in t around 0 73.6%
associate-*r/73.6%
neg-mul-173.6%
*-commutative73.6%
associate-/r*94.1%
distribute-frac-neg94.1%
Simplified94.1%
if -2.99999999999999989e82 < z < 2.30000000000000012e39Initial program 94.6%
Final simplification94.5%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.8e-67) (/ (/ x (- t z)) y) (if (<= y 2e-63) (/ (/ (- x) z) (- t z)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e-67) {
tmp = (x / (t - z)) / y;
} else if (y <= 2e-63) {
tmp = (-x / z) / (t - z);
} 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.8d-67)) then
tmp = (x / (t - z)) / y
else if (y <= 2d-63) then
tmp = (-x / z) / (t - z)
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.8e-67) {
tmp = (x / (t - z)) / y;
} else if (y <= 2e-63) {
tmp = (-x / z) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.8e-67: tmp = (x / (t - z)) / y elif y <= 2e-63: tmp = (-x / z) / (t - z) 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.8e-67) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 2e-63) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); 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.8e-67)
tmp = (x / (t - z)) / y;
elseif (y <= 2e-63)
tmp = (-x / z) / (t - z);
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.8e-67], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2e-63], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $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.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.8e-67Initial program 86.7%
associate-/l/99.9%
div-inv99.7%
Applied egg-rr99.7%
frac-times86.7%
clear-num84.4%
*-rgt-identity84.4%
associate-*r/93.5%
associate-/r*94.1%
Applied egg-rr94.1%
*-un-lft-identity94.1%
div-inv93.9%
times-frac99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 77.4%
*-commutative77.4%
associate-/r*86.7%
Simplified86.7%
if -4.8e-67 < y < 2.00000000000000013e-63Initial program 92.4%
Taylor expanded in y around 0 74.5%
mul-1-neg74.5%
associate-/r*80.9%
distribute-neg-frac80.9%
Simplified80.9%
if 2.00000000000000013e-63 < y Initial program 85.5%
associate-/l/96.2%
Simplified96.2%
Taylor expanded in t around inf 62.9%
Final simplification76.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 -3.8e+22) (not (<= z 1.46e+16))) (/ (/ x z) z) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e+22) || !(z <= 1.46e+16)) {
tmp = (x / z) / 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 <= (-3.8d+22)) .or. (.not. (z <= 1.46d+16))) then
tmp = (x / z) / 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 <= -3.8e+22) || !(z <= 1.46e+16)) {
tmp = (x / z) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.8e+22) or not (z <= 1.46e+16): tmp = (x / z) / 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 <= -3.8e+22) || !(z <= 1.46e+16)) tmp = Float64(Float64(x / z) / 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 <= -3.8e+22) || ~((z <= 1.46e+16)))
tmp = (x / z) / 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, -3.8e+22], N[Not[LessEqual[z, 1.46e+16]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $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 -3.8 \cdot 10^{+22} \lor \neg \left(z \leq 1.46 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -3.8000000000000004e22 or 1.46e16 < z Initial program 80.6%
Taylor expanded in z around inf 69.5%
unpow269.5%
associate-/r*80.8%
Simplified80.8%
if -3.8000000000000004e22 < z < 1.46e16Initial program 94.6%
Taylor expanded in t around inf 74.3%
Final simplification77.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -30000000000.0) (not (<= z 1.42e+31))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -30000000000.0) || !(z <= 1.42e+31)) {
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 <= (-30000000000.0d0)) .or. (.not. (z <= 1.42d+31))) 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 <= -30000000000.0) || !(z <= 1.42e+31)) {
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 <= -30000000000.0) or not (z <= 1.42e+31): 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 <= -30000000000.0) || !(z <= 1.42e+31)) 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 <= -30000000000.0) || ~((z <= 1.42e+31)))
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, -30000000000.0], N[Not[LessEqual[z, 1.42e+31]], $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 -30000000000 \lor \neg \left(z \leq 1.42 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3e10 or 1.41999999999999997e31 < z Initial program 81.1%
Taylor expanded in y around inf 40.0%
*-commutative40.0%
Simplified40.0%
Taylor expanded in t around 0 38.0%
associate-*r/38.0%
neg-mul-138.0%
Simplified38.0%
expm1-log1p-u37.6%
expm1-udef50.8%
add-sqr-sqrt21.4%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod29.6%
add-sqr-sqrt50.9%
associate-/r*50.8%
Applied egg-rr50.8%
expm1-def32.4%
expm1-log1p32.7%
associate-/r*36.3%
Simplified36.3%
if -3e10 < z < 1.41999999999999997e31Initial program 94.0%
Taylor expanded in z around 0 58.8%
Final simplification49.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 -3.8e-73) (not (<= z 1.3e-10))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e-73) || !(z <= 1.3e-10)) {
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.8d-73)) .or. (.not. (z <= 1.3d-10))) 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.8e-73) || !(z <= 1.3e-10)) {
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.8e-73) or not (z <= 1.3e-10): 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.8e-73) || !(z <= 1.3e-10)) 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.8e-73) || ~((z <= 1.3e-10)))
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.8e-73], N[Not[LessEqual[z, 1.3e-10]], $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.8 \cdot 10^{-73} \lor \neg \left(z \leq 1.3 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.8000000000000003e-73 or 1.29999999999999991e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
Simplified65.4%
if -3.8000000000000003e-73 < z < 1.29999999999999991e-10Initial program 93.9%
Taylor expanded in z around 0 64.4%
Final simplification64.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 -7.8e-75) (not (<= z 1.8e-10))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.8e-75) || !(z <= 1.8e-10)) {
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 <= (-7.8d-75)) .or. (.not. (z <= 1.8d-10))) 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 <= -7.8e-75) || !(z <= 1.8e-10)) {
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 <= -7.8e-75) or not (z <= 1.8e-10): 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 <= -7.8e-75) || !(z <= 1.8e-10)) 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 <= -7.8e-75) || ~((z <= 1.8e-10)))
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, -7.8e-75], N[Not[LessEqual[z, 1.8e-10]], $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 -7.8 \cdot 10^{-75} \lor \neg \left(z \leq 1.8 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -7.8000000000000003e-75 or 1.8e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
Simplified65.4%
if -7.8000000000000003e-75 < z < 1.8e-10Initial program 93.9%
associate-/l/93.2%
div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in t around inf 78.9%
Taylor expanded in y around inf 65.8%
un-div-inv65.9%
Applied egg-rr65.9%
Final simplification65.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.8e-73) (not (<= z 1.75e-10))) (/ (/ x z) z) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.8e-73) || !(z <= 1.75e-10)) {
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 <= (-3.8d-73)) .or. (.not. (z <= 1.75d-10))) 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 <= -3.8e-73) || !(z <= 1.75e-10)) {
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 <= -3.8e-73) or not (z <= 1.75e-10): 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 <= -3.8e-73) || !(z <= 1.75e-10)) tmp = Float64(Float64(x / 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 <= -3.8e-73) || ~((z <= 1.75e-10)))
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, -3.8e-73], N[Not[LessEqual[z, 1.75e-10]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $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^{-73} \lor \neg \left(z \leq 1.75 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.8000000000000003e-73 or 1.7499999999999999e-10 < z Initial program 83.2%
Taylor expanded in z around inf 65.4%
unpow265.4%
associate-/r*75.2%
Simplified75.2%
if -3.8000000000000003e-73 < z < 1.7499999999999999e-10Initial program 93.9%
associate-/l/93.2%
div-inv93.2%
Applied egg-rr93.2%
Taylor expanded in t around inf 78.9%
Taylor expanded in y around inf 65.8%
un-div-inv65.9%
Applied egg-rr65.9%
Final simplification70.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -7000000000000.0) (/ x (* y z)) (if (<= z 2.8e+101) (/ x (* y t)) (/ x (* z t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7000000000000.0) {
tmp = x / (y * z);
} else if (z <= 2.8e+101) {
tmp = x / (y * t);
} else {
tmp = x / (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 <= (-7000000000000.0d0)) then
tmp = x / (y * z)
else if (z <= 2.8d+101) then
tmp = x / (y * t)
else
tmp = x / (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 <= -7000000000000.0) {
tmp = x / (y * z);
} else if (z <= 2.8e+101) {
tmp = x / (y * t);
} else {
tmp = x / (z * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -7000000000000.0: tmp = x / (y * z) elif z <= 2.8e+101: tmp = x / (y * t) else: tmp = x / (z * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -7000000000000.0) tmp = Float64(x / Float64(y * z)); elseif (z <= 2.8e+101) tmp = Float64(x / Float64(y * t)); else tmp = Float64(x / 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 <= -7000000000000.0)
tmp = x / (y * z);
elseif (z <= 2.8e+101)
tmp = x / (y * t);
else
tmp = x / (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, -7000000000000.0], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+101], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7000000000000:\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z \cdot t}\\
\end{array}
\end{array}
if z < -7e12Initial program 81.8%
Taylor expanded in y around inf 35.0%
*-commutative35.0%
Simplified35.0%
Taylor expanded in t around 0 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
expm1-log1p-u34.7%
expm1-udef46.4%
add-sqr-sqrt17.1%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod29.5%
add-sqr-sqrt46.3%
associate-/r*46.3%
Applied egg-rr46.3%
expm1-def29.9%
expm1-log1p30.3%
associate-/r*33.5%
Simplified33.5%
if -7e12 < z < 2.79999999999999981e101Initial program 93.8%
Taylor expanded in z around 0 57.9%
if 2.79999999999999981e101 < z Initial program 76.7%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 46.8%
Taylor expanded in y around 0 44.9%
associate-*r/44.9%
associate-/r*43.7%
neg-mul-143.7%
Simplified43.7%
expm1-log1p-u43.4%
expm1-udef59.5%
div-inv59.5%
frac-times59.5%
add-sqr-sqrt23.9%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-unprod35.8%
add-sqr-sqrt59.7%
metadata-eval59.7%
div-inv59.7%
clear-num59.7%
inv-pow59.7%
pow-flip59.7%
metadata-eval59.7%
pow159.7%
Applied egg-rr59.7%
expm1-def43.0%
expm1-log1p43.3%
*-commutative43.3%
Simplified43.3%
Final simplification50.0%
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.6%
Taylor expanded in z around 0 44.4%
Final simplification44.4%
(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 2023240
(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))))