
(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 14 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}
(FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - 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 / (t - z)) / (y - z)
end function
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
def code(x, y, z, t): return (x / (t - z)) / (y - z)
function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
function tmp = code(x, y, z, t) tmp = (x / (t - z)) / (y - z); end
code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 87.7%
associate-/l/97.3%
Simplified97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)) (t_2 (/ x (* y (- z)))))
(if (<= y -2.65e+244)
t_1
(if (<= y -8.5e+164)
t_2
(if (<= y -5e+74)
t_1
(if (<= y -1150.0)
t_2
(if (<= y -3.4e-46)
t_1
(if (<= y 4e-56) (/ (/ x t) (- z)) (/ (/ x t) y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (y * -z);
double tmp;
if (y <= -2.65e+244) {
tmp = t_1;
} else if (y <= -8.5e+164) {
tmp = t_2;
} else if (y <= -5e+74) {
tmp = t_1;
} else if (y <= -1150.0) {
tmp = t_2;
} else if (y <= -3.4e-46) {
tmp = t_1;
} else if (y <= 4e-56) {
tmp = (x / t) / -z;
} else {
tmp = (x / t) / y;
}
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) :: t_2
real(8) :: tmp
t_1 = (x / y) / t
t_2 = x / (y * -z)
if (y <= (-2.65d+244)) then
tmp = t_1
else if (y <= (-8.5d+164)) then
tmp = t_2
else if (y <= (-5d+74)) then
tmp = t_1
else if (y <= (-1150.0d0)) then
tmp = t_2
else if (y <= (-3.4d-46)) then
tmp = t_1
else if (y <= 4d-56) then
tmp = (x / t) / -z
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (y * -z);
double tmp;
if (y <= -2.65e+244) {
tmp = t_1;
} else if (y <= -8.5e+164) {
tmp = t_2;
} else if (y <= -5e+74) {
tmp = t_1;
} else if (y <= -1150.0) {
tmp = t_2;
} else if (y <= -3.4e-46) {
tmp = t_1;
} else if (y <= 4e-56) {
tmp = (x / t) / -z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) / t t_2 = x / (y * -z) tmp = 0 if y <= -2.65e+244: tmp = t_1 elif y <= -8.5e+164: tmp = t_2 elif y <= -5e+74: tmp = t_1 elif y <= -1150.0: tmp = t_2 elif y <= -3.4e-46: tmp = t_1 elif y <= 4e-56: tmp = (x / t) / -z else: tmp = (x / t) / y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) t_2 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (y <= -2.65e+244) tmp = t_1; elseif (y <= -8.5e+164) tmp = t_2; elseif (y <= -5e+74) tmp = t_1; elseif (y <= -1150.0) tmp = t_2; elseif (y <= -3.4e-46) tmp = t_1; elseif (y <= 4e-56) tmp = Float64(Float64(x / t) / Float64(-z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) / t; t_2 = x / (y * -z); tmp = 0.0; if (y <= -2.65e+244) tmp = t_1; elseif (y <= -8.5e+164) tmp = t_2; elseif (y <= -5e+74) tmp = t_1; elseif (y <= -1150.0) tmp = t_2; elseif (y <= -3.4e-46) tmp = t_1; elseif (y <= 4e-56) tmp = (x / t) / -z; else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.65e+244], t$95$1, If[LessEqual[y, -8.5e+164], t$95$2, If[LessEqual[y, -5e+74], t$95$1, If[LessEqual[y, -1150.0], t$95$2, If[LessEqual[y, -3.4e-46], t$95$1, If[LessEqual[y, 4e-56], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;y \leq -2.65 \cdot 10^{+244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1150:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.6499999999999999e244 or -8.50000000000000027e164 < y < -4.99999999999999963e74 or -1150 < y < -3.39999999999999996e-46Initial program 88.5%
Taylor expanded in z around 0 62.7%
div-inv62.6%
associate-/r*62.6%
Applied egg-rr62.6%
*-commutative62.6%
associate-*l/66.1%
associate-*r/66.1%
associate-*l/66.1%
*-lft-identity66.1%
Simplified66.1%
if -2.6499999999999999e244 < y < -8.50000000000000027e164 or -4.99999999999999963e74 < y < -1150Initial program 93.9%
Taylor expanded in x around 0 93.9%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in y around inf 93.0%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
distribute-neg-frac269.2%
*-commutative69.2%
distribute-rgt-neg-out69.2%
Simplified69.2%
if -3.39999999999999996e-46 < y < 4.0000000000000002e-56Initial program 86.8%
associate-/l/98.3%
div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in y around 0 77.6%
mul-1-neg77.6%
associate-/r*86.7%
distribute-neg-frac86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in z around 0 46.5%
mul-1-neg46.5%
associate-/r*49.9%
distribute-neg-frac249.9%
Simplified49.9%
if 4.0000000000000002e-56 < y Initial program 86.3%
associate-/l/96.3%
Simplified96.3%
clear-num96.2%
associate-/r/96.1%
Applied egg-rr96.1%
Taylor expanded in z around 0 43.3%
associate-/r*47.6%
Simplified47.6%
Final simplification54.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)) (t_2 (/ x (* z (- y)))))
(if (<= y -1e+251)
t_1
(if (<= y -1.8e+165)
t_2
(if (<= y -5.8e+74)
t_1
(if (<= y -1550.0)
t_2
(if (<= y -2.1e-46)
t_1
(if (<= y 2e-56) (/ x (* z (- t))) (/ (/ x t) y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (z * -y);
double tmp;
if (y <= -1e+251) {
tmp = t_1;
} else if (y <= -1.8e+165) {
tmp = t_2;
} else if (y <= -5.8e+74) {
tmp = t_1;
} else if (y <= -1550.0) {
tmp = t_2;
} else if (y <= -2.1e-46) {
tmp = t_1;
} else if (y <= 2e-56) {
tmp = x / (z * -t);
} else {
tmp = (x / t) / y;
}
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) :: t_2
real(8) :: tmp
t_1 = (x / y) / t
t_2 = x / (z * -y)
if (y <= (-1d+251)) then
tmp = t_1
else if (y <= (-1.8d+165)) then
tmp = t_2
else if (y <= (-5.8d+74)) then
tmp = t_1
else if (y <= (-1550.0d0)) then
tmp = t_2
else if (y <= (-2.1d-46)) then
tmp = t_1
else if (y <= 2d-56) then
tmp = x / (z * -t)
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = x / (z * -y);
double tmp;
if (y <= -1e+251) {
tmp = t_1;
} else if (y <= -1.8e+165) {
tmp = t_2;
} else if (y <= -5.8e+74) {
tmp = t_1;
} else if (y <= -1550.0) {
tmp = t_2;
} else if (y <= -2.1e-46) {
tmp = t_1;
} else if (y <= 2e-56) {
tmp = x / (z * -t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) / t t_2 = x / (z * -y) tmp = 0 if y <= -1e+251: tmp = t_1 elif y <= -1.8e+165: tmp = t_2 elif y <= -5.8e+74: tmp = t_1 elif y <= -1550.0: tmp = t_2 elif y <= -2.1e-46: tmp = t_1 elif y <= 2e-56: tmp = x / (z * -t) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) t_2 = Float64(x / Float64(z * Float64(-y))) tmp = 0.0 if (y <= -1e+251) tmp = t_1; elseif (y <= -1.8e+165) tmp = t_2; elseif (y <= -5.8e+74) tmp = t_1; elseif (y <= -1550.0) tmp = t_2; elseif (y <= -2.1e-46) tmp = t_1; elseif (y <= 2e-56) tmp = Float64(x / Float64(z * Float64(-t))); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) / t; t_2 = x / (z * -y); tmp = 0.0; if (y <= -1e+251) tmp = t_1; elseif (y <= -1.8e+165) tmp = t_2; elseif (y <= -5.8e+74) tmp = t_1; elseif (y <= -1550.0) tmp = t_2; elseif (y <= -2.1e-46) tmp = t_1; elseif (y <= 2e-56) tmp = x / (z * -t); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+251], t$95$1, If[LessEqual[y, -1.8e+165], t$95$2, If[LessEqual[y, -5.8e+74], t$95$1, If[LessEqual[y, -1550.0], t$95$2, If[LessEqual[y, -2.1e-46], t$95$1, If[LessEqual[y, 2e-56], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{x}{z \cdot \left(-y\right)}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+165}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1550:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -1e251 or -1.7999999999999999e165 < y < -5.8000000000000005e74 or -1550 < y < -2.09999999999999987e-46Initial program 88.5%
Taylor expanded in z around 0 62.7%
div-inv62.6%
associate-/r*62.6%
Applied egg-rr62.6%
*-commutative62.6%
associate-*l/66.1%
associate-*r/66.1%
associate-*l/66.1%
*-lft-identity66.1%
Simplified66.1%
if -1e251 < y < -1.7999999999999999e165 or -5.8000000000000005e74 < y < -1550Initial program 93.9%
Taylor expanded in x around 0 93.9%
associate-/l/100.0%
Simplified100.0%
Taylor expanded in y around inf 93.0%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
distribute-neg-frac269.2%
*-commutative69.2%
distribute-rgt-neg-out69.2%
Simplified69.2%
if -2.09999999999999987e-46 < y < 2.0000000000000001e-56Initial program 86.8%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in t around inf 57.4%
Taylor expanded in y around 0 46.5%
associate-*r/46.5%
neg-mul-146.5%
*-commutative46.5%
Simplified46.5%
if 2.0000000000000001e-56 < y Initial program 86.3%
associate-/l/96.3%
Simplified96.3%
clear-num96.2%
associate-/r/96.1%
Applied egg-rr96.1%
Taylor expanded in z around 0 43.3%
associate-/r*47.6%
Simplified47.6%
Final simplification53.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (+ t z)))))
(if (<= t -6.8e-234)
(/ (/ x y) (- t z))
(if (<= t 3.9e-244)
t_1
(if (<= t 1.45e-111)
(/ x (* (- t z) y))
(if (<= t 1.25e-58) t_1 (/ (/ x t) (- y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double tmp;
if (t <= -6.8e-234) {
tmp = (x / y) / (t - z);
} else if (t <= 3.9e-244) {
tmp = t_1;
} else if (t <= 1.45e-111) {
tmp = x / ((t - z) * y);
} else if (t <= 1.25e-58) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
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 = x / (z * (t + z))
if (t <= (-6.8d-234)) then
tmp = (x / y) / (t - z)
else if (t <= 3.9d-244) then
tmp = t_1
else if (t <= 1.45d-111) then
tmp = x / ((t - z) * y)
else if (t <= 1.25d-58) then
tmp = t_1
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double tmp;
if (t <= -6.8e-234) {
tmp = (x / y) / (t - z);
} else if (t <= 3.9e-244) {
tmp = t_1;
} else if (t <= 1.45e-111) {
tmp = x / ((t - z) * y);
} else if (t <= 1.25e-58) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * (t + z)) tmp = 0 if t <= -6.8e-234: tmp = (x / y) / (t - z) elif t <= 3.9e-244: tmp = t_1 elif t <= 1.45e-111: tmp = x / ((t - z) * y) elif t <= 1.25e-58: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(t + z))) tmp = 0.0 if (t <= -6.8e-234) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.9e-244) tmp = t_1; elseif (t <= 1.45e-111) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (t <= 1.25e-58) tmp = t_1; else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * (t + z)); tmp = 0.0; if (t <= -6.8e-234) tmp = (x / y) / (t - z); elseif (t <= 3.9e-244) tmp = t_1; elseif (t <= 1.45e-111) tmp = x / ((t - z) * y); elseif (t <= 1.25e-58) tmp = t_1; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-234], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-244], t$95$1, If[LessEqual[t, 1.45e-111], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-58], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(t + z\right)}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{-234}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -6.79999999999999971e-234Initial program 89.2%
Taylor expanded in x around 0 89.2%
associate-/l/95.3%
Simplified95.3%
Taylor expanded in y around inf 59.8%
if -6.79999999999999971e-234 < t < 3.8999999999999999e-244 or 1.45000000000000001e-111 < t < 1.24999999999999994e-58Initial program 92.1%
associate-/l/96.5%
div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in y around 0 68.8%
mul-1-neg68.8%
associate-/r*73.2%
distribute-neg-frac73.2%
distribute-neg-frac273.2%
Simplified73.2%
*-un-lft-identity73.2%
associate-/l/68.8%
sub-neg68.8%
add-sqr-sqrt41.1%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod17.0%
add-sqr-sqrt35.9%
add-sqr-sqrt19.0%
sqrt-unprod46.6%
sqr-neg46.6%
sqrt-unprod27.6%
add-sqr-sqrt65.2%
Applied egg-rr65.2%
*-lft-identity65.2%
*-commutative65.2%
+-commutative65.2%
Simplified65.2%
if 3.8999999999999999e-244 < t < 1.45000000000000001e-111Initial program 88.6%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
if 1.24999999999999994e-58 < t Initial program 84.3%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.0%
Final simplification69.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (+ t z)))) (t_2 (/ x (* (- t z) y))))
(if (<= t -3.7e-233)
t_2
(if (<= t 8e-244)
t_1
(if (<= t 6.8e-108)
t_2
(if (<= t 1.55e-60) t_1 (/ (/ x t) (- y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double t_2 = x / ((t - z) * y);
double tmp;
if (t <= -3.7e-233) {
tmp = t_2;
} else if (t <= 8e-244) {
tmp = t_1;
} else if (t <= 6.8e-108) {
tmp = t_2;
} else if (t <= 1.55e-60) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
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) :: t_2
real(8) :: tmp
t_1 = x / (z * (t + z))
t_2 = x / ((t - z) * y)
if (t <= (-3.7d-233)) then
tmp = t_2
else if (t <= 8d-244) then
tmp = t_1
else if (t <= 6.8d-108) then
tmp = t_2
else if (t <= 1.55d-60) then
tmp = t_1
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double t_2 = x / ((t - z) * y);
double tmp;
if (t <= -3.7e-233) {
tmp = t_2;
} else if (t <= 8e-244) {
tmp = t_1;
} else if (t <= 6.8e-108) {
tmp = t_2;
} else if (t <= 1.55e-60) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * (t + z)) t_2 = x / ((t - z) * y) tmp = 0 if t <= -3.7e-233: tmp = t_2 elif t <= 8e-244: tmp = t_1 elif t <= 6.8e-108: tmp = t_2 elif t <= 1.55e-60: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(t + z))) t_2 = Float64(x / Float64(Float64(t - z) * y)) tmp = 0.0 if (t <= -3.7e-233) tmp = t_2; elseif (t <= 8e-244) tmp = t_1; elseif (t <= 6.8e-108) tmp = t_2; elseif (t <= 1.55e-60) tmp = t_1; else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * (t + z)); t_2 = x / ((t - z) * y); tmp = 0.0; if (t <= -3.7e-233) tmp = t_2; elseif (t <= 8e-244) tmp = t_1; elseif (t <= 6.8e-108) tmp = t_2; elseif (t <= 1.55e-60) tmp = t_1; else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e-233], t$95$2, If[LessEqual[t, 8e-244], t$95$1, If[LessEqual[t, 6.8e-108], t$95$2, If[LessEqual[t, 1.55e-60], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(t + z\right)}\\
t_2 := \frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-233}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-108}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -3.6999999999999998e-233 or 7.9999999999999994e-244 < t < 6.80000000000000004e-108Initial program 89.1%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
Simplified64.7%
if -3.6999999999999998e-233 < t < 7.9999999999999994e-244 or 6.80000000000000004e-108 < t < 1.54999999999999994e-60Initial program 91.8%
associate-/l/96.4%
div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 71.1%
mul-1-neg71.1%
associate-/r*75.7%
distribute-neg-frac75.7%
distribute-neg-frac275.7%
Simplified75.7%
*-un-lft-identity75.7%
associate-/l/71.1%
sub-neg71.1%
add-sqr-sqrt42.4%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod17.6%
add-sqr-sqrt37.2%
add-sqr-sqrt19.6%
sqrt-unprod48.3%
sqr-neg48.3%
sqrt-unprod28.6%
add-sqr-sqrt67.4%
Applied egg-rr67.4%
*-lft-identity67.4%
*-commutative67.4%
+-commutative67.4%
Simplified67.4%
if 1.54999999999999994e-60 < t Initial program 84.3%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.0%
Final simplification70.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* z (+ t z)))) (t_2 (/ x (* (- t z) y))))
(if (<= t -9.5e-233)
t_2
(if (<= t 1.5e-243)
t_1
(if (<= t 2.8e-107) t_2 (if (<= t 3.4e-56) t_1 (/ x (* t (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double t_2 = x / ((t - z) * y);
double tmp;
if (t <= -9.5e-233) {
tmp = t_2;
} else if (t <= 1.5e-243) {
tmp = t_1;
} else if (t <= 2.8e-107) {
tmp = t_2;
} else if (t <= 3.4e-56) {
tmp = t_1;
} else {
tmp = x / (t * (y - z));
}
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) :: t_2
real(8) :: tmp
t_1 = x / (z * (t + z))
t_2 = x / ((t - z) * y)
if (t <= (-9.5d-233)) then
tmp = t_2
else if (t <= 1.5d-243) then
tmp = t_1
else if (t <= 2.8d-107) then
tmp = t_2
else if (t <= 3.4d-56) then
tmp = t_1
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (t + z));
double t_2 = x / ((t - z) * y);
double tmp;
if (t <= -9.5e-233) {
tmp = t_2;
} else if (t <= 1.5e-243) {
tmp = t_1;
} else if (t <= 2.8e-107) {
tmp = t_2;
} else if (t <= 3.4e-56) {
tmp = t_1;
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z * (t + z)) t_2 = x / ((t - z) * y) tmp = 0 if t <= -9.5e-233: tmp = t_2 elif t <= 1.5e-243: tmp = t_1 elif t <= 2.8e-107: tmp = t_2 elif t <= 3.4e-56: tmp = t_1 else: tmp = x / (t * (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(t + z))) t_2 = Float64(x / Float64(Float64(t - z) * y)) tmp = 0.0 if (t <= -9.5e-233) tmp = t_2; elseif (t <= 1.5e-243) tmp = t_1; elseif (t <= 2.8e-107) tmp = t_2; elseif (t <= 3.4e-56) tmp = t_1; else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z * (t + z)); t_2 = x / ((t - z) * y); tmp = 0.0; if (t <= -9.5e-233) tmp = t_2; elseif (t <= 1.5e-243) tmp = t_1; elseif (t <= 2.8e-107) tmp = t_2; elseif (t <= 3.4e-56) tmp = t_1; else tmp = x / (t * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-233], t$95$2, If[LessEqual[t, 1.5e-243], t$95$1, If[LessEqual[t, 2.8e-107], t$95$2, If[LessEqual[t, 3.4e-56], t$95$1, N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(t + z\right)}\\
t_2 := \frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-233}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -9.5000000000000003e-233 or 1.5000000000000001e-243 < t < 2.7999999999999999e-107Initial program 89.1%
Taylor expanded in y around inf 64.7%
*-commutative64.7%
Simplified64.7%
if -9.5000000000000003e-233 < t < 1.5000000000000001e-243 or 2.7999999999999999e-107 < t < 3.39999999999999982e-56Initial program 91.8%
associate-/l/96.4%
div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 71.1%
mul-1-neg71.1%
associate-/r*75.7%
distribute-neg-frac75.7%
distribute-neg-frac275.7%
Simplified75.7%
*-un-lft-identity75.7%
associate-/l/71.1%
sub-neg71.1%
add-sqr-sqrt42.4%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod17.6%
add-sqr-sqrt37.2%
add-sqr-sqrt19.6%
sqrt-unprod48.3%
sqr-neg48.3%
sqrt-unprod28.6%
add-sqr-sqrt67.4%
Applied egg-rr67.4%
*-lft-identity67.4%
*-commutative67.4%
+-commutative67.4%
Simplified67.4%
if 3.39999999999999982e-56 < t Initial program 84.3%
Taylor expanded in t around inf 73.0%
Final simplification67.9%
(FPCore (x y z t) :precision binary64 (if (<= z -3.5e+144) (/ (/ x z) (- z y)) (if (<= z 1.6e+114) (/ x (* (- t z) (- y z))) (/ (/ x z) (- z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+144) {
tmp = (x / z) / (z - y);
} else if (z <= 1.6e+114) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (x / z) / (z - t);
}
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) :: tmp
if (z <= (-3.5d+144)) then
tmp = (x / z) / (z - y)
else if (z <= 1.6d+114) then
tmp = x / ((t - z) * (y - z))
else
tmp = (x / z) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.5e+144) {
tmp = (x / z) / (z - y);
} else if (z <= 1.6e+114) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.5e+144: tmp = (x / z) / (z - y) elif z <= 1.6e+114: tmp = x / ((t - z) * (y - z)) else: tmp = (x / z) / (z - t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.5e+144) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 1.6e+114) tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z))); else tmp = Float64(Float64(x / z) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.5e+144) tmp = (x / z) / (z - y); elseif (z <= 1.6e+114) tmp = x / ((t - z) * (y - z)); else tmp = (x / z) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.5e+144], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+114], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+114}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -3.4999999999999998e144Initial program 83.4%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 94.1%
associate-*r/94.1%
neg-mul-194.1%
Simplified94.1%
if -3.4999999999999998e144 < z < 1.6e114Initial program 93.0%
if 1.6e114 < z Initial program 68.3%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 68.3%
mul-1-neg68.3%
associate-/r*94.8%
distribute-neg-frac94.8%
distribute-neg-frac294.8%
Simplified94.8%
frac-2neg94.8%
div-inv94.8%
distribute-frac-neg294.8%
remove-double-neg94.8%
sub-neg94.8%
distribute-neg-in94.8%
remove-double-neg94.8%
Applied egg-rr94.8%
associate-*r/94.8%
*-rgt-identity94.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
Final simplification93.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -10.5) (not (<= z 0.0008))) (/ x (* z (+ t z))) (/ x (* t (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -10.5) || !(z <= 0.0008)) {
tmp = x / (z * (t + z));
} else {
tmp = x / (t * (y - z));
}
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) :: tmp
if ((z <= (-10.5d0)) .or. (.not. (z <= 0.0008d0))) then
tmp = x / (z * (t + z))
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -10.5) || !(z <= 0.0008)) {
tmp = x / (z * (t + z));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -10.5) or not (z <= 0.0008): tmp = x / (z * (t + z)) else: tmp = x / (t * (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -10.5) || !(z <= 0.0008)) tmp = Float64(x / Float64(z * Float64(t + z))); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -10.5) || ~((z <= 0.0008))) tmp = x / (z * (t + z)); else tmp = x / (t * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -10.5], N[Not[LessEqual[z, 0.0008]], $MachinePrecision]], N[(x / N[(z * N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -10.5 \lor \neg \left(z \leq 0.0008\right):\\
\;\;\;\;\frac{x}{z \cdot \left(t + z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -10.5 or 8.00000000000000038e-4 < z Initial program 81.1%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
associate-/r*84.2%
distribute-neg-frac84.2%
distribute-neg-frac284.2%
Simplified84.2%
*-un-lft-identity84.2%
associate-/l/72.2%
sub-neg72.2%
add-sqr-sqrt39.4%
sqrt-unprod66.9%
sqr-neg66.9%
sqrt-unprod27.5%
add-sqr-sqrt60.5%
add-sqr-sqrt33.0%
sqrt-unprod65.1%
sqr-neg65.1%
sqrt-unprod32.0%
add-sqr-sqrt68.4%
Applied egg-rr68.4%
*-lft-identity68.4%
*-commutative68.4%
+-commutative68.4%
Simplified68.4%
if -10.5 < z < 8.00000000000000038e-4Initial program 94.5%
Taylor expanded in t around inf 66.5%
Final simplification67.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.46e-124) (not (<= t 8.2e-156))) (/ x (* t (- y z))) (/ x (* y (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.46e-124) || !(t <= 8.2e-156)) {
tmp = x / (t * (y - z));
} else {
tmp = x / (y * -z);
}
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) :: tmp
if ((t <= (-1.46d-124)) .or. (.not. (t <= 8.2d-156))) then
tmp = x / (t * (y - z))
else
tmp = x / (y * -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.46e-124) || !(t <= 8.2e-156)) {
tmp = x / (t * (y - z));
} else {
tmp = x / (y * -z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.46e-124) or not (t <= 8.2e-156): tmp = x / (t * (y - z)) else: tmp = x / (y * -z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.46e-124) || !(t <= 8.2e-156)) tmp = Float64(x / Float64(t * Float64(y - z))); else tmp = Float64(x / Float64(y * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.46e-124) || ~((t <= 8.2e-156))) tmp = x / (t * (y - z)); else tmp = x / (y * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.46e-124], N[Not[LessEqual[t, 8.2e-156]], $MachinePrecision]], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.46 \cdot 10^{-124} \lor \neg \left(t \leq 8.2 \cdot 10^{-156}\right):\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\end{array}
\end{array}
if t < -1.4599999999999999e-124 or 8.2000000000000004e-156 < t Initial program 86.9%
Taylor expanded in t around inf 69.4%
if -1.4599999999999999e-124 < t < 8.2000000000000004e-156Initial program 89.8%
Taylor expanded in x around 0 89.8%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in y around inf 62.8%
Taylor expanded in t around 0 54.2%
mul-1-neg54.2%
distribute-neg-frac254.2%
*-commutative54.2%
distribute-rgt-neg-out54.2%
Simplified54.2%
Final simplification65.0%
(FPCore (x y z t) :precision binary64 (if (<= y -3.05e-46) (/ (/ x y) (- t z)) (if (<= y 1.55e-55) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.05e-46) {
tmp = (x / y) / (t - z);
} else if (y <= 1.55e-55) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
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) :: tmp
if (y <= (-3.05d-46)) then
tmp = (x / y) / (t - z)
else if (y <= 1.55d-55) then
tmp = (x / z) / (z - t)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.05e-46) {
tmp = (x / y) / (t - z);
} else if (y <= 1.55e-55) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.05e-46: tmp = (x / y) / (t - z) elif y <= 1.55e-55: tmp = (x / z) / (z - t) else: tmp = (x / t) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.05e-46) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 1.55e-55) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.05e-46) tmp = (x / y) / (t - z); elseif (y <= 1.55e-55) tmp = (x / z) / (z - t); else tmp = (x / t) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.05e-46], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-55], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.05 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.05000000000000018e-46Initial program 90.4%
Taylor expanded in x around 0 90.4%
associate-/l/97.3%
Simplified97.3%
Taylor expanded in y around inf 88.0%
if -3.05000000000000018e-46 < y < 1.54999999999999998e-55Initial program 86.8%
associate-/l/98.3%
div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in y around 0 77.6%
mul-1-neg77.6%
associate-/r*86.7%
distribute-neg-frac86.7%
distribute-neg-frac286.7%
Simplified86.7%
frac-2neg86.7%
div-inv86.6%
distribute-frac-neg286.6%
remove-double-neg86.6%
sub-neg86.6%
distribute-neg-in86.6%
remove-double-neg86.6%
Applied egg-rr86.6%
associate-*r/86.7%
*-rgt-identity86.7%
+-commutative86.7%
unsub-neg86.7%
Simplified86.7%
if 1.54999999999999998e-55 < y Initial program 86.3%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in t around inf 51.2%
(FPCore (x y z t) :precision binary64 (if (<= t 2.7e-59) (/ x (* y (- z))) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.7e-59) {
tmp = x / (y * -z);
} else {
tmp = (x / t) / y;
}
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) :: tmp
if (t <= 2.7d-59) then
tmp = x / (y * -z)
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.7e-59) {
tmp = x / (y * -z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2.7e-59: tmp = x / (y * -z) else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2.7e-59) tmp = Float64(x / Float64(y * Float64(-z))); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2.7e-59) tmp = x / (y * -z); else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.7e-59], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.7 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < 2.6999999999999999e-59Initial program 89.6%
Taylor expanded in x around 0 89.6%
associate-/l/95.8%
Simplified95.8%
Taylor expanded in y around inf 59.0%
Taylor expanded in t around 0 40.9%
mul-1-neg40.9%
distribute-neg-frac240.9%
*-commutative40.9%
distribute-rgt-neg-out40.9%
Simplified40.9%
if 2.6999999999999999e-59 < t Initial program 84.3%
associate-/l/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 51.1%
associate-/r*60.2%
Simplified60.2%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (if (<= t 6.5e-134) (/ (/ x y) t) (/ (/ x t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e-134) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
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) :: tmp
if (t <= 6.5d-134) then
tmp = (x / y) / t
else
tmp = (x / t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e-134) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 6.5e-134: tmp = (x / y) / t else: tmp = (x / t) / y return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 6.5e-134) tmp = Float64(Float64(x / y) / t); else tmp = Float64(Float64(x / t) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 6.5e-134) tmp = (x / y) / t; else tmp = (x / t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 6.5e-134], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < 6.4999999999999998e-134Initial program 89.4%
Taylor expanded in z around 0 29.9%
div-inv29.8%
associate-/r*29.8%
Applied egg-rr29.8%
*-commutative29.8%
associate-*l/31.9%
associate-*r/30.7%
associate-*l/30.7%
*-lft-identity30.7%
Simplified30.7%
if 6.4999999999999998e-134 < t Initial program 85.1%
associate-/l/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 47.0%
associate-/r*55.1%
Simplified55.1%
(FPCore (x y z t) :precision binary64 (/ (/ x t) y))
double code(double x, double y, double z, double t) {
return (x / t) / y;
}
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
public static double code(double x, double y, double z, double t) {
return (x / t) / y;
}
def code(x, y, z, t): return (x / t) / y
function code(x, y, z, t) return Float64(Float64(x / t) / y) end
function tmp = code(x, y, z, t) tmp = (x / t) / y; end
code[x_, y_, z_, t_] := N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{t}}{y}
\end{array}
Initial program 87.7%
associate-/l/97.3%
Simplified97.3%
clear-num97.1%
associate-/r/97.3%
Applied egg-rr97.3%
Taylor expanded in z around 0 36.6%
associate-/r*41.1%
Simplified41.1%
(FPCore (x y z t) :precision binary64 (/ x (* t y)))
double code(double x, double y, double z, double t) {
return x / (t * y);
}
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
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
def code(x, y, z, t): return x / (t * y)
function code(x, y, z, t) return Float64(x / Float64(t * y)) end
function tmp = code(x, y, z, t) tmp = x / (t * y); end
code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 87.7%
Taylor expanded in z around 0 36.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t\_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024102
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))