
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - 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 / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - 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 (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - 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 / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (/ y z) (/ t (- 1.0 z))))) (if (<= t_1 (- INFINITY)) (* y (/ x z)) (* t_1 x))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (x / z);
} else {
tmp = t_1 * x;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (x / z);
} else {
tmp = t_1 * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) - (t / (1.0 - z)) tmp = 0 if t_1 <= -math.inf: tmp = y * (x / z) else: tmp = t_1 * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(x / z)); else tmp = Float64(t_1 * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) - (t / (1.0 - z)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * (x / z); else tmp = t_1 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot x\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0Initial program 72.4%
Taylor expanded in y around inf 99.8%
associate-*l/72.4%
Simplified72.4%
Taylor expanded in y around 0 99.8%
associate-*r/99.9%
Simplified99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 97.8%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z y))))
(if (<= z -5.4e+158)
(* x (/ t z))
(if (<= z -3.6e+102)
t_1
(if (<= z -6.2e+21)
(* t (/ x z))
(if (<= z 1.6e-17) (* x (- (/ y z) t)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / y);
double tmp;
if (z <= -5.4e+158) {
tmp = x * (t / z);
} else if (z <= -3.6e+102) {
tmp = t_1;
} else if (z <= -6.2e+21) {
tmp = t * (x / z);
} else if (z <= 1.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = 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 = x / (z / y)
if (z <= (-5.4d+158)) then
tmp = x * (t / z)
else if (z <= (-3.6d+102)) then
tmp = t_1
else if (z <= (-6.2d+21)) then
tmp = t * (x / z)
else if (z <= 1.6d-17) then
tmp = x * ((y / z) - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z / y);
double tmp;
if (z <= -5.4e+158) {
tmp = x * (t / z);
} else if (z <= -3.6e+102) {
tmp = t_1;
} else if (z <= -6.2e+21) {
tmp = t * (x / z);
} else if (z <= 1.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / y) tmp = 0 if z <= -5.4e+158: tmp = x * (t / z) elif z <= -3.6e+102: tmp = t_1 elif z <= -6.2e+21: tmp = t * (x / z) elif z <= 1.6e-17: tmp = x * ((y / z) - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / y)) tmp = 0.0 if (z <= -5.4e+158) tmp = Float64(x * Float64(t / z)); elseif (z <= -3.6e+102) tmp = t_1; elseif (z <= -6.2e+21) tmp = Float64(t * Float64(x / z)); elseif (z <= 1.6e-17) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / y); tmp = 0.0; if (z <= -5.4e+158) tmp = x * (t / z); elseif (z <= -3.6e+102) tmp = t_1; elseif (z <= -6.2e+21) tmp = t * (x / z); elseif (z <= 1.6e-17) tmp = x * ((y / z) - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+158], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e+102], t$95$1, If[LessEqual[z, -6.2e+21], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-17], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+158}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.39999999999999957e158Initial program 88.9%
Taylor expanded in z around inf 77.7%
*-commutative77.7%
associate-/l*88.7%
neg-mul-188.7%
Simplified88.7%
Taylor expanded in y around 0 68.4%
clear-num68.4%
associate-/r/68.4%
clear-num68.5%
Applied egg-rr68.5%
if -5.39999999999999957e158 < z < -3.6000000000000002e102 or 1.6000000000000001e-17 < z Initial program 98.3%
Taylor expanded in y around inf 61.2%
associate-*l/66.2%
Simplified66.2%
Taylor expanded in y around 0 61.2%
associate-*r/58.7%
*-commutative58.7%
associate-/r/66.3%
Simplified66.3%
if -3.6000000000000002e102 < z < -6.2e21Initial program 99.4%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
associate-/l*99.8%
neg-mul-199.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around 0 71.9%
associate-*r/72.1%
Simplified72.1%
if -6.2e21 < z < 1.6000000000000001e-17Initial program 95.7%
Taylor expanded in z around 0 92.0%
associate-*l/89.2%
associate-*r*89.2%
neg-mul-189.2%
distribute-rgt-out93.8%
unsub-neg93.8%
Simplified93.8%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))))
(if (<= t -5.2e+165)
t_1
(if (<= t 8.5e+73)
(* (/ y z) x)
(if (<= t 1.48e+175)
t_1
(if (<= t 3.9e+194) (* y (/ x z)) (* x (/ t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -5.2e+165) {
tmp = t_1;
} else if (t <= 8.5e+73) {
tmp = (y / z) * x;
} else if (t <= 1.48e+175) {
tmp = t_1;
} else if (t <= 3.9e+194) {
tmp = y * (x / z);
} else {
tmp = x * (t / 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 = t * -x
if (t <= (-5.2d+165)) then
tmp = t_1
else if (t <= 8.5d+73) then
tmp = (y / z) * x
else if (t <= 1.48d+175) then
tmp = t_1
else if (t <= 3.9d+194) then
tmp = y * (x / z)
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -5.2e+165) {
tmp = t_1;
} else if (t <= 8.5e+73) {
tmp = (y / z) * x;
} else if (t <= 1.48e+175) {
tmp = t_1;
} else if (t <= 3.9e+194) {
tmp = y * (x / z);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x tmp = 0 if t <= -5.2e+165: tmp = t_1 elif t <= 8.5e+73: tmp = (y / z) * x elif t <= 1.48e+175: tmp = t_1 elif t <= 3.9e+194: tmp = y * (x / z) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -5.2e+165) tmp = t_1; elseif (t <= 8.5e+73) tmp = Float64(Float64(y / z) * x); elseif (t <= 1.48e+175) tmp = t_1; elseif (t <= 3.9e+194) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; tmp = 0.0; if (t <= -5.2e+165) tmp = t_1; elseif (t <= 8.5e+73) tmp = (y / z) * x; elseif (t <= 1.48e+175) tmp = t_1; elseif (t <= 3.9e+194) tmp = y * (x / z); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -5.2e+165], t$95$1, If[LessEqual[t, 8.5e+73], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.48e+175], t$95$1, If[LessEqual[t, 3.9e+194], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+73}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 1.48 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+194}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if t < -5.2000000000000002e165 or 8.4999999999999998e73 < t < 1.4800000000000001e175Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in z around 0 59.7%
if -5.2000000000000002e165 < t < 8.4999999999999998e73Initial program 95.4%
Taylor expanded in y around inf 76.0%
associate-*l/76.5%
Simplified76.5%
if 1.4800000000000001e175 < t < 3.90000000000000016e194Initial program 54.1%
Taylor expanded in y around inf 99.2%
associate-*l/54.1%
Simplified54.1%
Taylor expanded in y around 0 99.2%
associate-*r/98.4%
Simplified98.4%
if 3.90000000000000016e194 < t Initial program 96.9%
Taylor expanded in z around inf 55.9%
*-commutative55.9%
associate-/l*73.0%
neg-mul-173.0%
Simplified73.0%
Taylor expanded in y around 0 67.3%
clear-num67.3%
associate-/r/67.3%
clear-num67.2%
Applied egg-rr67.2%
Final simplification72.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))))
(if (<= t -8.5e+161)
t_1
(if (<= t 6.2e+75)
(* (/ y z) x)
(if (<= t 1.3e+178)
t_1
(if (<= t 2.35e+194) (* y (/ x z)) (/ x (/ z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -8.5e+161) {
tmp = t_1;
} else if (t <= 6.2e+75) {
tmp = (y / z) * x;
} else if (t <= 1.3e+178) {
tmp = t_1;
} else if (t <= 2.35e+194) {
tmp = y * (x / z);
} else {
tmp = x / (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) :: t_1
real(8) :: tmp
t_1 = t * -x
if (t <= (-8.5d+161)) then
tmp = t_1
else if (t <= 6.2d+75) then
tmp = (y / z) * x
else if (t <= 1.3d+178) then
tmp = t_1
else if (t <= 2.35d+194) then
tmp = y * (x / z)
else
tmp = x / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -8.5e+161) {
tmp = t_1;
} else if (t <= 6.2e+75) {
tmp = (y / z) * x;
} else if (t <= 1.3e+178) {
tmp = t_1;
} else if (t <= 2.35e+194) {
tmp = y * (x / z);
} else {
tmp = x / (z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x tmp = 0 if t <= -8.5e+161: tmp = t_1 elif t <= 6.2e+75: tmp = (y / z) * x elif t <= 1.3e+178: tmp = t_1 elif t <= 2.35e+194: tmp = y * (x / z) else: tmp = x / (z / t) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -8.5e+161) tmp = t_1; elseif (t <= 6.2e+75) tmp = Float64(Float64(y / z) * x); elseif (t <= 1.3e+178) tmp = t_1; elseif (t <= 2.35e+194) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; tmp = 0.0; if (t <= -8.5e+161) tmp = t_1; elseif (t <= 6.2e+75) tmp = (y / z) * x; elseif (t <= 1.3e+178) tmp = t_1; elseif (t <= 2.35e+194) tmp = y * (x / z); else tmp = x / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -8.5e+161], t$95$1, If[LessEqual[t, 6.2e+75], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.3e+178], t$95$1, If[LessEqual[t, 2.35e+194], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+75}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+194}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\end{array}
\end{array}
if t < -8.50000000000000007e161 or 6.2000000000000002e75 < t < 1.3e178Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in z around 0 59.7%
if -8.50000000000000007e161 < t < 6.2000000000000002e75Initial program 95.4%
Taylor expanded in y around inf 76.0%
associate-*l/76.5%
Simplified76.5%
if 1.3e178 < t < 2.34999999999999986e194Initial program 54.1%
Taylor expanded in y around inf 99.2%
associate-*l/54.1%
Simplified54.1%
Taylor expanded in y around 0 99.2%
associate-*r/98.4%
Simplified98.4%
if 2.34999999999999986e194 < t Initial program 96.9%
Taylor expanded in z around inf 55.9%
*-commutative55.9%
associate-/l*73.0%
neg-mul-173.0%
Simplified73.0%
Taylor expanded in y around 0 67.3%
Final simplification72.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))))
(if (<= t -1.5e+162)
t_1
(if (<= t 2e+75)
(/ x (/ z y))
(if (<= t 8.5e+178)
t_1
(if (<= t 6.6e+193) (* y (/ x z)) (/ x (/ z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -1.5e+162) {
tmp = t_1;
} else if (t <= 2e+75) {
tmp = x / (z / y);
} else if (t <= 8.5e+178) {
tmp = t_1;
} else if (t <= 6.6e+193) {
tmp = y * (x / z);
} else {
tmp = x / (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) :: t_1
real(8) :: tmp
t_1 = t * -x
if (t <= (-1.5d+162)) then
tmp = t_1
else if (t <= 2d+75) then
tmp = x / (z / y)
else if (t <= 8.5d+178) then
tmp = t_1
else if (t <= 6.6d+193) then
tmp = y * (x / z)
else
tmp = x / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -1.5e+162) {
tmp = t_1;
} else if (t <= 2e+75) {
tmp = x / (z / y);
} else if (t <= 8.5e+178) {
tmp = t_1;
} else if (t <= 6.6e+193) {
tmp = y * (x / z);
} else {
tmp = x / (z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x tmp = 0 if t <= -1.5e+162: tmp = t_1 elif t <= 2e+75: tmp = x / (z / y) elif t <= 8.5e+178: tmp = t_1 elif t <= 6.6e+193: tmp = y * (x / z) else: tmp = x / (z / t) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -1.5e+162) tmp = t_1; elseif (t <= 2e+75) tmp = Float64(x / Float64(z / y)); elseif (t <= 8.5e+178) tmp = t_1; elseif (t <= 6.6e+193) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; tmp = 0.0; if (t <= -1.5e+162) tmp = t_1; elseif (t <= 2e+75) tmp = x / (z / y); elseif (t <= 8.5e+178) tmp = t_1; elseif (t <= 6.6e+193) tmp = y * (x / z); else tmp = x / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -1.5e+162], t$95$1, If[LessEqual[t, 2e+75], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+178], t$95$1, If[LessEqual[t, 6.6e+193], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+75}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+193}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\end{array}
\end{array}
if t < -1.4999999999999999e162 or 1.99999999999999985e75 < t < 8.49999999999999991e178Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in z around 0 59.7%
if -1.4999999999999999e162 < t < 1.99999999999999985e75Initial program 95.4%
Taylor expanded in y around inf 76.0%
associate-*l/76.5%
Simplified76.5%
Taylor expanded in y around 0 76.0%
associate-*r/73.2%
*-commutative73.2%
associate-/r/76.8%
Simplified76.8%
if 8.49999999999999991e178 < t < 6.6e193Initial program 54.1%
Taylor expanded in y around inf 99.2%
associate-*l/54.1%
Simplified54.1%
Taylor expanded in y around 0 99.2%
associate-*r/98.4%
Simplified98.4%
if 6.6e193 < t Initial program 96.9%
Taylor expanded in z around inf 55.9%
*-commutative55.9%
associate-/l*73.0%
neg-mul-173.0%
Simplified73.0%
Taylor expanded in y around 0 67.3%
Final simplification72.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- x))))
(if (<= t -6.8e+162)
t_1
(if (<= t 6.2e+75)
(/ x (/ z y))
(if (<= t 1.95e+175)
t_1
(if (<= t 6.6e+193) (/ y (/ z x)) (/ x (/ z t))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -6.8e+162) {
tmp = t_1;
} else if (t <= 6.2e+75) {
tmp = x / (z / y);
} else if (t <= 1.95e+175) {
tmp = t_1;
} else if (t <= 6.6e+193) {
tmp = y / (z / x);
} else {
tmp = x / (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) :: t_1
real(8) :: tmp
t_1 = t * -x
if (t <= (-6.8d+162)) then
tmp = t_1
else if (t <= 6.2d+75) then
tmp = x / (z / y)
else if (t <= 1.95d+175) then
tmp = t_1
else if (t <= 6.6d+193) then
tmp = y / (z / x)
else
tmp = x / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * -x;
double tmp;
if (t <= -6.8e+162) {
tmp = t_1;
} else if (t <= 6.2e+75) {
tmp = x / (z / y);
} else if (t <= 1.95e+175) {
tmp = t_1;
} else if (t <= 6.6e+193) {
tmp = y / (z / x);
} else {
tmp = x / (z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * -x tmp = 0 if t <= -6.8e+162: tmp = t_1 elif t <= 6.2e+75: tmp = x / (z / y) elif t <= 1.95e+175: tmp = t_1 elif t <= 6.6e+193: tmp = y / (z / x) else: tmp = x / (z / t) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(-x)) tmp = 0.0 if (t <= -6.8e+162) tmp = t_1; elseif (t <= 6.2e+75) tmp = Float64(x / Float64(z / y)); elseif (t <= 1.95e+175) tmp = t_1; elseif (t <= 6.6e+193) tmp = Float64(y / Float64(z / x)); else tmp = Float64(x / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * -x; tmp = 0.0; if (t <= -6.8e+162) tmp = t_1; elseif (t <= 6.2e+75) tmp = x / (z / y); elseif (t <= 1.95e+175) tmp = t_1; elseif (t <= 6.6e+193) tmp = y / (z / x); else tmp = x / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -6.8e+162], t$95$1, If[LessEqual[t, 6.2e+75], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+175], t$95$1, If[LessEqual[t, 6.6e+193], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+75}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+193}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\end{array}
\end{array}
if t < -6.80000000000000006e162 or 6.2000000000000002e75 < t < 1.94999999999999986e175Initial program 99.9%
Taylor expanded in y around 0 83.6%
Taylor expanded in z around 0 59.7%
if -6.80000000000000006e162 < t < 6.2000000000000002e75Initial program 95.4%
Taylor expanded in y around inf 76.0%
associate-*l/76.5%
Simplified76.5%
Taylor expanded in y around 0 76.0%
associate-*r/73.2%
*-commutative73.2%
associate-/r/76.8%
Simplified76.8%
if 1.94999999999999986e175 < t < 6.6e193Initial program 54.1%
Taylor expanded in y around inf 99.2%
associate-*l/54.1%
Simplified54.1%
associate-*l/99.2%
div-inv100.0%
associate-*r*99.2%
div-inv98.4%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
if 6.6e193 < t Initial program 96.9%
Taylor expanded in z around inf 55.9%
*-commutative55.9%
associate-/l*73.0%
neg-mul-173.0%
Simplified73.0%
Taylor expanded in y around 0 67.3%
Final simplification72.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.2e-33) (not (<= t 430.0))) (* x (/ t (+ z -1.0))) (/ x (/ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.2e-33) || !(t <= 430.0)) {
tmp = x * (t / (z + -1.0));
} else {
tmp = x / (z / 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 <= (-3.2d-33)) .or. (.not. (t <= 430.0d0))) then
tmp = x * (t / (z + (-1.0d0)))
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.2e-33) || !(t <= 430.0)) {
tmp = x * (t / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.2e-33) or not (t <= 430.0): tmp = x * (t / (z + -1.0)) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.2e-33) || !(t <= 430.0)) tmp = Float64(x * Float64(t / Float64(z + -1.0))); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.2e-33) || ~((t <= 430.0))) tmp = x * (t / (z + -1.0)); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.2e-33], N[Not[LessEqual[t, 430.0]], $MachinePrecision]], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-33} \lor \neg \left(t \leq 430\right):\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if t < -3.19999999999999977e-33 or 430 < t Initial program 97.6%
Taylor expanded in y around 0 65.6%
associate-*r/65.6%
associate-*r*65.6%
neg-mul-165.6%
associate-*l/72.9%
*-commutative72.9%
neg-mul-172.9%
*-commutative72.9%
associate-*r/72.8%
metadata-eval72.8%
associate-/r*72.8%
neg-mul-172.8%
associate-*r/72.9%
*-rgt-identity72.9%
neg-sub072.9%
associate--r-72.9%
metadata-eval72.9%
Simplified72.9%
if -3.19999999999999977e-33 < t < 430Initial program 94.6%
Taylor expanded in y around inf 85.0%
associate-*l/85.6%
Simplified85.6%
Taylor expanded in y around 0 85.0%
associate-*r/81.9%
*-commutative81.9%
associate-/r/86.0%
Simplified86.0%
Final simplification79.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.3) (not (<= z 1.0))) (* (/ x z) (+ y t)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3) || !(z <= 1.0)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / 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 <= (-1.3d0)) .or. (.not. (z <= 1.0d0))) then
tmp = (x / z) * (y + t)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3) || !(z <= 1.0)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.3) or not (z <= 1.0): tmp = (x / z) * (y + t) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.3) || !(z <= 1.0)) tmp = Float64(Float64(x / z) * Float64(y + t)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.3) || ~((z <= 1.0))) tmp = (x / z) * (y + t); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.3], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1.30000000000000004 or 1 < z Initial program 96.5%
Taylor expanded in z around inf 87.6%
*-commutative87.6%
associate-/l*96.6%
associate-/r/88.3%
cancel-sign-sub-inv88.3%
metadata-eval88.3%
*-lft-identity88.3%
Simplified88.3%
if -1.30000000000000004 < z < 1Initial program 95.7%
Taylor expanded in z around 0 92.6%
associate-*l/89.9%
associate-*r*89.9%
neg-mul-189.9%
distribute-rgt-out94.5%
unsub-neg94.5%
Simplified94.5%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.6e-17))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.6e-17)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / 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 <= (-1.0d0)) .or. (.not. (z <= 1.6d-17))) then
tmp = x * ((y + t) / z)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.6e-17)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 1.6e-17): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.6e-17)) tmp = Float64(x * Float64(Float64(y + t) / z)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 1.6e-17))) tmp = x * ((y + t) / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.6e-17]], $MachinePrecision]], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.6 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1 or 1.6000000000000001e-17 < z Initial program 96.6%
Taylor expanded in z around inf 87.8%
associate-/l*86.4%
associate-/r/96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
*-lft-identity96.6%
Simplified96.6%
if -1 < z < 1.6000000000000001e-17Initial program 95.6%
Taylor expanded in z around 0 92.5%
associate-*l/89.7%
associate-*r*89.7%
neg-mul-189.7%
distribute-rgt-out94.4%
unsub-neg94.4%
Simplified94.4%
Final simplification95.5%
(FPCore (x y z t) :precision binary64 (if (<= z -1.0) (* x (/ (+ y t) z)) (if (<= z 1.6e-17) (* x (- (/ y z) t)) (/ x (/ z (+ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y + t) / z);
} else if (z <= 1.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / (y + 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 <= (-1.0d0)) then
tmp = x * ((y + t) / z)
else if (z <= 1.6d-17) then
tmp = x * ((y / z) - t)
else
tmp = x / (z / (y + t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((y + t) / z);
} else if (z <= 1.6e-17) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / (y + t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = x * ((y + t) / z) elif z <= 1.6e-17: tmp = x * ((y / z) - t) else: tmp = x / (z / (y + t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(x * Float64(Float64(y + t) / z)); elseif (z <= 1.6e-17) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x / Float64(z / Float64(y + t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = x * ((y + t) / z); elseif (z <= 1.6e-17) tmp = x * ((y / z) - t); else tmp = x / (z / (y + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-17], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y + t}}\\
\end{array}
\end{array}
if z < -1Initial program 94.8%
Taylor expanded in z around inf 85.0%
associate-/l*88.4%
associate-/r/94.8%
cancel-sign-sub-inv94.8%
metadata-eval94.8%
*-lft-identity94.8%
Simplified94.8%
if -1 < z < 1.6000000000000001e-17Initial program 95.6%
Taylor expanded in z around 0 92.5%
associate-*l/89.7%
associate-*r*89.7%
neg-mul-189.7%
distribute-rgt-out94.4%
unsub-neg94.4%
Simplified94.4%
if 1.6000000000000001e-17 < z Initial program 98.1%
Taylor expanded in z around inf 90.2%
*-commutative90.2%
associate-/l*98.2%
neg-mul-198.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
Final simplification95.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.4e+28))) (* t (/ x z)) (* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.4e+28)) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
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 <= (-1.0d0)) .or. (.not. (z <= 1.4d+28))) then
tmp = t * (x / z)
else
tmp = t * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.4e+28)) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 1.4e+28): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.4e+28)) tmp = Float64(t * Float64(x / z)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 1.4e+28))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.4e+28]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.4 \cdot 10^{+28}\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -1 or 1.4000000000000001e28 < z Initial program 96.4%
Taylor expanded in z around inf 87.2%
*-commutative87.2%
associate-/l*96.5%
neg-mul-196.5%
Simplified96.5%
Taylor expanded in z around 0 96.5%
Taylor expanded in y around 0 50.0%
associate-*r/52.4%
Simplified52.4%
if -1 < z < 1.4000000000000001e28Initial program 95.8%
Taylor expanded in y around 0 40.0%
Taylor expanded in z around 0 38.9%
Final simplification45.3%
(FPCore (x y z t) :precision binary64 (if (<= t -3e+156) (* t (- x)) (if (<= t 4.6e-44) (* y (/ x z)) (* t (/ x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e+156) {
tmp = t * -x;
} else if (t <= 4.6e-44) {
tmp = y * (x / z);
} else {
tmp = t * (x / 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 <= (-3d+156)) then
tmp = t * -x
else if (t <= 4.6d-44) then
tmp = y * (x / z)
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e+156) {
tmp = t * -x;
} else if (t <= 4.6e-44) {
tmp = y * (x / z);
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3e+156: tmp = t * -x elif t <= 4.6e-44: tmp = y * (x / z) else: tmp = t * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3e+156) tmp = Float64(t * Float64(-x)); elseif (t <= 4.6e-44) tmp = Float64(y * Float64(x / z)); else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3e+156) tmp = t * -x; elseif (t <= 4.6e-44) tmp = y * (x / z); else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3e+156], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, 4.6e-44], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+156}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if t < -3e156Initial program 99.9%
Taylor expanded in y around 0 80.7%
Taylor expanded in z around 0 59.4%
if -3e156 < t < 4.59999999999999996e-44Initial program 95.5%
Taylor expanded in y around inf 77.8%
associate-*l/78.4%
Simplified78.4%
Taylor expanded in y around 0 77.8%
associate-*r/77.1%
Simplified77.1%
if 4.59999999999999996e-44 < t Initial program 95.3%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*64.8%
neg-mul-164.8%
Simplified64.8%
Taylor expanded in z around 0 64.8%
Taylor expanded in y around 0 45.3%
associate-*r/46.7%
Simplified46.7%
Final simplification67.2%
(FPCore (x y z t) :precision binary64 (if (<= t -4.5e+165) (* t (- x)) (if (<= t 4.6e-44) (* y (/ x z)) (* x (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e+165) {
tmp = t * -x;
} else if (t <= 4.6e-44) {
tmp = y * (x / z);
} else {
tmp = x * (t / 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 <= (-4.5d+165)) then
tmp = t * -x
else if (t <= 4.6d-44) then
tmp = y * (x / z)
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.5e+165) {
tmp = t * -x;
} else if (t <= 4.6e-44) {
tmp = y * (x / z);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.5e+165: tmp = t * -x elif t <= 4.6e-44: tmp = y * (x / z) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.5e+165) tmp = Float64(t * Float64(-x)); elseif (t <= 4.6e-44) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4.5e+165) tmp = t * -x; elseif (t <= 4.6e-44) tmp = y * (x / z); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.5e+165], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, 4.6e-44], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+165}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if t < -4.4999999999999996e165Initial program 99.9%
Taylor expanded in y around 0 80.7%
Taylor expanded in z around 0 59.4%
if -4.4999999999999996e165 < t < 4.59999999999999996e-44Initial program 95.5%
Taylor expanded in y around inf 77.8%
associate-*l/78.4%
Simplified78.4%
Taylor expanded in y around 0 77.8%
associate-*r/77.1%
Simplified77.1%
if 4.59999999999999996e-44 < t Initial program 95.3%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*64.8%
neg-mul-164.8%
Simplified64.8%
Taylor expanded in y around 0 53.7%
clear-num53.6%
associate-/r/53.7%
clear-num53.7%
Applied egg-rr53.7%
Final simplification68.9%
(FPCore (x y z t) :precision binary64 (* t (- x)))
double code(double x, double y, double z, double t) {
return t * -x;
}
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 = t * -x
end function
public static double code(double x, double y, double z, double t) {
return t * -x;
}
def code(x, y, z, t): return t * -x
function code(x, y, z, t) return Float64(t * Float64(-x)) end
function tmp = code(x, y, z, t) tmp = t * -x; end
code[x_, y_, z_, t_] := N[(t * (-x)), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(-x\right)
\end{array}
Initial program 96.1%
Taylor expanded in y around 0 44.7%
Taylor expanded in z around 0 27.1%
Final simplification27.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023274
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))