
(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 19 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 (/ (/ x (- t z)) (- y z)))
assert(y < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - 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 / (t - z)) / (y - z)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - 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[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 88.9%
associate-/l/97.5%
Simplified97.5%
Final simplification97.5%
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 (- t z)) y)))
(if (<= y -3.9e+208)
t_1
(if (<= y -7.2e-7)
(/ x (* (- t z) y))
(if (<= y -6.5e-81)
t_1
(if (<= y -1.2e-221)
(/ 1.0 (/ z (/ x z)))
(if (<= y -7.5e-259)
(/ (/ x t) (- y z))
(if (<= y 1.25e-259)
(* (/ x z) (/ 1.0 z))
(/ x (* t (- y z)))))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / (t - z)) / y;
double tmp;
if (y <= -3.9e+208) {
tmp = t_1;
} else if (y <= -7.2e-7) {
tmp = x / ((t - z) * y);
} else if (y <= -6.5e-81) {
tmp = t_1;
} else if (y <= -1.2e-221) {
tmp = 1.0 / (z / (x / z));
} else if (y <= -7.5e-259) {
tmp = (x / t) / (y - z);
} else if (y <= 1.25e-259) {
tmp = (x / z) * (1.0 / 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) :: t_1
real(8) :: tmp
t_1 = (x / (t - z)) / y
if (y <= (-3.9d+208)) then
tmp = t_1
else if (y <= (-7.2d-7)) then
tmp = x / ((t - z) * y)
else if (y <= (-6.5d-81)) then
tmp = t_1
else if (y <= (-1.2d-221)) then
tmp = 1.0d0 / (z / (x / z))
else if (y <= (-7.5d-259)) then
tmp = (x / t) / (y - z)
else if (y <= 1.25d-259) then
tmp = (x / z) * (1.0d0 / 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 t_1 = (x / (t - z)) / y;
double tmp;
if (y <= -3.9e+208) {
tmp = t_1;
} else if (y <= -7.2e-7) {
tmp = x / ((t - z) * y);
} else if (y <= -6.5e-81) {
tmp = t_1;
} else if (y <= -1.2e-221) {
tmp = 1.0 / (z / (x / z));
} else if (y <= -7.5e-259) {
tmp = (x / t) / (y - z);
} else if (y <= 1.25e-259) {
tmp = (x / z) * (1.0 / z);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / (t - z)) / y tmp = 0 if y <= -3.9e+208: tmp = t_1 elif y <= -7.2e-7: tmp = x / ((t - z) * y) elif y <= -6.5e-81: tmp = t_1 elif y <= -1.2e-221: tmp = 1.0 / (z / (x / z)) elif y <= -7.5e-259: tmp = (x / t) / (y - z) elif y <= 1.25e-259: tmp = (x / z) * (1.0 / z) else: tmp = x / (t * (y - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(t - z)) / y) tmp = 0.0 if (y <= -3.9e+208) tmp = t_1; elseif (y <= -7.2e-7) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= -6.5e-81) tmp = t_1; elseif (y <= -1.2e-221) tmp = Float64(1.0 / Float64(z / Float64(x / z))); elseif (y <= -7.5e-259) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (y <= 1.25e-259) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / (t - z)) / y;
tmp = 0.0;
if (y <= -3.9e+208)
tmp = t_1;
elseif (y <= -7.2e-7)
tmp = x / ((t - z) * y);
elseif (y <= -6.5e-81)
tmp = t_1;
elseif (y <= -1.2e-221)
tmp = 1.0 / (z / (x / z));
elseif (y <= -7.5e-259)
tmp = (x / t) / (y - z);
elseif (y <= 1.25e-259)
tmp = (x / z) * (1.0 / 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_] := Block[{t$95$1 = N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.9e+208], t$95$1, If[LessEqual[y, -7.2e-7], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.5e-81], t$95$1, If[LessEqual[y, -1.2e-221], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-259], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-259], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t - z}}{y}\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{+208}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-221}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-259}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-259}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -3.9000000000000001e208 or -7.19999999999999989e-7 < y < -6.5000000000000002e-81Initial program 86.2%
Taylor expanded in y around inf 74.2%
*-commutative74.2%
associate-/r*90.1%
Simplified90.1%
if -3.9000000000000001e208 < y < -7.19999999999999989e-7Initial program 95.0%
Taylor expanded in y around inf 88.8%
*-commutative88.8%
Simplified88.8%
if -6.5000000000000002e-81 < y < -1.20000000000000012e-221Initial program 85.8%
associate-/r*99.7%
div-inv99.5%
Applied egg-rr99.5%
associate-*l/99.6%
clear-num99.7%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 56.9%
unpow256.9%
associate-/l*70.9%
Simplified70.9%
if -1.20000000000000012e-221 < y < -7.50000000000000052e-259Initial program 99.5%
associate-/l/68.6%
Simplified68.6%
Taylor expanded in t around inf 47.3%
if -7.50000000000000052e-259 < y < 1.24999999999999994e-259Initial program 78.2%
Taylor expanded in z around inf 55.6%
unpow255.6%
Simplified55.6%
associate-/r*66.5%
div-inv66.5%
Applied egg-rr66.5%
if 1.24999999999999994e-259 < y Initial program 89.4%
Taylor expanded in t around inf 54.6%
Final simplification68.6%
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) (/ 1.0 z))))
(if (<= y -4.2e+208)
(/ (/ x y) (- t z))
(if (<= y -1.85e-66)
(/ x (* (- t z) y))
(if (<= y -1.1e-221)
t_1
(if (<= y -2.8e-258)
(/ (/ x t) (- y z))
(if (<= y 3.2e-262) t_1 (/ x (* t (- y z))))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (1.0 / z);
double tmp;
if (y <= -4.2e+208) {
tmp = (x / y) / (t - z);
} else if (y <= -1.85e-66) {
tmp = x / ((t - z) * y);
} else if (y <= -1.1e-221) {
tmp = t_1;
} else if (y <= -2.8e-258) {
tmp = (x / t) / (y - z);
} else if (y <= 3.2e-262) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x / z) * (1.0d0 / z)
if (y <= (-4.2d+208)) then
tmp = (x / y) / (t - z)
else if (y <= (-1.85d-66)) then
tmp = x / ((t - z) * y)
else if (y <= (-1.1d-221)) then
tmp = t_1
else if (y <= (-2.8d-258)) then
tmp = (x / t) / (y - z)
else if (y <= 3.2d-262) then
tmp = t_1
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 t_1 = (x / z) * (1.0 / z);
double tmp;
if (y <= -4.2e+208) {
tmp = (x / y) / (t - z);
} else if (y <= -1.85e-66) {
tmp = x / ((t - z) * y);
} else if (y <= -1.1e-221) {
tmp = t_1;
} else if (y <= -2.8e-258) {
tmp = (x / t) / (y - z);
} else if (y <= 3.2e-262) {
tmp = t_1;
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) * (1.0 / z) tmp = 0 if y <= -4.2e+208: tmp = (x / y) / (t - z) elif y <= -1.85e-66: tmp = x / ((t - z) * y) elif y <= -1.1e-221: tmp = t_1 elif y <= -2.8e-258: tmp = (x / t) / (y - z) elif y <= 3.2e-262: tmp = t_1 else: tmp = x / (t * (y - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(1.0 / z)) tmp = 0.0 if (y <= -4.2e+208) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -1.85e-66) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= -1.1e-221) tmp = t_1; elseif (y <= -2.8e-258) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (y <= 3.2e-262) tmp = t_1; else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) * (1.0 / z);
tmp = 0.0;
if (y <= -4.2e+208)
tmp = (x / y) / (t - z);
elseif (y <= -1.85e-66)
tmp = x / ((t - z) * y);
elseif (y <= -1.1e-221)
tmp = t_1;
elseif (y <= -2.8e-258)
tmp = (x / t) / (y - z);
elseif (y <= 3.2e-262)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+208], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e-66], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-221], t$95$1, If[LessEqual[y, -2.8e-258], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-262], t$95$1, N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-258}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -4.1999999999999997e208Initial program 79.8%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in y around inf 99.9%
if -4.1999999999999997e208 < y < -1.8500000000000001e-66Initial program 94.7%
Taylor expanded in y around inf 84.8%
*-commutative84.8%
Simplified84.8%
if -1.8500000000000001e-66 < y < -1.10000000000000001e-221 or -2.8000000000000002e-258 < y < 3.2e-262Initial program 84.3%
Taylor expanded in z around inf 57.7%
unpow257.7%
Simplified57.7%
associate-/r*69.3%
div-inv69.4%
Applied egg-rr69.4%
if -1.10000000000000001e-221 < y < -2.8000000000000002e-258Initial program 99.5%
associate-/l/68.6%
Simplified68.6%
Taylor expanded in t around inf 47.3%
if 3.2e-262 < y Initial program 89.4%
Taylor expanded in t around inf 54.6%
Final simplification68.5%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -4.9e+33)
(/ (/ x z) z)
(if (<= z 5.2e+35)
(/ x (* t (- y z)))
(if (or (<= z 3.6e+124) (not (<= z 5.2e+167)))
(/ 1.0 (/ z (/ x z)))
(* (/ x z) (/ -1.0 t))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.9e+33) {
tmp = (x / z) / z;
} else if (z <= 5.2e+35) {
tmp = x / (t * (y - z));
} else if ((z <= 3.6e+124) || !(z <= 5.2e+167)) {
tmp = 1.0 / (z / (x / z));
} else {
tmp = (x / z) * (-1.0 / 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 <= (-4.9d+33)) then
tmp = (x / z) / z
else if (z <= 5.2d+35) then
tmp = x / (t * (y - z))
else if ((z <= 3.6d+124) .or. (.not. (z <= 5.2d+167))) then
tmp = 1.0d0 / (z / (x / z))
else
tmp = (x / z) * ((-1.0d0) / 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 <= -4.9e+33) {
tmp = (x / z) / z;
} else if (z <= 5.2e+35) {
tmp = x / (t * (y - z));
} else if ((z <= 3.6e+124) || !(z <= 5.2e+167)) {
tmp = 1.0 / (z / (x / z));
} else {
tmp = (x / z) * (-1.0 / t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -4.9e+33: tmp = (x / z) / z elif z <= 5.2e+35: tmp = x / (t * (y - z)) elif (z <= 3.6e+124) or not (z <= 5.2e+167): tmp = 1.0 / (z / (x / z)) else: tmp = (x / z) * (-1.0 / t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -4.9e+33) tmp = Float64(Float64(x / z) / z); elseif (z <= 5.2e+35) tmp = Float64(x / Float64(t * Float64(y - z))); elseif ((z <= 3.6e+124) || !(z <= 5.2e+167)) tmp = Float64(1.0 / Float64(z / Float64(x / z))); else tmp = Float64(Float64(x / z) * Float64(-1.0 / t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -4.9e+33)
tmp = (x / z) / z;
elseif (z <= 5.2e+35)
tmp = x / (t * (y - z));
elseif ((z <= 3.6e+124) || ~((z <= 5.2e+167)))
tmp = 1.0 / (z / (x / z));
else
tmp = (x / z) * (-1.0 / 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, -4.9e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.2e+35], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.6e+124], N[Not[LessEqual[z, 5.2e+167]], $MachinePrecision]], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+124} \lor \neg \left(z \leq 5.2 \cdot 10^{+167}\right):\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{-1}{t}\\
\end{array}
\end{array}
if z < -4.90000000000000014e33Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -4.90000000000000014e33 < z < 5.20000000000000013e35Initial program 93.8%
Taylor expanded in t around inf 73.8%
if 5.20000000000000013e35 < z < 3.59999999999999986e124 or 5.2000000000000004e167 < z Initial program 85.6%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
associate-*l/99.8%
clear-num98.2%
div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 81.5%
unpow281.5%
associate-/l*87.5%
Simplified87.5%
if 3.59999999999999986e124 < z < 5.2000000000000004e167Initial program 87.8%
Taylor expanded in y around 0 64.2%
associate-*r/64.2%
neg-mul-164.2%
Simplified64.2%
neg-mul-164.2%
*-commutative64.2%
times-frac52.9%
Applied egg-rr52.9%
Taylor expanded in t around inf 46.2%
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 (<= y -7.4e-67)
(/ x (* (- t z) y))
(if (or (<= y -1.1e-221) (and (not (<= y -8e-259)) (<= y 3.2e-258)))
(* (/ x z) (/ 1.0 z))
(/ x (* t (- y z))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.4e-67) {
tmp = x / ((t - z) * y);
} else if ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258))) {
tmp = (x / z) * (1.0 / 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 <= (-7.4d-67)) then
tmp = x / ((t - z) * y)
else if ((y <= (-1.1d-221)) .or. (.not. (y <= (-8d-259))) .and. (y <= 3.2d-258)) then
tmp = (x / z) * (1.0d0 / 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 <= -7.4e-67) {
tmp = x / ((t - z) * y);
} else if ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258))) {
tmp = (x / z) * (1.0 / z);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -7.4e-67: tmp = x / ((t - z) * y) elif (y <= -1.1e-221) or (not (y <= -8e-259) and (y <= 3.2e-258)): tmp = (x / z) * (1.0 / 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 <= -7.4e-67) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif ((y <= -1.1e-221) || (!(y <= -8e-259) && (y <= 3.2e-258))) tmp = Float64(Float64(x / z) * Float64(1.0 / z)); else tmp = Float64(x / Float64(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 <= -7.4e-67)
tmp = x / ((t - z) * y);
elseif ((y <= -1.1e-221) || (~((y <= -8e-259)) && (y <= 3.2e-258)))
tmp = (x / z) * (1.0 / 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, -7.4e-67], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.1e-221], And[N[Not[LessEqual[y, -8e-259]], $MachinePrecision], LessEqual[y, 3.2e-258]]], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{-67}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-221} \lor \neg \left(y \leq -8 \cdot 10^{-259}\right) \land y \leq 3.2 \cdot 10^{-258}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -7.3999999999999999e-67Initial program 89.6%
Taylor expanded in y around inf 83.1%
*-commutative83.1%
Simplified83.1%
if -7.3999999999999999e-67 < y < -1.10000000000000001e-221 or -8.0000000000000006e-259 < y < 3.2000000000000002e-258Initial program 84.3%
Taylor expanded in z around inf 57.7%
unpow257.7%
Simplified57.7%
associate-/r*69.3%
div-inv69.4%
Applied egg-rr69.4%
if -1.10000000000000001e-221 < y < -8.0000000000000006e-259 or 3.2000000000000002e-258 < y Initial program 90.1%
Taylor expanded in t around inf 56.3%
Final simplification67.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -1.1e+34)
(/ (/ x z) z)
(if (or (<= z 3.6e+37) (and (not (<= z 3.6e+124)) (<= z 5.2e+167)))
(/ (/ x t) (- y z))
(/ 1.0 (/ z (/ x z))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.1e+34) {
tmp = (x / z) / z;
} else if ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167))) {
tmp = (x / t) / (y - z);
} else {
tmp = 1.0 / (z / (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.1d+34)) then
tmp = (x / z) / z
else if ((z <= 3.6d+37) .or. (.not. (z <= 3.6d+124)) .and. (z <= 5.2d+167)) then
tmp = (x / t) / (y - z)
else
tmp = 1.0d0 / (z / (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.1e+34) {
tmp = (x / z) / z;
} else if ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167))) {
tmp = (x / t) / (y - z);
} else {
tmp = 1.0 / (z / (x / z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -1.1e+34: tmp = (x / z) / z elif (z <= 3.6e+37) or (not (z <= 3.6e+124) and (z <= 5.2e+167)): tmp = (x / t) / (y - z) else: tmp = 1.0 / (z / (x / z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.1e+34) tmp = Float64(Float64(x / z) / z); elseif ((z <= 3.6e+37) || (!(z <= 3.6e+124) && (z <= 5.2e+167))) tmp = Float64(Float64(x / t) / Float64(y - z)); else tmp = Float64(1.0 / Float64(z / 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.1e+34)
tmp = (x / z) / z;
elseif ((z <= 3.6e+37) || (~((z <= 3.6e+124)) && (z <= 5.2e+167)))
tmp = (x / t) / (y - z);
else
tmp = 1.0 / (z / (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.1e+34], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, 3.6e+37], And[N[Not[LessEqual[z, 3.6e+124]], $MachinePrecision], LessEqual[z, 5.2e+167]]], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+34}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+37} \lor \neg \left(z \leq 3.6 \cdot 10^{+124}\right) \land z \leq 5.2 \cdot 10^{+167}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\end{array}
\end{array}
if z < -1.1000000000000001e34Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -1.1000000000000001e34 < z < 3.59999999999999998e37 or 3.59999999999999986e124 < z < 5.2000000000000004e167Initial program 93.5%
associate-/l/95.8%
Simplified95.8%
Taylor expanded in t around inf 74.1%
if 3.59999999999999998e37 < z < 3.59999999999999986e124 or 5.2000000000000004e167 < z Initial program 85.6%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
associate-*l/99.8%
clear-num98.2%
div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 81.5%
unpow281.5%
associate-/l*87.5%
Simplified87.5%
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 (<= y -4.4e+208)
(/ (/ x (- t z)) y)
(if (<= y -3.6e-35)
(/ x (* (- t z) y))
(if (<= y 1.8e-174) (* (/ -1.0 (- t z)) (/ x z)) (/ x (* t (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -3.6e-35) {
tmp = x / ((t - z) * y);
} else if (y <= 1.8e-174) {
tmp = (-1.0 / (t - z)) * (x / 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.4d+208)) then
tmp = (x / (t - z)) / y
else if (y <= (-3.6d-35)) then
tmp = x / ((t - z) * y)
else if (y <= 1.8d-174) then
tmp = ((-1.0d0) / (t - z)) * (x / 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.4e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -3.6e-35) {
tmp = x / ((t - z) * y);
} else if (y <= 1.8e-174) {
tmp = (-1.0 / (t - z)) * (x / 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.4e+208: tmp = (x / (t - z)) / y elif y <= -3.6e-35: tmp = x / ((t - z) * y) elif y <= 1.8e-174: tmp = (-1.0 / (t - z)) * (x / 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.4e+208) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -3.6e-35) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 1.8e-174) tmp = Float64(Float64(-1.0 / Float64(t - z)) * Float64(x / z)); else tmp = Float64(x / Float64(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.4e+208)
tmp = (x / (t - z)) / y;
elseif (y <= -3.6e-35)
tmp = x / ((t - z) * y);
elseif (y <= 1.8e-174)
tmp = (-1.0 / (t - z)) * (x / 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.4e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -3.6e-35], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-174], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-174}:\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -4.40000000000000029e208Initial program 79.8%
Taylor expanded in y around inf 79.8%
*-commutative79.8%
associate-/r*99.9%
Simplified99.9%
if -4.40000000000000029e208 < y < -3.60000000000000019e-35Initial program 95.6%
Taylor expanded in y around inf 87.8%
*-commutative87.8%
Simplified87.8%
if -3.60000000000000019e-35 < y < 1.79999999999999999e-174Initial program 85.8%
Taylor expanded in y around 0 70.4%
associate-*r/70.4%
neg-mul-170.4%
Simplified70.4%
neg-mul-170.4%
*-commutative70.4%
times-frac82.1%
Applied egg-rr82.1%
if 1.79999999999999999e-174 < y Initial program 90.8%
Taylor expanded in t around inf 58.2%
Final simplification75.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -4e+208)
(/ (/ x (- t z)) y)
(if (<= y -7.5e-36)
(/ x (* (- t z) y))
(if (<= y 4.8e-170) (/ (- 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 <= -4e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -7.5e-36) {
tmp = x / ((t - z) * y);
} else if (y <= 4.8e-170) {
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 <= (-4d+208)) then
tmp = (x / (t - z)) / y
else if (y <= (-7.5d-36)) then
tmp = x / ((t - z) * y)
else if (y <= 4.8d-170) 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 <= -4e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -7.5e-36) {
tmp = x / ((t - z) * y);
} else if (y <= 4.8e-170) {
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 <= -4e+208: tmp = (x / (t - z)) / y elif y <= -7.5e-36: tmp = x / ((t - z) * y) elif y <= 4.8e-170: 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 <= -4e+208) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -7.5e-36) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 4.8e-170) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(x / Float64(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 <= -4e+208)
tmp = (x / (t - z)) / y;
elseif (y <= -7.5e-36)
tmp = x / ((t - z) * y);
elseif (y <= 4.8e-170)
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, -4e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -7.5e-36], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-170], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -3.9999999999999999e208Initial program 79.8%
Taylor expanded in y around inf 79.8%
*-commutative79.8%
associate-/r*99.9%
Simplified99.9%
if -3.9999999999999999e208 < y < -7.49999999999999972e-36Initial program 95.6%
Taylor expanded in y around inf 87.8%
*-commutative87.8%
Simplified87.8%
if -7.49999999999999972e-36 < y < 4.7999999999999999e-170Initial program 85.8%
Taylor expanded in y around 0 70.4%
associate-*r/70.4%
neg-mul-170.4%
Simplified70.4%
if 4.7999999999999999e-170 < y Initial program 90.8%
Taylor expanded in t around inf 58.2%
Final simplification71.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -6.8e+208)
(/ (/ x (- t z)) y)
(if (<= y -2.6e-35)
(/ x (* (- t z) y))
(if (<= y 1.15e-169) (/ (/ (- 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 <= -6.8e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.6e-35) {
tmp = x / ((t - z) * y);
} else if (y <= 1.15e-169) {
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 <= (-6.8d+208)) then
tmp = (x / (t - z)) / y
else if (y <= (-2.6d-35)) then
tmp = x / ((t - z) * y)
else if (y <= 1.15d-169) 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 <= -6.8e+208) {
tmp = (x / (t - z)) / y;
} else if (y <= -2.6e-35) {
tmp = x / ((t - z) * y);
} else if (y <= 1.15e-169) {
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 <= -6.8e+208: tmp = (x / (t - z)) / y elif y <= -2.6e-35: tmp = x / ((t - z) * y) elif y <= 1.15e-169: 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 <= -6.8e+208) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= -2.6e-35) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 1.15e-169) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(x / Float64(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 <= -6.8e+208)
tmp = (x / (t - z)) / y;
elseif (y <= -2.6e-35)
tmp = x / ((t - z) * y);
elseif (y <= 1.15e-169)
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, -6.8e+208], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.6e-35], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-169], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+208}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-169}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -6.7999999999999997e208Initial program 79.8%
Taylor expanded in y around inf 79.8%
*-commutative79.8%
associate-/r*99.9%
Simplified99.9%
if -6.7999999999999997e208 < y < -2.60000000000000005e-35Initial program 95.6%
Taylor expanded in y around inf 87.8%
*-commutative87.8%
Simplified87.8%
if -2.60000000000000005e-35 < y < 1.15e-169Initial program 86.0%
Taylor expanded in y around 0 70.8%
mul-1-neg70.8%
distribute-frac-neg70.8%
associate-/r*82.3%
Simplified82.3%
if 1.15e-169 < y Initial program 90.7%
Taylor expanded in t around inf 57.8%
Final simplification75.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= z -9.5e+124)
(/ (/ (- x) (- y z)) z)
(if (<= z 2.5e+150)
(/ x (* (- t z) (- y z)))
(* (/ -1.0 (- t z)) (/ x z)))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.5e+124) {
tmp = (-x / (y - z)) / z;
} else if (z <= 2.5e+150) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (-1.0 / (t - z)) * (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 <= (-9.5d+124)) then
tmp = (-x / (y - z)) / z
else if (z <= 2.5d+150) then
tmp = x / ((t - z) * (y - z))
else
tmp = ((-1.0d0) / (t - z)) * (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 <= -9.5e+124) {
tmp = (-x / (y - z)) / z;
} else if (z <= 2.5e+150) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (-1.0 / (t - z)) * (x / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -9.5e+124: tmp = (-x / (y - z)) / z elif z <= 2.5e+150: tmp = x / ((t - z) * (y - z)) else: tmp = (-1.0 / (t - z)) * (x / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -9.5e+124) tmp = Float64(Float64(Float64(-x) / Float64(y - z)) / z); elseif (z <= 2.5e+150) tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z))); else tmp = Float64(Float64(-1.0 / Float64(t - z)) * 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 <= -9.5e+124)
tmp = (-x / (y - z)) / z;
elseif (z <= 2.5e+150)
tmp = x / ((t - z) * (y - z));
else
tmp = (-1.0 / (t - z)) * (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, -9.5e+124], N[(N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.5e+150], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+124}:\\
\;\;\;\;\frac{\frac{-x}{y - z}}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{t - z} \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -9.50000000000000004e124Initial program 80.4%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 80.3%
mul-1-neg80.3%
associate-/r*94.1%
distribute-neg-frac94.1%
distribute-frac-neg94.1%
Simplified94.1%
if -9.50000000000000004e124 < z < 2.50000000000000004e150Initial program 92.7%
if 2.50000000000000004e150 < z Initial program 82.0%
Taylor expanded in y around 0 82.0%
associate-*r/82.0%
neg-mul-182.0%
Simplified82.0%
neg-mul-182.0%
*-commutative82.0%
times-frac97.2%
Applied egg-rr97.2%
Final simplification93.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -1.6e+33) (/ (/ x z) z) (if (<= z 7.8e+39) (/ (/ x t) y) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e+33) {
tmp = (x / z) / z;
} else if (z <= 7.8e+39) {
tmp = (x / t) / y;
} else {
tmp = (x / z) * (1.0 / 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.6d+33)) then
tmp = (x / z) / z
else if (z <= 7.8d+39) then
tmp = (x / t) / y
else
tmp = (x / z) * (1.0d0 / 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.6e+33) {
tmp = (x / z) / z;
} else if (z <= 7.8e+39) {
tmp = (x / t) / y;
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -1.6e+33: tmp = (x / z) / z elif z <= 7.8e+39: tmp = (x / t) / y else: tmp = (x / z) * (1.0 / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.6e+33) tmp = Float64(Float64(x / z) / z); elseif (z <= 7.8e+39) tmp = Float64(Float64(x / t) / y); else tmp = Float64(Float64(x / z) * Float64(1.0 / 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.6e+33)
tmp = (x / z) / z;
elseif (z <= 7.8e+39)
tmp = (x / t) / y;
else
tmp = (x / z) * (1.0 / 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.6e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7.8e+39], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+39}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -1.60000000000000009e33Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -1.60000000000000009e33 < z < 7.8000000000000002e39Initial program 93.8%
Taylor expanded in y around inf 75.6%
*-commutative75.6%
associate-/r*76.8%
Simplified76.8%
Taylor expanded in t around inf 62.3%
if 7.8000000000000002e39 < z Initial program 85.9%
Taylor expanded in z around inf 71.1%
unpow271.1%
Simplified71.1%
associate-/r*75.2%
div-inv75.3%
Applied egg-rr75.3%
Final simplification69.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -9.5e+33) (/ (/ x z) z) (if (<= z 7e+35) (/ 1.0 (* y (/ t x))) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.5e+33) {
tmp = (x / z) / z;
} else if (z <= 7e+35) {
tmp = 1.0 / (y * (t / x));
} else {
tmp = (x / z) * (1.0 / 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 <= (-9.5d+33)) then
tmp = (x / z) / z
else if (z <= 7d+35) then
tmp = 1.0d0 / (y * (t / x))
else
tmp = (x / z) * (1.0d0 / 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 <= -9.5e+33) {
tmp = (x / z) / z;
} else if (z <= 7e+35) {
tmp = 1.0 / (y * (t / x));
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -9.5e+33: tmp = (x / z) / z elif z <= 7e+35: tmp = 1.0 / (y * (t / x)) else: tmp = (x / z) * (1.0 / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -9.5e+33) tmp = Float64(Float64(x / z) / z); elseif (z <= 7e+35) tmp = Float64(1.0 / Float64(y * Float64(t / x))); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -9.5e+33)
tmp = (x / z) / z;
elseif (z <= 7e+35)
tmp = 1.0 / (y * (t / x));
else
tmp = (x / z) * (1.0 / 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, -9.5e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 7e+35], N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+35}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -9.5000000000000003e33Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -9.5000000000000003e33 < z < 7.0000000000000001e35Initial program 93.8%
Taylor expanded in y around inf 75.6%
*-commutative75.6%
associate-/r*76.8%
Simplified76.8%
Taylor expanded in t around inf 62.3%
clear-num62.0%
inv-pow62.1%
div-inv61.6%
clear-num62.1%
Applied egg-rr62.1%
unpow-162.1%
Simplified62.1%
if 7.0000000000000001e35 < z Initial program 85.9%
Taylor expanded in z around inf 71.1%
unpow271.1%
Simplified71.1%
associate-/r*75.2%
div-inv75.3%
Applied egg-rr75.3%
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 (<= z -8e+33) (/ (/ x z) z) (if (<= z 3.3e+35) (/ 1.0 (/ y (/ x t))) (* (/ x z) (/ 1.0 z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8e+33) {
tmp = (x / z) / z;
} else if (z <= 3.3e+35) {
tmp = 1.0 / (y / (x / t));
} else {
tmp = (x / z) * (1.0 / 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 <= (-8d+33)) then
tmp = (x / z) / z
else if (z <= 3.3d+35) then
tmp = 1.0d0 / (y / (x / t))
else
tmp = (x / z) * (1.0d0 / 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 <= -8e+33) {
tmp = (x / z) / z;
} else if (z <= 3.3e+35) {
tmp = 1.0 / (y / (x / t));
} else {
tmp = (x / z) * (1.0 / z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -8e+33: tmp = (x / z) / z elif z <= 3.3e+35: tmp = 1.0 / (y / (x / t)) else: tmp = (x / z) * (1.0 / z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -8e+33) tmp = Float64(Float64(x / z) / z); elseif (z <= 3.3e+35) tmp = Float64(1.0 / Float64(y / Float64(x / t))); else tmp = Float64(Float64(x / z) * Float64(1.0 / z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -8e+33)
tmp = (x / z) / z;
elseif (z <= 3.3e+35)
tmp = 1.0 / (y / (x / t));
else
tmp = (x / z) * (1.0 / 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, -8e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.3e+35], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+35}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if z < -7.9999999999999996e33Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -7.9999999999999996e33 < z < 3.3000000000000002e35Initial program 93.8%
associate-/r*96.7%
div-inv96.6%
Applied egg-rr96.6%
associate-*l/95.6%
clear-num95.2%
div-inv95.3%
Applied egg-rr95.3%
Taylor expanded in z around 0 61.0%
associate-/l*62.0%
Simplified62.0%
if 3.3000000000000002e35 < z Initial program 85.9%
Taylor expanded in z around inf 71.1%
unpow271.1%
Simplified71.1%
associate-/r*75.2%
div-inv75.3%
Applied egg-rr75.3%
Final simplification69.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -1.5e+33) (/ (/ x z) z) (if (<= z 5.1e+38) (/ 1.0 (/ y (/ x t))) (/ 1.0 (/ z (/ x z))))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.5e+33) {
tmp = (x / z) / z;
} else if (z <= 5.1e+38) {
tmp = 1.0 / (y / (x / t));
} else {
tmp = 1.0 / (z / (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.5d+33)) then
tmp = (x / z) / z
else if (z <= 5.1d+38) then
tmp = 1.0d0 / (y / (x / t))
else
tmp = 1.0d0 / (z / (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.5e+33) {
tmp = (x / z) / z;
} else if (z <= 5.1e+38) {
tmp = 1.0 / (y / (x / t));
} else {
tmp = 1.0 / (z / (x / z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -1.5e+33: tmp = (x / z) / z elif z <= 5.1e+38: tmp = 1.0 / (y / (x / t)) else: tmp = 1.0 / (z / (x / z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -1.5e+33) tmp = Float64(Float64(x / z) / z); elseif (z <= 5.1e+38) tmp = Float64(1.0 / Float64(y / Float64(x / t))); else tmp = Float64(1.0 / Float64(z / 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.5e+33)
tmp = (x / z) / z;
elseif (z <= 5.1e+38)
tmp = 1.0 / (y / (x / t));
else
tmp = 1.0 / (z / (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.5e+33], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5.1e+38], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{x}{z}}}\\
\end{array}
\end{array}
if z < -1.49999999999999992e33Initial program 80.7%
Taylor expanded in z around inf 71.9%
unpow271.9%
associate-/r*79.4%
Simplified79.4%
if -1.49999999999999992e33 < z < 5.1000000000000001e38Initial program 93.8%
associate-/r*96.7%
div-inv96.6%
Applied egg-rr96.6%
associate-*l/95.6%
clear-num95.2%
div-inv95.3%
Applied egg-rr95.3%
Taylor expanded in z around 0 61.0%
associate-/l*62.0%
Simplified62.0%
if 5.1000000000000001e38 < z Initial program 85.9%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
associate-*l/99.8%
clear-num98.4%
div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in z around inf 71.6%
unpow271.6%
associate-/l*76.6%
Simplified76.6%
Final simplification69.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 -9.8e+33) (not (<= z 4.9e+113))) (/ x (* z y)) (/ x (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.8e+33) || !(z <= 4.9e+113)) {
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 <= (-9.8d+33)) .or. (.not. (z <= 4.9d+113))) 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 <= -9.8e+33) || !(z <= 4.9e+113)) {
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 <= -9.8e+33) or not (z <= 4.9e+113): 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 <= -9.8e+33) || !(z <= 4.9e+113)) tmp = Float64(x / Float64(z * y)); else tmp = Float64(x / Float64(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 <= -9.8e+33) || ~((z <= 4.9e+113)))
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, -9.8e+33], N[Not[LessEqual[z, 4.9e+113]], $MachinePrecision]], N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+33} \lor \neg \left(z \leq 4.9 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -9.80000000000000027e33 or 4.90000000000000021e113 < z Initial program 82.5%
Taylor expanded in y around inf 41.7%
*-commutative41.7%
associate-/r*50.2%
Simplified50.2%
Taylor expanded in t around 0 46.4%
associate-*r/46.4%
neg-mul-146.4%
Simplified46.4%
expm1-log1p-u45.5%
expm1-udef59.0%
associate-/l/59.0%
add-sqr-sqrt32.5%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod26.5%
add-sqr-sqrt59.0%
Applied egg-rr59.0%
expm1-def37.1%
expm1-log1p37.5%
Simplified37.5%
if -9.80000000000000027e33 < z < 4.90000000000000021e113Initial program 93.5%
Taylor expanded in z around 0 58.8%
Final simplification49.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -6.8e-21) (not (<= z 2.85e+35))) (/ x (* z z)) (/ x (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.8e-21) || !(z <= 2.85e+35)) {
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 <= (-6.8d-21)) .or. (.not. (z <= 2.85d+35))) 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 <= -6.8e-21) || !(z <= 2.85e+35)) {
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 <= -6.8e-21) or not (z <= 2.85e+35): 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 <= -6.8e-21) || !(z <= 2.85e+35)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(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 <= -6.8e-21) || ~((z <= 2.85e+35)))
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, -6.8e-21], N[Not[LessEqual[z, 2.85e+35]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-21} \lor \neg \left(z \leq 2.85 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -6.8e-21 or 2.84999999999999997e35 < z Initial program 83.1%
Taylor expanded in z around inf 67.5%
unpow267.5%
Simplified67.5%
if -6.8e-21 < z < 2.84999999999999997e35Initial program 94.7%
Taylor expanded in z around 0 65.1%
Final simplification66.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 -1.5e+33) (not (<= z 7.2e+40))) (/ x (* z z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.5e+33) || !(z <= 7.2e+40)) {
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 <= (-1.5d+33)) .or. (.not. (z <= 7.2d+40))) 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 <= -1.5e+33) || !(z <= 7.2e+40)) {
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 <= -1.5e+33) or not (z <= 7.2e+40): 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 <= -1.5e+33) || !(z <= 7.2e+40)) 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 <= -1.5e+33) || ~((z <= 7.2e+40)))
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, -1.5e+33], N[Not[LessEqual[z, 7.2e+40]], $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 -1.5 \cdot 10^{+33} \lor \neg \left(z \leq 7.2 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.49999999999999992e33 or 7.19999999999999993e40 < z Initial program 83.0%
Taylor expanded in z around inf 71.5%
unpow271.5%
Simplified71.5%
if -1.49999999999999992e33 < z < 7.19999999999999993e40Initial program 93.8%
Taylor expanded in y around inf 75.6%
*-commutative75.6%
associate-/r*76.8%
Simplified76.8%
Taylor expanded in t around inf 62.3%
Final simplification66.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 -3.2e+33) (not (<= z 4.2e+35))) (/ (/ x z) z) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e+33) || !(z <= 4.2e+35)) {
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.2d+33)) .or. (.not. (z <= 4.2d+35))) 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.2e+33) || !(z <= 4.2e+35)) {
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.2e+33) or not (z <= 4.2e+35): 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.2e+33) || !(z <= 4.2e+35)) 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.2e+33) || ~((z <= 4.2e+35)))
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.2e+33], N[Not[LessEqual[z, 4.2e+35]], $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.2 \cdot 10^{+33} \lor \neg \left(z \leq 4.2 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.20000000000000017e33 or 4.1999999999999998e35 < z Initial program 83.0%
Taylor expanded in z around inf 71.5%
unpow271.5%
associate-/r*77.6%
Simplified77.6%
if -3.20000000000000017e33 < z < 4.1999999999999998e35Initial program 93.8%
Taylor expanded in y around inf 75.6%
*-commutative75.6%
associate-/r*76.8%
Simplified76.8%
Taylor expanded in t around inf 62.3%
Final simplification69.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* t y)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (t * y);
}
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 / (t * y)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (t * y)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(t * y)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (t * y);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 88.9%
Taylor expanded in z around 0 41.8%
Final simplification41.8%
(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 2023200
(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))))