
(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 15 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 (/ (* x y) z)) (t_2 (+ (/ y z) (/ t (+ z -1.0)))))
(if (<= t_2 (- INFINITY))
t_1
(if (or (<= t_2 -4e-253) (not (<= t_2 5e-264)))
(* x t_2)
(+ t_1 (/ (* x t) z))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * y) / z;
double t_2 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if ((t_2 <= -4e-253) || !(t_2 <= 5e-264)) {
tmp = x * t_2;
} else {
tmp = t_1 + ((x * t) / z);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x * y) / z;
double t_2 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if ((t_2 <= -4e-253) || !(t_2 <= 5e-264)) {
tmp = x * t_2;
} else {
tmp = t_1 + ((x * t) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * y) / z t_2 = (y / z) + (t / (z + -1.0)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif (t_2 <= -4e-253) or not (t_2 <= 5e-264): tmp = x * t_2 else: tmp = t_1 + ((x * t) / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * y) / z) t_2 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif ((t_2 <= -4e-253) || !(t_2 <= 5e-264)) tmp = Float64(x * t_2); else tmp = Float64(t_1 + Float64(Float64(x * t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * y) / z; t_2 = (y / z) + (t / (z + -1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif ((t_2 <= -4e-253) || ~((t_2 <= 5e-264))) tmp = x * t_2; else tmp = t_1 + ((x * t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[Or[LessEqual[t$95$2, -4e-253], N[Not[LessEqual[t$95$2, 5e-264]], $MachinePrecision]], N[(x * t$95$2), $MachinePrecision], N[(t$95$1 + N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{z}\\
t_2 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-253} \lor \neg \left(t\_2 \leq 5 \cdot 10^{-264}\right):\\
\;\;\;\;x \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{x \cdot t}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 50.0%
Taylor expanded in y around inf 99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -4.0000000000000003e-253 or 5.0000000000000001e-264 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 98.5%
if -4.0000000000000003e-253 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 5.0000000000000001e-264Initial program 65.3%
Taylor expanded in z around inf 65.3%
associate-*r/65.3%
neg-mul-165.3%
Simplified65.3%
Taylor expanded in y around 0 100.0%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
(if (<= t_1 (- INFINITY))
(/ (* x y) z)
(if (or (<= t_1 -4e-253) (not (<= t_1 5e-264)))
(* x t_1)
(/ (* x (+ y t)) z)))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x * y) / z;
} else if ((t_1 <= -4e-253) || !(t_1 <= 5e-264)) {
tmp = x * t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x * y) / z;
} else if ((t_1 <= -4e-253) || !(t_1 <= 5e-264)) {
tmp = x * t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) + (t / (z + -1.0)) tmp = 0 if t_1 <= -math.inf: tmp = (x * y) / z elif (t_1 <= -4e-253) or not (t_1 <= 5e-264): tmp = x * t_1 else: tmp = (x * (y + t)) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x * y) / z); elseif ((t_1 <= -4e-253) || !(t_1 <= 5e-264)) tmp = Float64(x * t_1); else tmp = Float64(Float64(x * Float64(y + t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) + (t / (z + -1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = (x * y) / z; elseif ((t_1 <= -4e-253) || ~((t_1 <= 5e-264))) tmp = x * t_1; else tmp = (x * (y + t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[t$95$1, -4e-253], N[Not[LessEqual[t$95$1, 5e-264]], $MachinePrecision]], N[(x * t$95$1), $MachinePrecision], N[(N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-253} \lor \neg \left(t\_1 \leq 5 \cdot 10^{-264}\right):\\
\;\;\;\;x \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y + t\right)}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 50.0%
Taylor expanded in y around inf 99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -4.0000000000000003e-253 or 5.0000000000000001e-264 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 98.5%
if -4.0000000000000003e-253 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 5.0000000000000001e-264Initial program 65.3%
clear-num65.3%
frac-sub16.1%
*-un-lft-identity16.1%
Applied egg-rr16.1%
div-sub16.1%
times-frac16.1%
*-inverses60.4%
*-lft-identity60.4%
remove-double-neg60.4%
distribute-frac-neg60.4%
*-rgt-identity60.4%
distribute-lft-neg-in60.4%
cancel-sign-sub60.4%
*-commutative60.4%
associate-/r*65.3%
*-inverses65.3%
*-rgt-identity65.3%
distribute-frac-neg65.3%
distribute-neg-frac265.3%
neg-sub065.3%
associate--r-65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in z around inf 99.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z)))
(t_2 (* x (- (/ y z) t)))
(t_3 (* x (/ t (+ z -1.0)))))
(if (<= y -3.4e-97)
t_1
(if (<= y -1.8e-170)
t_3
(if (<= y -3.8e-180)
t_1
(if (<= y -5e-222)
t_2
(if (<= y 2.6e-75) t_3 (if (<= y 5.4e+75) t_2 (/ (* x y) z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = x * ((y / z) - t);
double t_3 = x * (t / (z + -1.0));
double tmp;
if (y <= -3.4e-97) {
tmp = t_1;
} else if (y <= -1.8e-170) {
tmp = t_3;
} else if (y <= -3.8e-180) {
tmp = t_1;
} else if (y <= -5e-222) {
tmp = t_2;
} else if (y <= 2.6e-75) {
tmp = t_3;
} else if (y <= 5.4e+75) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * (x / z)
t_2 = x * ((y / z) - t)
t_3 = x * (t / (z + (-1.0d0)))
if (y <= (-3.4d-97)) then
tmp = t_1
else if (y <= (-1.8d-170)) then
tmp = t_3
else if (y <= (-3.8d-180)) then
tmp = t_1
else if (y <= (-5d-222)) then
tmp = t_2
else if (y <= 2.6d-75) then
tmp = t_3
else if (y <= 5.4d+75) then
tmp = t_2
else
tmp = (x * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double t_2 = x * ((y / z) - t);
double t_3 = x * (t / (z + -1.0));
double tmp;
if (y <= -3.4e-97) {
tmp = t_1;
} else if (y <= -1.8e-170) {
tmp = t_3;
} else if (y <= -3.8e-180) {
tmp = t_1;
} else if (y <= -5e-222) {
tmp = t_2;
} else if (y <= 2.6e-75) {
tmp = t_3;
} else if (y <= 5.4e+75) {
tmp = t_2;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) t_2 = x * ((y / z) - t) t_3 = x * (t / (z + -1.0)) tmp = 0 if y <= -3.4e-97: tmp = t_1 elif y <= -1.8e-170: tmp = t_3 elif y <= -3.8e-180: tmp = t_1 elif y <= -5e-222: tmp = t_2 elif y <= 2.6e-75: tmp = t_3 elif y <= 5.4e+75: tmp = t_2 else: tmp = (x * y) / z return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) t_2 = Float64(x * Float64(Float64(y / z) - t)) t_3 = Float64(x * Float64(t / Float64(z + -1.0))) tmp = 0.0 if (y <= -3.4e-97) tmp = t_1; elseif (y <= -1.8e-170) tmp = t_3; elseif (y <= -3.8e-180) tmp = t_1; elseif (y <= -5e-222) tmp = t_2; elseif (y <= 2.6e-75) tmp = t_3; elseif (y <= 5.4e+75) tmp = t_2; else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); t_2 = x * ((y / z) - t); t_3 = x * (t / (z + -1.0)); tmp = 0.0; if (y <= -3.4e-97) tmp = t_1; elseif (y <= -1.8e-170) tmp = t_3; elseif (y <= -3.8e-180) tmp = t_1; elseif (y <= -5e-222) tmp = t_2; elseif (y <= 2.6e-75) tmp = t_3; elseif (y <= 5.4e+75) tmp = t_2; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e-97], t$95$1, If[LessEqual[y, -1.8e-170], t$95$3, If[LessEqual[y, -3.8e-180], t$95$1, If[LessEqual[y, -5e-222], t$95$2, If[LessEqual[y, 2.6e-75], t$95$3, If[LessEqual[y, 5.4e+75], t$95$2, N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := x \cdot \left(\frac{y}{z} - t\right)\\
t_3 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-170}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-222}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -3.3999999999999999e-97 or -1.8000000000000002e-170 < y < -3.79999999999999999e-180Initial program 92.4%
Taylor expanded in y around inf 71.8%
*-commutative71.8%
associate-/l*79.8%
Applied egg-rr79.8%
if -3.3999999999999999e-97 < y < -1.8000000000000002e-170 or -5.00000000000000008e-222 < y < 2.6e-75Initial program 95.8%
Taylor expanded in y around 0 82.2%
mul-1-neg82.2%
*-commutative82.2%
associate-/l*83.5%
distribute-rgt-neg-out83.5%
distribute-neg-frac283.5%
neg-sub083.5%
associate--r-83.5%
metadata-eval83.5%
Simplified83.5%
if -3.79999999999999999e-180 < y < -5.00000000000000008e-222 or 2.6e-75 < y < 5.39999999999999996e75Initial program 97.6%
Taylor expanded in z around 0 80.3%
if 5.39999999999999996e75 < y Initial program 83.8%
Taylor expanded in y around inf 92.8%
Final simplification83.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) t))) (t_2 (* x (/ t (+ z -1.0)))))
(if (<= y -3.6e-97)
(* y (/ x z))
(if (<= y -1.8e-170)
t_2
(if (<= y -3.5e-180)
(* y (* x (/ 1.0 z)))
(if (<= y -7.6e-216)
t_1
(if (<= y 2.8e-75) t_2 (if (<= y 2.7e+75) t_1 (/ (* x y) z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - t);
double t_2 = x * (t / (z + -1.0));
double tmp;
if (y <= -3.6e-97) {
tmp = y * (x / z);
} else if (y <= -1.8e-170) {
tmp = t_2;
} else if (y <= -3.5e-180) {
tmp = y * (x * (1.0 / z));
} else if (y <= -7.6e-216) {
tmp = t_1;
} else if (y <= 2.8e-75) {
tmp = t_2;
} else if (y <= 2.7e+75) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y / z) - t)
t_2 = x * (t / (z + (-1.0d0)))
if (y <= (-3.6d-97)) then
tmp = y * (x / z)
else if (y <= (-1.8d-170)) then
tmp = t_2
else if (y <= (-3.5d-180)) then
tmp = y * (x * (1.0d0 / z))
else if (y <= (-7.6d-216)) then
tmp = t_1
else if (y <= 2.8d-75) then
tmp = t_2
else if (y <= 2.7d+75) then
tmp = t_1
else
tmp = (x * y) / z
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);
double t_2 = x * (t / (z + -1.0));
double tmp;
if (y <= -3.6e-97) {
tmp = y * (x / z);
} else if (y <= -1.8e-170) {
tmp = t_2;
} else if (y <= -3.5e-180) {
tmp = y * (x * (1.0 / z));
} else if (y <= -7.6e-216) {
tmp = t_1;
} else if (y <= 2.8e-75) {
tmp = t_2;
} else if (y <= 2.7e+75) {
tmp = t_1;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - t) t_2 = x * (t / (z + -1.0)) tmp = 0 if y <= -3.6e-97: tmp = y * (x / z) elif y <= -1.8e-170: tmp = t_2 elif y <= -3.5e-180: tmp = y * (x * (1.0 / z)) elif y <= -7.6e-216: tmp = t_1 elif y <= 2.8e-75: tmp = t_2 elif y <= 2.7e+75: tmp = t_1 else: tmp = (x * y) / z return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - t)) t_2 = Float64(x * Float64(t / Float64(z + -1.0))) tmp = 0.0 if (y <= -3.6e-97) tmp = Float64(y * Float64(x / z)); elseif (y <= -1.8e-170) tmp = t_2; elseif (y <= -3.5e-180) tmp = Float64(y * Float64(x * Float64(1.0 / z))); elseif (y <= -7.6e-216) tmp = t_1; elseif (y <= 2.8e-75) tmp = t_2; elseif (y <= 2.7e+75) tmp = t_1; else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - t); t_2 = x * (t / (z + -1.0)); tmp = 0.0; if (y <= -3.6e-97) tmp = y * (x / z); elseif (y <= -1.8e-170) tmp = t_2; elseif (y <= -3.5e-180) tmp = y * (x * (1.0 / z)); elseif (y <= -7.6e-216) tmp = t_1; elseif (y <= 2.8e-75) tmp = t_2; elseif (y <= 2.7e+75) tmp = t_1; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.6e-97], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-170], t$95$2, If[LessEqual[y, -3.5e-180], N[(y * N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.6e-216], t$95$1, If[LessEqual[y, 2.8e-75], t$95$2, If[LessEqual[y, 2.7e+75], t$95$1, N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{-97}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-170}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{1}{z}\right)\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -3.59999999999999997e-97Initial program 93.1%
Taylor expanded in y around inf 73.1%
*-commutative73.1%
associate-/l*80.4%
Applied egg-rr80.4%
if -3.59999999999999997e-97 < y < -1.8000000000000002e-170 or -7.6000000000000001e-216 < y < 2.79999999999999998e-75Initial program 95.8%
Taylor expanded in y around 0 82.2%
mul-1-neg82.2%
*-commutative82.2%
associate-/l*83.5%
distribute-rgt-neg-out83.5%
distribute-neg-frac283.5%
neg-sub083.5%
associate--r-83.5%
metadata-eval83.5%
Simplified83.5%
if -1.8000000000000002e-170 < y < -3.5000000000000001e-180Initial program 80.2%
Taylor expanded in y around inf 50.4%
associate-/l*60.9%
*-un-lft-identity60.9%
associate-*l/61.2%
associate-*r*69.6%
Applied egg-rr69.6%
if -3.5000000000000001e-180 < y < -7.6000000000000001e-216 or 2.79999999999999998e-75 < y < 2.69999999999999998e75Initial program 97.6%
Taylor expanded in z around 0 80.3%
if 2.69999999999999998e75 < y Initial program 83.8%
Taylor expanded in y around inf 92.8%
Final simplification83.6%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -170000000.0)
(and (not (<= z -4.2e-257)) (or (<= z 4.5e-251) (not (<= z 0.0037)))))
(* (/ x z) t)
(* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -170000000.0) || (!(z <= -4.2e-257) && ((z <= 4.5e-251) || !(z <= 0.0037)))) {
tmp = (x / z) * t;
} else {
tmp = x * -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 <= (-170000000.0d0)) .or. (.not. (z <= (-4.2d-257))) .and. (z <= 4.5d-251) .or. (.not. (z <= 0.0037d0))) then
tmp = (x / z) * t
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -170000000.0) || (!(z <= -4.2e-257) && ((z <= 4.5e-251) || !(z <= 0.0037)))) {
tmp = (x / z) * t;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -170000000.0) or (not (z <= -4.2e-257) and ((z <= 4.5e-251) or not (z <= 0.0037))): tmp = (x / z) * t else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -170000000.0) || (!(z <= -4.2e-257) && ((z <= 4.5e-251) || !(z <= 0.0037)))) tmp = Float64(Float64(x / z) * t); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -170000000.0) || (~((z <= -4.2e-257)) && ((z <= 4.5e-251) || ~((z <= 0.0037))))) tmp = (x / z) * t; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -170000000.0], And[N[Not[LessEqual[z, -4.2e-257]], $MachinePrecision], Or[LessEqual[z, 4.5e-251], N[Not[LessEqual[z, 0.0037]], $MachinePrecision]]]], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -170000000 \lor \neg \left(z \leq -4.2 \cdot 10^{-257}\right) \land \left(z \leq 4.5 \cdot 10^{-251} \lor \neg \left(z \leq 0.0037\right)\right):\\
\;\;\;\;\frac{x}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.7e8 or -4.2000000000000002e-257 < z < 4.49999999999999978e-251 or 0.0037000000000000002 < z Initial program 94.0%
Taylor expanded in y around 0 48.3%
mul-1-neg48.3%
*-commutative48.3%
associate-/l*50.9%
distribute-rgt-neg-out50.9%
distribute-neg-frac250.9%
neg-sub050.9%
associate--r-50.9%
metadata-eval50.9%
Simplified50.9%
Taylor expanded in z around inf 51.6%
associate-/l*50.9%
Simplified50.9%
if -1.7e8 < z < -4.2000000000000002e-257 or 4.49999999999999978e-251 < z < 0.0037000000000000002Initial program 90.2%
Taylor expanded in y around 0 35.1%
mul-1-neg35.1%
*-commutative35.1%
associate-/l*35.1%
distribute-rgt-neg-out35.1%
distribute-neg-frac235.1%
neg-sub035.1%
associate--r-35.1%
metadata-eval35.1%
Simplified35.1%
Taylor expanded in z around 0 34.6%
mul-1-neg34.6%
Simplified34.6%
Final simplification44.0%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -170000000.0)
(and (not (<= z -4.1e-258)) (or (<= z 3e-265) (not (<= z 0.0037)))))
(* x (/ t z))
(* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -170000000.0) || (!(z <= -4.1e-258) && ((z <= 3e-265) || !(z <= 0.0037)))) {
tmp = x * (t / z);
} else {
tmp = x * -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 <= (-170000000.0d0)) .or. (.not. (z <= (-4.1d-258))) .and. (z <= 3d-265) .or. (.not. (z <= 0.0037d0))) then
tmp = x * (t / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -170000000.0) || (!(z <= -4.1e-258) && ((z <= 3e-265) || !(z <= 0.0037)))) {
tmp = x * (t / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -170000000.0) or (not (z <= -4.1e-258) and ((z <= 3e-265) or not (z <= 0.0037))): tmp = x * (t / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -170000000.0) || (!(z <= -4.1e-258) && ((z <= 3e-265) || !(z <= 0.0037)))) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -170000000.0) || (~((z <= -4.1e-258)) && ((z <= 3e-265) || ~((z <= 0.0037))))) tmp = x * (t / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -170000000.0], And[N[Not[LessEqual[z, -4.1e-258]], $MachinePrecision], Or[LessEqual[z, 3e-265], N[Not[LessEqual[z, 0.0037]], $MachinePrecision]]]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -170000000 \lor \neg \left(z \leq -4.1 \cdot 10^{-258}\right) \land \left(z \leq 3 \cdot 10^{-265} \lor \neg \left(z \leq 0.0037\right)\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.7e8 or -4.1000000000000001e-258 < z < 2.9999999999999998e-265 or 0.0037000000000000002 < z Initial program 93.9%
Taylor expanded in y around 0 48.3%
mul-1-neg48.3%
*-commutative48.3%
associate-/l*50.9%
distribute-rgt-neg-out50.9%
distribute-neg-frac250.9%
neg-sub050.9%
associate--r-50.9%
metadata-eval50.9%
Simplified50.9%
Taylor expanded in z around inf 54.8%
if -1.7e8 < z < -4.1000000000000001e-258 or 2.9999999999999998e-265 < z < 0.0037000000000000002Initial program 90.4%
Taylor expanded in y around 0 35.3%
mul-1-neg35.3%
*-commutative35.3%
associate-/l*35.3%
distribute-rgt-neg-out35.3%
distribute-neg-frac235.3%
neg-sub035.3%
associate--r-35.3%
metadata-eval35.3%
Simplified35.3%
Taylor expanded in z around 0 34.9%
mul-1-neg34.9%
Simplified34.9%
Final simplification46.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -3e+90)
(* y (/ x z))
(if (<= z -3.25e+44)
(/ (* x t) z)
(if (<= z 2.7e+104) (* x (- (/ y z) t)) (/ x (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3e+90) {
tmp = y * (x / z);
} else if (z <= -3.25e+44) {
tmp = (x * t) / z;
} else if (z <= 2.7e+104) {
tmp = x * ((y / z) - t);
} 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) :: tmp
if (z <= (-3d+90)) then
tmp = y * (x / z)
else if (z <= (-3.25d+44)) then
tmp = (x * t) / z
else if (z <= 2.7d+104) then
tmp = x * ((y / z) - t)
else
tmp = x / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3e+90) {
tmp = y * (x / z);
} else if (z <= -3.25e+44) {
tmp = (x * t) / z;
} else if (z <= 2.7e+104) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3e+90: tmp = y * (x / z) elif z <= -3.25e+44: tmp = (x * t) / z elif z <= 2.7e+104: tmp = x * ((y / z) - t) else: tmp = x / (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3e+90) tmp = Float64(y * Float64(x / z)); elseif (z <= -3.25e+44) tmp = Float64(Float64(x * t) / z); elseif (z <= 2.7e+104) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3e+90) tmp = y * (x / z); elseif (z <= -3.25e+44) tmp = (x * t) / z; elseif (z <= 2.7e+104) tmp = x * ((y / z) - t); else tmp = x / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3e+90], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.25e+44], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.7e+104], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+90}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq -3.25 \cdot 10^{+44}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\end{array}
\end{array}
if z < -2.99999999999999979e90Initial program 89.5%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
associate-/l*64.9%
Applied egg-rr64.9%
if -2.99999999999999979e90 < z < -3.25000000000000009e44Initial program 99.9%
Taylor expanded in y around 0 91.5%
mul-1-neg91.5%
*-commutative91.5%
associate-/l*91.4%
distribute-rgt-neg-out91.4%
distribute-neg-frac291.4%
neg-sub091.4%
associate--r-91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in z around inf 91.5%
if -3.25000000000000009e44 < z < 2.69999999999999985e104Initial program 91.8%
Taylor expanded in z around 0 85.1%
if 2.69999999999999985e104 < z Initial program 95.6%
Taylor expanded in y around 0 52.0%
mul-1-neg52.0%
*-commutative52.0%
associate-/l*60.3%
distribute-rgt-neg-out60.3%
distribute-neg-frac260.3%
neg-sub060.3%
associate--r-60.3%
metadata-eval60.3%
Simplified60.3%
Taylor expanded in z around inf 52.0%
associate-/l*49.7%
Simplified49.7%
associate-*r/52.0%
associate-*l/60.3%
clear-num60.2%
associate-*l/60.3%
*-un-lft-identity60.3%
Applied egg-rr60.3%
Final simplification77.4%
(FPCore (x y z t) :precision binary64 (if (<= x 1.7e-173) (* y (+ (/ x z) (/ (* x t) (* y (+ z -1.0))))) (* x (+ (/ y z) (/ t (+ z -1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.7e-173) {
tmp = y * ((x / z) + ((x * t) / (y * (z + -1.0))));
} else {
tmp = x * ((y / z) + (t / (z + -1.0)));
}
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 (x <= 1.7d-173) then
tmp = y * ((x / z) + ((x * t) / (y * (z + (-1.0d0)))))
else
tmp = x * ((y / z) + (t / (z + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.7e-173) {
tmp = y * ((x / z) + ((x * t) / (y * (z + -1.0))));
} else {
tmp = x * ((y / z) + (t / (z + -1.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 1.7e-173: tmp = y * ((x / z) + ((x * t) / (y * (z + -1.0)))) else: tmp = x * ((y / z) + (t / (z + -1.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 1.7e-173) tmp = Float64(y * Float64(Float64(x / z) + Float64(Float64(x * t) / Float64(y * Float64(z + -1.0))))); else tmp = Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 1.7e-173) tmp = y * ((x / z) + ((x * t) / (y * (z + -1.0)))); else tmp = x * ((y / z) + (t / (z + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 1.7e-173], N[(y * N[(N[(x / z), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.7 \cdot 10^{-173}:\\
\;\;\;\;y \cdot \left(\frac{x}{z} + \frac{x \cdot t}{y \cdot \left(z + -1\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)\\
\end{array}
\end{array}
if x < 1.6999999999999999e-173Initial program 91.4%
clear-num91.3%
frac-sub67.2%
*-un-lft-identity67.2%
Applied egg-rr67.2%
div-sub59.9%
times-frac66.7%
*-inverses86.1%
*-lft-identity86.1%
remove-double-neg86.1%
distribute-frac-neg86.1%
*-rgt-identity86.1%
distribute-lft-neg-in86.1%
cancel-sign-sub86.1%
*-commutative86.1%
associate-/r*91.3%
*-inverses91.3%
*-rgt-identity91.3%
distribute-frac-neg91.3%
distribute-neg-frac291.3%
neg-sub091.3%
associate--r-91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in y around inf 85.1%
if 1.6999999999999999e-173 < x Initial program 94.0%
Final simplification88.5%
(FPCore (x y z t) :precision binary64 (if (<= z -170000000.0) (* (/ x z) (+ y t)) (if (<= z 3.6e-6) (* x (- (/ y z) t)) (* x (+ (/ y z) (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -170000000.0) {
tmp = (x / z) * (y + t);
} else if (z <= 3.6e-6) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y / z) + (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 (z <= (-170000000.0d0)) then
tmp = (x / z) * (y + t)
else if (z <= 3.6d-6) then
tmp = x * ((y / z) - t)
else
tmp = x * ((y / z) + (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -170000000.0) {
tmp = (x / z) * (y + t);
} else if (z <= 3.6e-6) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((y / z) + (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -170000000.0: tmp = (x / z) * (y + t) elif z <= 3.6e-6: tmp = x * ((y / z) - t) else: tmp = x * ((y / z) + (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -170000000.0) tmp = Float64(Float64(x / z) * Float64(y + t)); elseif (z <= 3.6e-6) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(Float64(y / z) + Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -170000000.0) tmp = (x / z) * (y + t); elseif (z <= 3.6e-6) tmp = x * ((y / z) - t); else tmp = x * ((y / z) + (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -170000000.0], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-6], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -170000000:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < -1.7e8Initial program 92.3%
Taylor expanded in z around inf 90.8%
*-commutative90.8%
associate-/l*93.6%
cancel-sign-sub-inv93.6%
metadata-eval93.6%
*-lft-identity93.6%
+-commutative93.6%
Simplified93.6%
if -1.7e8 < z < 3.59999999999999984e-6Initial program 90.1%
Taylor expanded in z around 0 89.6%
if 3.59999999999999984e-6 < z Initial program 96.9%
Taylor expanded in z around inf 96.6%
associate-*r/96.6%
neg-mul-196.6%
Simplified96.6%
sub-neg96.6%
add-sqr-sqrt36.9%
sqrt-unprod54.8%
sqr-neg54.8%
sqrt-unprod36.5%
add-sqr-sqrt58.7%
distribute-frac-neg58.7%
add-sqr-sqrt22.2%
sqrt-unprod63.2%
sqr-neg63.2%
sqrt-unprod59.5%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
Final simplification92.4%
(FPCore (x y z t) :precision binary64 (if (<= x 1.25e-96) (- (/ (* x y) z) (/ (* x t) (- 1.0 z))) (* x (- (/ y z) (/ t (- 1.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.25e-96) {
tmp = ((x * y) / z) - ((x * t) / (1.0 - z));
} else {
tmp = x * ((y / z) - (t / (1.0 - 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 (x <= 1.25d-96) then
tmp = ((x * y) / z) - ((x * t) / (1.0d0 - z))
else
tmp = x * ((y / z) - (t / (1.0d0 - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.25e-96) {
tmp = ((x * y) / z) - ((x * t) / (1.0 - z));
} else {
tmp = x * ((y / z) - (t / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 1.25e-96: tmp = ((x * y) / z) - ((x * t) / (1.0 - z)) else: tmp = x * ((y / z) - (t / (1.0 - z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 1.25e-96) tmp = Float64(Float64(Float64(x * y) / z) - Float64(Float64(x * t) / Float64(1.0 - z))); else tmp = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 1.25e-96) tmp = ((x * y) / z) - ((x * t) / (1.0 - z)); else tmp = x * ((y / z) - (t / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 1.25e-96], N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] - N[(N[(x * t), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.25 \cdot 10^{-96}:\\
\;\;\;\;\frac{x \cdot y}{z} - \frac{x \cdot t}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\end{array}
\end{array}
if x < 1.24999999999999999e-96Initial program 91.8%
clear-num91.7%
frac-sub66.8%
*-un-lft-identity66.8%
Applied egg-rr66.8%
div-sub60.2%
times-frac66.9%
*-inverses87.0%
*-lft-identity87.0%
remove-double-neg87.0%
distribute-frac-neg87.0%
*-rgt-identity87.0%
distribute-lft-neg-in87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-/r*91.7%
*-inverses91.7%
*-rgt-identity91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
neg-sub091.7%
associate--r-91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in y around 0 90.7%
if 1.24999999999999999e-96 < x Initial program 93.8%
Final simplification91.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -170000000.0) (not (<= z 3.6e-6))) (* (/ x z) (+ y t)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -170000000.0) || !(z <= 3.6e-6)) {
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 <= (-170000000.0d0)) .or. (.not. (z <= 3.6d-6))) 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 <= -170000000.0) || !(z <= 3.6e-6)) {
tmp = (x / z) * (y + t);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -170000000.0) or not (z <= 3.6e-6): tmp = (x / z) * (y + t) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -170000000.0) || !(z <= 3.6e-6)) 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 <= -170000000.0) || ~((z <= 3.6e-6))) 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, -170000000.0], N[Not[LessEqual[z, 3.6e-6]], $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 -170000000 \lor \neg \left(z \leq 3.6 \cdot 10^{-6}\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.7e8 or 3.59999999999999984e-6 < z Initial program 94.7%
Taylor expanded in z around inf 86.6%
*-commutative86.6%
associate-/l*90.0%
cancel-sign-sub-inv90.0%
metadata-eval90.0%
*-lft-identity90.0%
+-commutative90.0%
Simplified90.0%
if -1.7e8 < z < 3.59999999999999984e-6Initial program 90.1%
Taylor expanded in z around 0 89.6%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.2e+148) (not (<= t 6.5e+127))) (* x (/ t z)) (* x (/ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.2e+148) || !(t <= 6.5e+127)) {
tmp = x * (t / 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 <= (-3.2d+148)) .or. (.not. (t <= 6.5d+127))) then
tmp = x * (t / 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 <= -3.2e+148) || !(t <= 6.5e+127)) {
tmp = x * (t / z);
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.2e+148) or not (t <= 6.5e+127): tmp = x * (t / z) else: tmp = x * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.2e+148) || !(t <= 6.5e+127)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.2e+148) || ~((t <= 6.5e+127))) tmp = x * (t / z); else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.2e+148], N[Not[LessEqual[t, 6.5e+127]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+148} \lor \neg \left(t \leq 6.5 \cdot 10^{+127}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -3.1999999999999999e148 or 6.5e127 < t Initial program 97.2%
Taylor expanded in y around 0 71.4%
mul-1-neg71.4%
*-commutative71.4%
associate-/l*78.2%
distribute-rgt-neg-out78.2%
distribute-neg-frac278.2%
neg-sub078.2%
associate--r-78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in z around inf 65.7%
if -3.1999999999999999e148 < t < 6.5e127Initial program 90.6%
Taylor expanded in y around inf 74.6%
associate-*r/73.7%
Simplified73.7%
Final simplification71.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.62e+152) (not (<= t 8e+127))) (* x (/ t z)) (* y (/ x z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.62e+152) || !(t <= 8e+127)) {
tmp = x * (t / z);
} else {
tmp = y * (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 <= (-1.62d+152)) .or. (.not. (t <= 8d+127))) then
tmp = x * (t / z)
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.62e+152) || !(t <= 8e+127)) {
tmp = x * (t / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.62e+152) or not (t <= 8e+127): tmp = x * (t / z) else: tmp = y * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.62e+152) || !(t <= 8e+127)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.62e+152) || ~((t <= 8e+127))) tmp = x * (t / z); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.62e+152], N[Not[LessEqual[t, 8e+127]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.62 \cdot 10^{+152} \lor \neg \left(t \leq 8 \cdot 10^{+127}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if t < -1.6200000000000001e152 or 7.99999999999999964e127 < t Initial program 97.2%
Taylor expanded in y around 0 71.4%
mul-1-neg71.4%
*-commutative71.4%
associate-/l*78.2%
distribute-rgt-neg-out78.2%
distribute-neg-frac278.2%
neg-sub078.2%
associate--r-78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in z around inf 65.7%
if -1.6200000000000001e152 < t < 7.99999999999999964e127Initial program 90.6%
Taylor expanded in y around inf 74.6%
*-commutative74.6%
associate-/l*76.5%
Applied egg-rr76.5%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (if (<= t -1.35e+148) (/ x (/ z t)) (if (<= t 5.6e+127) (* y (/ x z)) (* x (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.35e+148) {
tmp = x / (z / t);
} else if (t <= 5.6e+127) {
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 <= (-1.35d+148)) then
tmp = x / (z / t)
else if (t <= 5.6d+127) 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 <= -1.35e+148) {
tmp = x / (z / t);
} else if (t <= 5.6e+127) {
tmp = y * (x / z);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.35e+148: tmp = x / (z / t) elif t <= 5.6e+127: tmp = y * (x / z) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.35e+148) tmp = Float64(x / Float64(z / t)); elseif (t <= 5.6e+127) 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 <= -1.35e+148) tmp = x / (z / t); elseif (t <= 5.6e+127) tmp = y * (x / z); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.35e+148], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+127], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+127}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if t < -1.35000000000000009e148Initial program 99.8%
Taylor expanded in y around 0 82.3%
mul-1-neg82.3%
*-commutative82.3%
associate-/l*89.6%
distribute-rgt-neg-out89.6%
distribute-neg-frac289.6%
neg-sub089.6%
associate--r-89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in z around inf 59.8%
associate-/l*63.5%
Simplified63.5%
associate-*r/59.8%
associate-*l/66.9%
clear-num66.9%
associate-*l/67.0%
*-un-lft-identity67.0%
Applied egg-rr67.0%
if -1.35000000000000009e148 < t < 5.6000000000000004e127Initial program 90.6%
Taylor expanded in y around inf 74.6%
*-commutative74.6%
associate-/l*76.5%
Applied egg-rr76.5%
if 5.6000000000000004e127 < t Initial program 95.6%
Taylor expanded in y around 0 64.7%
mul-1-neg64.7%
*-commutative64.7%
associate-/l*71.2%
distribute-rgt-neg-out71.2%
distribute-neg-frac271.2%
neg-sub071.2%
associate--r-71.2%
metadata-eval71.2%
Simplified71.2%
Taylor expanded in z around inf 65.0%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
return x * -t;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x * -t;
}
def code(x, y, z, t): return x * -t
function code(x, y, z, t) return Float64(x * Float64(-t)) end
function tmp = code(x, y, z, t) tmp = x * -t; end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(-t\right)
\end{array}
Initial program 92.4%
Taylor expanded in y around 0 42.7%
mul-1-neg42.7%
*-commutative42.7%
associate-/l*44.2%
distribute-rgt-neg-out44.2%
distribute-neg-frac244.2%
neg-sub044.2%
associate--r-44.2%
metadata-eval44.2%
Simplified44.2%
Taylor expanded in z around 0 23.2%
mul-1-neg23.2%
Simplified23.2%
Final simplification23.2%
(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 2024069
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(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)))))