
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (- (/ b z) (fma x (* (/ y z) -9.0) (* (* a t) 4.0))) c)))
(if (<= z -1.95e-46)
t_1
(if (<= z 5e-16)
(/ (fma (* x 9.0) y (fma a (* -4.0 (* z t)) b)) (* z c))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) - fma(x, ((y / z) * -9.0), ((a * t) * 4.0))) / c;
double tmp;
if (z <= -1.95e-46) {
tmp = t_1;
} else if (z <= 5e-16) {
tmp = fma((x * 9.0), y, fma(a, (-4.0 * (z * t)), b)) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(b / z) - fma(x, Float64(Float64(y / z) * -9.0), Float64(Float64(a * t) * 4.0))) / c) tmp = 0.0 if (z <= -1.95e-46) tmp = t_1; elseif (z <= 5e-16) tmp = Float64(fma(Float64(x * 9.0), y, fma(a, Float64(-4.0 * Float64(z * t)), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b / z), $MachinePrecision] - N[(x * N[(N[(y / z), $MachinePrecision] * -9.0), $MachinePrecision] + N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.95e-46], t$95$1, If[LessEqual[z, 5e-16], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} - \mathsf{fma}\left(x, \frac{y}{z} \cdot -9, \left(a \cdot t\right) \cdot 4\right)}{c}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-16}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9500000000000001e-46 or 5.0000000000000004e-16 < z Initial program 65.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified83.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.0
Applied egg-rr84.0%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified95.6%
if -1.9500000000000001e-46 < z < 5.0000000000000004e-16Initial program 95.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
Applied egg-rr95.8%
Final simplification95.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ y (* z c))) (t_2 (* y (* x 9.0))))
(if (<= t_2 -1.5e+28)
(* 9.0 (* x t_1))
(if (<= t_2 -2e-161)
(/ (/ b c) z)
(if (<= t_2 1e-117)
(* a (* t (/ -4.0 c)))
(if (<= t_2 2e+112) (* b (/ 1.0 (* z c))) (* x (* 9.0 t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (z * c);
double t_2 = y * (x * 9.0);
double tmp;
if (t_2 <= -1.5e+28) {
tmp = 9.0 * (x * t_1);
} else if (t_2 <= -2e-161) {
tmp = (b / c) / z;
} else if (t_2 <= 1e-117) {
tmp = a * (t * (-4.0 / c));
} else if (t_2 <= 2e+112) {
tmp = b * (1.0 / (z * c));
} else {
tmp = x * (9.0 * t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y / (z * c)
t_2 = y * (x * 9.0d0)
if (t_2 <= (-1.5d+28)) then
tmp = 9.0d0 * (x * t_1)
else if (t_2 <= (-2d-161)) then
tmp = (b / c) / z
else if (t_2 <= 1d-117) then
tmp = a * (t * ((-4.0d0) / c))
else if (t_2 <= 2d+112) then
tmp = b * (1.0d0 / (z * c))
else
tmp = x * (9.0d0 * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (z * c);
double t_2 = y * (x * 9.0);
double tmp;
if (t_2 <= -1.5e+28) {
tmp = 9.0 * (x * t_1);
} else if (t_2 <= -2e-161) {
tmp = (b / c) / z;
} else if (t_2 <= 1e-117) {
tmp = a * (t * (-4.0 / c));
} else if (t_2 <= 2e+112) {
tmp = b * (1.0 / (z * c));
} else {
tmp = x * (9.0 * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = y / (z * c) t_2 = y * (x * 9.0) tmp = 0 if t_2 <= -1.5e+28: tmp = 9.0 * (x * t_1) elif t_2 <= -2e-161: tmp = (b / c) / z elif t_2 <= 1e-117: tmp = a * (t * (-4.0 / c)) elif t_2 <= 2e+112: tmp = b * (1.0 / (z * c)) else: tmp = x * (9.0 * t_1) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(y / Float64(z * c)) t_2 = Float64(y * Float64(x * 9.0)) tmp = 0.0 if (t_2 <= -1.5e+28) tmp = Float64(9.0 * Float64(x * t_1)); elseif (t_2 <= -2e-161) tmp = Float64(Float64(b / c) / z); elseif (t_2 <= 1e-117) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (t_2 <= 2e+112) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(x * Float64(9.0 * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = y / (z * c); t_2 = y * (x * 9.0); tmp = 0.0; if (t_2 <= -1.5e+28) tmp = 9.0 * (x * t_1); elseif (t_2 <= -2e-161) tmp = (b / c) / z; elseif (t_2 <= 1e-117) tmp = a * (t * (-4.0 / c)); elseif (t_2 <= 2e+112) tmp = b * (1.0 / (z * c)); else tmp = x * (9.0 * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+28], N[(9.0 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-161], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e-117], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+112], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(9.0 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot c}\\
t_2 := y \cdot \left(x \cdot 9\right)\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;9 \cdot \left(x \cdot t\_1\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-161}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{-117}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+112}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(9 \cdot t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.5e28Initial program 71.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified70.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6477.5
Applied egg-rr77.5%
Taylor expanded in y around inf
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6455.4
Simplified55.4%
if -1.5e28 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000006e-161Initial program 90.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6455.4
Simplified55.4%
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6458.4
Applied egg-rr58.4%
if -2.00000000000000006e-161 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000003e-117Initial program 77.5%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6450.6
Simplified50.6%
lift-*.f64N/A
*-commutativeN/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6453.1
Applied egg-rr53.1%
if 1.00000000000000003e-117 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999999e112Initial program 88.3%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6456.9
Simplified56.9%
lift-*.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6457.0
Applied egg-rr57.0%
if 1.9999999999999999e112 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 76.7%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified74.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.2
Applied egg-rr74.2%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified79.2%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6478.9
Simplified78.9%
Final simplification59.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* x 9.0))) (t_2 (* 9.0 (* x (/ y (* z c))))))
(if (<= t_1 -1.5e+28)
t_2
(if (<= t_1 -2e-161)
(/ (/ b c) z)
(if (<= t_1 1e-117)
(* a (* t (/ -4.0 c)))
(if (<= t_1 2e+112) (* b (/ 1.0 (* z c))) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (x * 9.0);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (t_1 <= -1.5e+28) {
tmp = t_2;
} else if (t_1 <= -2e-161) {
tmp = (b / c) / z;
} else if (t_1 <= 1e-117) {
tmp = a * (t * (-4.0 / c));
} else if (t_1 <= 2e+112) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (x * 9.0d0)
t_2 = 9.0d0 * (x * (y / (z * c)))
if (t_1 <= (-1.5d+28)) then
tmp = t_2
else if (t_1 <= (-2d-161)) then
tmp = (b / c) / z
else if (t_1 <= 1d-117) then
tmp = a * (t * ((-4.0d0) / c))
else if (t_1 <= 2d+112) then
tmp = b * (1.0d0 / (z * c))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (x * 9.0);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (t_1 <= -1.5e+28) {
tmp = t_2;
} else if (t_1 <= -2e-161) {
tmp = (b / c) / z;
} else if (t_1 <= 1e-117) {
tmp = a * (t * (-4.0 / c));
} else if (t_1 <= 2e+112) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = y * (x * 9.0) t_2 = 9.0 * (x * (y / (z * c))) tmp = 0 if t_1 <= -1.5e+28: tmp = t_2 elif t_1 <= -2e-161: tmp = (b / c) / z elif t_1 <= 1e-117: tmp = a * (t * (-4.0 / c)) elif t_1 <= 2e+112: tmp = b * (1.0 / (z * c)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(x * 9.0)) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (t_1 <= -1.5e+28) tmp = t_2; elseif (t_1 <= -2e-161) tmp = Float64(Float64(b / c) / z); elseif (t_1 <= 1e-117) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (t_1 <= 2e+112) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = y * (x * 9.0); t_2 = 9.0 * (x * (y / (z * c))); tmp = 0.0; if (t_1 <= -1.5e+28) tmp = t_2; elseif (t_1 <= -2e-161) tmp = (b / c) / z; elseif (t_1 <= 1e-117) tmp = a * (t * (-4.0 / c)); elseif (t_1 <= 2e+112) tmp = b * (1.0 / (z * c)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.5e+28], t$95$2, If[LessEqual[t$95$1, -2e-161], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e-117], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+112], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;t\_1 \leq -1.5 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-161}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{-117}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+112}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.5e28 or 1.9999999999999999e112 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 73.5%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified72.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.0
Applied egg-rr76.0%
Taylor expanded in y around inf
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6465.9
Simplified65.9%
if -1.5e28 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000006e-161Initial program 90.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6455.4
Simplified55.4%
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6458.4
Applied egg-rr58.4%
if -2.00000000000000006e-161 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000003e-117Initial program 77.5%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6450.6
Simplified50.6%
lift-*.f64N/A
*-commutativeN/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6453.1
Applied egg-rr53.1%
if 1.00000000000000003e-117 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999999e112Initial program 88.3%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6456.9
Simplified56.9%
lift-*.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6457.0
Applied egg-rr57.0%
Final simplification59.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* x 9.0))))
(if (<= t_1 -5e+14)
(/ (/ (fma 9.0 (* x y) b) c) z)
(if (<= t_1 2e+112)
(/ (fma a (* -4.0 (* z t)) b) (* z c))
(* x (* 9.0 (/ y (* z c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (x * 9.0);
double tmp;
if (t_1 <= -5e+14) {
tmp = (fma(9.0, (x * y), b) / c) / z;
} else if (t_1 <= 2e+112) {
tmp = fma(a, (-4.0 * (z * t)), b) / (z * c);
} else {
tmp = x * (9.0 * (y / (z * c)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(x * 9.0)) tmp = 0.0 if (t_1 <= -5e+14) tmp = Float64(Float64(fma(9.0, Float64(x * y), b) / c) / z); elseif (t_1 <= 2e+112) tmp = Float64(fma(a, Float64(-4.0 * Float64(z * t)), b) / Float64(z * c)); else tmp = Float64(x * Float64(9.0 * Float64(y / Float64(z * c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+14], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+112], N[(N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+112}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(9 \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e14Initial program 70.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-/l/N/A
lower-/.f64N/A
Applied egg-rr71.1%
Taylor expanded in a around 0
lower-/.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6466.5
Simplified66.5%
if -5e14 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999999e112Initial program 83.9%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6477.3
Simplified77.3%
if 1.9999999999999999e112 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 76.7%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified74.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.2
Applied egg-rr74.2%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified79.2%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6478.9
Simplified78.9%
Final simplification74.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* x 9.0))))
(if (<= t_1 -1e+15)
(/ (fma 9.0 (* x y) b) (* z c))
(if (<= t_1 2e+112)
(/ (fma a (* -4.0 (* z t)) b) (* z c))
(* x (* 9.0 (/ y (* z c))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (x * 9.0);
double tmp;
if (t_1 <= -1e+15) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else if (t_1 <= 2e+112) {
tmp = fma(a, (-4.0 * (z * t)), b) / (z * c);
} else {
tmp = x * (9.0 * (y / (z * c)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(x * 9.0)) tmp = 0.0 if (t_1 <= -1e+15) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); elseif (t_1 <= 2e+112) tmp = Float64(fma(a, Float64(-4.0 * Float64(z * t)), b) / Float64(z * c)); else tmp = Float64(x * Float64(9.0 * Float64(y / Float64(z * c)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+15], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+112], N[(N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot 9\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+15}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+112}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(9 \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e15Initial program 70.2%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6462.9
Simplified62.9%
if -1e15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999999e112Initial program 84.0%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6477.4
Simplified77.4%
if 1.9999999999999999e112 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 76.7%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified74.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6474.2
Applied egg-rr74.2%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified79.2%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6478.9
Simplified78.9%
Final simplification74.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma (* t 4.0) a (/ (- (* x (* y -9.0)) b) z)) (- c))))
(if (<= z -1.34e-45)
t_1
(if (<= z 8e-51)
(/ (fma (* x 9.0) y (fma a (* -4.0 (* z t)) b)) (* z c))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((t * 4.0), a, (((x * (y * -9.0)) - b) / z)) / -c;
double tmp;
if (z <= -1.34e-45) {
tmp = t_1;
} else if (z <= 8e-51) {
tmp = fma((x * 9.0), y, fma(a, (-4.0 * (z * t)), b)) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(fma(Float64(t * 4.0), a, Float64(Float64(Float64(x * Float64(y * -9.0)) - b) / z)) / Float64(-c)) tmp = 0.0 if (z <= -1.34e-45) tmp = t_1; elseif (z <= 8e-51) tmp = Float64(fma(Float64(x * 9.0), y, fma(a, Float64(-4.0 * Float64(z * t)), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * 4.0), $MachinePrecision] * a + N[(N[(N[(x * N[(y * -9.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / (-c)), $MachinePrecision]}, If[LessEqual[z, -1.34e-45], t$95$1, If[LessEqual[z, 8e-51], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(t \cdot 4, a, \frac{x \cdot \left(y \cdot -9\right) - b}{z}\right)}{-c}\\
\mathbf{if}\;z \leq -1.34 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-51}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.34e-45 or 8.0000000000000001e-51 < z Initial program 65.9%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified83.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6484.2
Applied egg-rr84.2%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified94.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-/.f64N/A
associate--l+N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-*r/N/A
lift-/.f64N/A
sub-divN/A
Applied egg-rr88.7%
if -1.34e-45 < z < 8.0000000000000001e-51Initial program 97.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
Applied egg-rr97.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (/ b z) (* t (* a -4.0))) c)))
(if (<= z -1.18e+73)
t_1
(if (<= z 3.8e+65)
(/ (fma (* x 9.0) y (fma a (* -4.0 (* z t)) b)) (* z c))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -1.18e+73) {
tmp = t_1;
} else if (z <= 3.8e+65) {
tmp = fma((x * 9.0), y, fma(a, (-4.0 * (z * t)), b)) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(b / z) + Float64(t * Float64(a * -4.0))) / c) tmp = 0.0 if (z <= -1.18e+73) tmp = t_1; elseif (z <= 3.8e+65) tmp = Float64(fma(Float64(x * 9.0), y, fma(a, Float64(-4.0 * Float64(z * t)), b)) / Float64(z * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.18e+73], t$95$1, If[LessEqual[z, 3.8e+65], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(a * N[(-4.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{if}\;z \leq -1.18 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(a, -4 \cdot \left(z \cdot t\right), b\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.18000000000000004e73 or 3.80000000000000011e65 < z Initial program 50.6%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified82.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6481.5
Applied egg-rr81.5%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified93.7%
Taylor expanded in x around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.3
Simplified76.3%
if -1.18000000000000004e73 < z < 3.80000000000000011e65Initial program 96.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
Applied egg-rr96.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a -4.0) (/ t c))))
(if (<= z -3.8e+81)
t_1
(if (<= z 1.05e-68)
(/ (fma 9.0 (* x y) b) (* z c))
(if (<= z 2.8e+134) (/ (fma (* z (* a -4.0)) t b) (* z c)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * -4.0) * (t / c);
double tmp;
if (z <= -3.8e+81) {
tmp = t_1;
} else if (z <= 1.05e-68) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else if (z <= 2.8e+134) {
tmp = fma((z * (a * -4.0)), t, b) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * -4.0) * Float64(t / c)) tmp = 0.0 if (z <= -3.8e+81) tmp = t_1; elseif (z <= 1.05e-68) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); elseif (z <= 2.8e+134) tmp = Float64(fma(Float64(z * Float64(a * -4.0)), t, b) / Float64(z * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+81], t$95$1, If[LessEqual[z, 1.05e-68], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+134], N[(N[(N[(z * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-68}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+134}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z \cdot \left(a \cdot -4\right), t, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.8e81 or 2.7999999999999999e134 < z Initial program 49.2%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6460.2
Simplified60.2%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.6
Applied egg-rr63.6%
if -3.8e81 < z < 1.05000000000000004e-68Initial program 96.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6485.2
Simplified85.2%
if 1.05000000000000004e-68 < z < 2.7999999999999999e134Initial program 80.3%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.9
Simplified67.9%
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.2
Applied egg-rr70.2%
Final simplification76.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (/ b z) (* t (* a -4.0))) c)))
(if (<= z -2.4e+72)
t_1
(if (<= z 2.25e-83) (/ (fma 9.0 (* x y) b) (* z c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((b / z) + (t * (a * -4.0))) / c;
double tmp;
if (z <= -2.4e+72) {
tmp = t_1;
} else if (z <= 2.25e-83) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(b / z) + Float64(t * Float64(a * -4.0))) / c) tmp = 0.0 if (z <= -2.4e+72) tmp = t_1; elseif (z <= 2.25e-83) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -2.4e+72], t$95$1, If[LessEqual[z, 2.25e-83], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-83}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4000000000000001e72 or 2.24999999999999999e-83 < z Initial program 61.1%
Taylor expanded in x around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
*-commutativeN/A
Simplified84.4%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6485.2
Applied egg-rr85.2%
Taylor expanded in c around -inf
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified93.1%
Taylor expanded in x around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
cancel-sign-sub-invN/A
metadata-evalN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.8
Simplified75.8%
if -2.4000000000000001e72 < z < 2.24999999999999999e-83Initial program 97.3%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6485.0
Simplified85.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -3.7e+86)
(/ (/ b z) c)
(if (<= b 1e-166)
(* (* a -4.0) (/ t c))
(if (<= b 0.000185) (/ (* 9.0 (* x y)) (* z c)) (/ (/ b c) z)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.7e+86) {
tmp = (b / z) / c;
} else if (b <= 1e-166) {
tmp = (a * -4.0) * (t / c);
} else if (b <= 0.000185) {
tmp = (9.0 * (x * y)) / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.7d+86)) then
tmp = (b / z) / c
else if (b <= 1d-166) then
tmp = (a * (-4.0d0)) * (t / c)
else if (b <= 0.000185d0) then
tmp = (9.0d0 * (x * y)) / (z * c)
else
tmp = (b / c) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.7e+86) {
tmp = (b / z) / c;
} else if (b <= 1e-166) {
tmp = (a * -4.0) * (t / c);
} else if (b <= 0.000185) {
tmp = (9.0 * (x * y)) / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.7e+86: tmp = (b / z) / c elif b <= 1e-166: tmp = (a * -4.0) * (t / c) elif b <= 0.000185: tmp = (9.0 * (x * y)) / (z * c) else: tmp = (b / c) / z return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.7e+86) tmp = Float64(Float64(b / z) / c); elseif (b <= 1e-166) tmp = Float64(Float64(a * -4.0) * Float64(t / c)); elseif (b <= 0.000185) tmp = Float64(Float64(9.0 * Float64(x * y)) / Float64(z * c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.7e+86) tmp = (b / z) / c; elseif (b <= 1e-166) tmp = (a * -4.0) * (t / c); elseif (b <= 0.000185) tmp = (9.0 * (x * y)) / (z * c); else tmp = (b / c) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.7e+86], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 1e-166], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.000185], N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;b \leq 10^{-166}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{elif}\;b \leq 0.000185:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -3.69999999999999992e86Initial program 72.2%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6458.8
Simplified58.8%
associate-/r*N/A
lower-/.f64N/A
lower-/.f6464.1
Applied egg-rr64.1%
if -3.69999999999999992e86 < b < 1.00000000000000004e-166Initial program 79.0%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6453.7
Simplified53.7%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.8
Applied egg-rr53.8%
if 1.00000000000000004e-166 < b < 1.85e-4Initial program 79.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6465.1
Simplified65.1%
if 1.85e-4 < b Initial program 85.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6459.9
Simplified59.9%
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6460.0
Applied egg-rr60.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= z -7.4e+87) (* (* a -4.0) (/ t c)) (if (<= z 5.5e+70) (/ (fma 9.0 (* x y) b) (* z c)) (* t (* a (/ -4.0 c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.4e+87) {
tmp = (a * -4.0) * (t / c);
} else if (z <= 5.5e+70) {
tmp = fma(9.0, (x * y), b) / (z * c);
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7.4e+87) tmp = Float64(Float64(a * -4.0) * Float64(t / c)); elseif (z <= 5.5e+70) tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c)); else tmp = Float64(t * Float64(a * Float64(-4.0 / c))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7.4e+87], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+70], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+87}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+70}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if z < -7.40000000000000005e87Initial program 47.0%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6458.4
Simplified58.4%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6458.2
Applied egg-rr58.2%
if -7.40000000000000005e87 < z < 5.49999999999999986e70Initial program 95.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f6480.3
Simplified80.3%
if 5.49999999999999986e70 < z Initial program 52.9%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6457.1
Simplified57.1%
lift-*.f64N/A
*-commutativeN/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.0
Applied egg-rr58.0%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -3.85e+80) (/ (/ b z) c) (if (<= b 1.42e+31) (* (* a -4.0) (/ t c)) (/ (/ b c) z))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.85e+80) {
tmp = (b / z) / c;
} else if (b <= 1.42e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.85d+80)) then
tmp = (b / z) / c
else if (b <= 1.42d+31) then
tmp = (a * (-4.0d0)) * (t / c)
else
tmp = (b / c) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.85e+80) {
tmp = (b / z) / c;
} else if (b <= 1.42e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.85e+80: tmp = (b / z) / c elif b <= 1.42e+31: tmp = (a * -4.0) * (t / c) else: tmp = (b / c) / z return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.85e+80) tmp = Float64(Float64(b / z) / c); elseif (b <= 1.42e+31) tmp = Float64(Float64(a * -4.0) * Float64(t / c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.85e+80) tmp = (b / z) / c; elseif (b <= 1.42e+31) tmp = (a * -4.0) * (t / c); else tmp = (b / c) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.85e+80], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 1.42e+31], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.85 \cdot 10^{+80}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{+31}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -3.84999999999999998e80Initial program 72.2%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6458.8
Simplified58.8%
associate-/r*N/A
lower-/.f64N/A
lower-/.f6464.1
Applied egg-rr64.1%
if -3.84999999999999998e80 < b < 1.41999999999999997e31Initial program 79.8%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6447.4
Simplified47.4%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6447.5
Applied egg-rr47.5%
if 1.41999999999999997e31 < b Initial program 84.7%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6464.5
Simplified64.5%
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6464.6
Applied egg-rr64.6%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ (/ b c) z))) (if (<= b -6.5e+77) t_1 (if (<= b 1.45e+31) (* (* a -4.0) (/ t c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -6.5e+77) {
tmp = t_1;
} else if (b <= 1.45e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b / c) / z
if (b <= (-6.5d+77)) then
tmp = t_1
else if (b <= 1.45d+31) then
tmp = (a * (-4.0d0)) * (t / c)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -6.5e+77) {
tmp = t_1;
} else if (b <= 1.45e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -6.5e+77: tmp = t_1 elif b <= 1.45e+31: tmp = (a * -4.0) * (t / c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -6.5e+77) tmp = t_1; elseif (b <= 1.45e+31) tmp = Float64(Float64(a * -4.0) * Float64(t / c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b / c) / z; tmp = 0.0; if (b <= -6.5e+77) tmp = t_1; elseif (b <= 1.45e+31) tmp = (a * -4.0) * (t / c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -6.5e+77], t$95$1, If[LessEqual[b, 1.45e+31], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -6.5 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{+31}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.5e77 or 1.45e31 < b Initial program 78.8%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6461.8
Simplified61.8%
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6463.6
Applied egg-rr63.6%
if -6.5e77 < b < 1.45e31Initial program 79.8%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6447.4
Simplified47.4%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6447.5
Applied egg-rr47.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= t -1.5e+22) (* a (* t (/ -4.0 c))) (if (<= t 9.5e-86) (* b (/ 1.0 (* z c))) (* (* a -4.0) (/ t c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e+22) {
tmp = a * (t * (-4.0 / c));
} else if (t <= 9.5e-86) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (a * -4.0) * (t / c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.5d+22)) then
tmp = a * (t * ((-4.0d0) / c))
else if (t <= 9.5d-86) then
tmp = b * (1.0d0 / (z * c))
else
tmp = (a * (-4.0d0)) * (t / c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.5e+22) {
tmp = a * (t * (-4.0 / c));
} else if (t <= 9.5e-86) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (a * -4.0) * (t / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.5e+22: tmp = a * (t * (-4.0 / c)) elif t <= 9.5e-86: tmp = b * (1.0 / (z * c)) else: tmp = (a * -4.0) * (t / c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.5e+22) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (t <= 9.5e-86) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(Float64(a * -4.0) * Float64(t / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -1.5e+22) tmp = a * (t * (-4.0 / c)); elseif (t <= 9.5e-86) tmp = b * (1.0 / (z * c)); else tmp = (a * -4.0) * (t / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.5e+22], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-86], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+22}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-86}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\end{array}
\end{array}
if t < -1.5e22Initial program 75.2%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6450.5
Simplified50.5%
lift-*.f64N/A
*-commutativeN/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.2
Applied egg-rr62.2%
if -1.5e22 < t < 9.4999999999999996e-86Initial program 89.3%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6443.1
Simplified43.1%
lift-*.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6444.7
Applied egg-rr44.7%
if 9.4999999999999996e-86 < t Initial program 67.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Simplified50.0%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6451.5
Applied egg-rr51.5%
Final simplification50.6%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ b (* z c)))) (if (<= b -1.46e+78) t_1 (if (<= b 1.72e+31) (* (* a -4.0) (/ t c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -1.46e+78) {
tmp = t_1;
} else if (b <= 1.72e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b / (z * c)
if (b <= (-1.46d+78)) then
tmp = t_1
else if (b <= 1.72d+31) then
tmp = (a * (-4.0d0)) * (t / c)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -1.46e+78) {
tmp = t_1;
} else if (b <= 1.72e+31) {
tmp = (a * -4.0) * (t / c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if b <= -1.46e+78: tmp = t_1 elif b <= 1.72e+31: tmp = (a * -4.0) * (t / c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (b <= -1.46e+78) tmp = t_1; elseif (b <= 1.72e+31) tmp = Float64(Float64(a * -4.0) * Float64(t / c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (z * c); tmp = 0.0; if (b <= -1.46e+78) tmp = t_1; elseif (b <= 1.72e+31) tmp = (a * -4.0) * (t / c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.46e+78], t$95$1, If[LessEqual[b, 1.72e+31], N[(N[(a * -4.0), $MachinePrecision] * N[(t / c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;b \leq -1.46 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.72 \cdot 10^{+31}:\\
\;\;\;\;\left(a \cdot -4\right) \cdot \frac{t}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.46000000000000005e78 or 1.72e31 < b Initial program 78.8%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6461.8
Simplified61.8%
if -1.46000000000000005e78 < b < 1.72e31Initial program 79.8%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6447.4
Simplified47.4%
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6447.5
Applied egg-rr47.5%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ b (* z c)))) (if (<= b -4.5e+78) t_1 (if (<= b 1.3e+31) (* a (* t (/ -4.0 c))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -4.5e+78) {
tmp = t_1;
} else if (b <= 1.3e+31) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b / (z * c)
if (b <= (-4.5d+78)) then
tmp = t_1
else if (b <= 1.3d+31) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (b <= -4.5e+78) {
tmp = t_1;
} else if (b <= 1.3e+31) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if b <= -4.5e+78: tmp = t_1 elif b <= 1.3e+31: tmp = a * (t * (-4.0 / c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (b <= -4.5e+78) tmp = t_1; elseif (b <= 1.3e+31) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (z * c); tmp = 0.0; if (b <= -4.5e+78) tmp = t_1; elseif (b <= 1.3e+31) tmp = a * (t * (-4.0 / c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.5e+78], t$95$1, If[LessEqual[b, 1.3e+31], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;b \leq -4.5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.4999999999999999e78 or 1.3e31 < b Initial program 78.8%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6461.8
Simplified61.8%
if -4.4999999999999999e78 < b < 1.3e31Initial program 79.8%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6447.4
Simplified47.4%
lift-*.f64N/A
*-commutativeN/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6447.5
Applied egg-rr47.5%
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
def code(x, y, z, t, a, b, c): return b / (z * c)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.2
Simplified36.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024207
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))