
(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 (* (/ y (* c z)) 9.0)))
(if (<= z -9e+93)
(fma t_1 x (* (fma (/ t c) -4.0 (/ b (* (* a z) c))) a))
(if (<= z 7.2e+30)
(/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z))
(fma t_1 x (fma (* (/ a c) -4.0) t (/ b (* c z))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (y / (c * z)) * 9.0;
double tmp;
if (z <= -9e+93) {
tmp = fma(t_1, x, (fma((t / c), -4.0, (b / ((a * z) * c))) * a));
} else if (z <= 7.2e+30) {
tmp = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
} else {
tmp = fma(t_1, x, fma(((a / c) * -4.0), t, (b / (c * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(y / Float64(c * z)) * 9.0) tmp = 0.0 if (z <= -9e+93) tmp = fma(t_1, x, Float64(fma(Float64(t / c), -4.0, Float64(b / Float64(Float64(a * z) * c))) * a)); elseif (z <= 7.2e+30) tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)); else tmp = fma(t_1, x, fma(Float64(Float64(a / c) * -4.0), t, Float64(b / Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[z, -9e+93], N[(t$95$1 * x + N[(N[(N[(t / c), $MachinePrecision] * -4.0 + N[(b / N[(N[(a * z), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+30], N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] * t + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{c \cdot z} \cdot 9\\
\mathbf{if}\;z \leq -9 \cdot 10^{+93}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(\frac{t}{c}, -4, \frac{b}{\left(a \cdot z\right) \cdot c}\right) \cdot a\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(\frac{a}{c} \cdot -4, t, \frac{b}{c \cdot z}\right)\right)\\
\end{array}
\end{array}
if z < -8.99999999999999981e93Initial program 59.7%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites77.5%
Taylor expanded in a around inf
Applied rewrites85.1%
if -8.99999999999999981e93 < z < 7.2000000000000004e30Initial program 96.1%
if 7.2000000000000004e30 < z Initial program 57.5%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites89.6%
Final simplification92.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z)))
(t_2 (* (* -4.0 z) a)))
(if (<= t_1 -1e-177)
(/ (fma (* x 9.0) y (fma t_2 t b)) (* c z))
(if (<= t_1 0.0)
(/ (fma (* 9.0 y) (/ x c) (/ (fma (* (* a t) -4.0) z b) c)) z)
(if (<= t_1 INFINITY)
(/ 1.0 (/ (* c z) (fma t_2 t (fma (* x y) 9.0 b))))
(* (* a (/ t c)) -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
double t_2 = (-4.0 * z) * a;
double tmp;
if (t_1 <= -1e-177) {
tmp = fma((x * 9.0), y, fma(t_2, t, b)) / (c * z);
} else if (t_1 <= 0.0) {
tmp = fma((9.0 * y), (x / c), (fma(((a * t) * -4.0), z, b) / c)) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = 1.0 / ((c * z) / fma(t_2, t, fma((x * y), 9.0, b)));
} else {
tmp = (a * (t / c)) * -4.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)) t_2 = Float64(Float64(-4.0 * z) * a) tmp = 0.0 if (t_1 <= -1e-177) tmp = Float64(fma(Float64(x * 9.0), y, fma(t_2, t, b)) / Float64(c * z)); elseif (t_1 <= 0.0) tmp = Float64(fma(Float64(9.0 * y), Float64(x / c), Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / c)) / z); elseif (t_1 <= Inf) tmp = Float64(1.0 / Float64(Float64(c * z) / fma(t_2, t, fma(Float64(x * y), 9.0, b)))); else tmp = Float64(Float64(a * Float64(t / c)) * -4.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-177], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(t$95$2 * t + b), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(9.0 * y), $MachinePrecision] * N[(x / c), $MachinePrecision] + N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(1.0 / N[(N[(c * z), $MachinePrecision] / N[(t$95$2 * t + N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
t_2 := \left(-4 \cdot z\right) \cdot a\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-177}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(t\_2, t, b\right)\right)}{c \cdot z}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(9 \cdot y, \frac{x}{c}, \frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{c}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{1}{\frac{c \cdot z}{\mathsf{fma}\left(t\_2, t, \mathsf{fma}\left(x \cdot y, 9, b\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999952e-178Initial program 88.2%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites87.1%
if -9.99999999999999952e-178 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 53.0%
Taylor expanded in z around 0
lower-/.f64N/A
Applied rewrites94.2%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6489.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6489.6
lift-+.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites86.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites69.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
Applied rewrites63.6%
Final simplification85.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* x y) 9.0 b))
(t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z)))
(t_3 (* (* -4.0 z) a)))
(if (<= t_2 -1e-177)
(/ (fma (* x 9.0) y (fma t_3 t b)) (* c z))
(if (<= t_2 0.0)
(/ (/ t_1 c) z)
(if (<= t_2 INFINITY)
(/ 1.0 (/ (* c z) (fma t_3 t t_1)))
(* (* a (/ t c)) -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((x * y), 9.0, b);
double t_2 = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
double t_3 = (-4.0 * z) * a;
double tmp;
if (t_2 <= -1e-177) {
tmp = fma((x * 9.0), y, fma(t_3, t, b)) / (c * z);
} else if (t_2 <= 0.0) {
tmp = (t_1 / c) / z;
} else if (t_2 <= ((double) INFINITY)) {
tmp = 1.0 / ((c * z) / fma(t_3, t, t_1));
} else {
tmp = (a * (t / c)) * -4.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(x * y), 9.0, b) t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)) t_3 = Float64(Float64(-4.0 * z) * a) tmp = 0.0 if (t_2 <= -1e-177) tmp = Float64(fma(Float64(x * 9.0), y, fma(t_3, t, b)) / Float64(c * z)); elseif (t_2 <= 0.0) tmp = Float64(Float64(t_1 / c) / z); elseif (t_2 <= Inf) tmp = Float64(1.0 / Float64(Float64(c * z) / fma(t_3, t, t_1))); else tmp = Float64(Float64(a * Float64(t / c)) * -4.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-177], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(t$95$3 * t + b), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(t$95$1 / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(1.0 / N[(N[(c * z), $MachinePrecision] / N[(t$95$3 * t + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x \cdot y, 9, b\right)\\
t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
t_3 := \left(-4 \cdot z\right) \cdot a\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-177}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(t\_3, t, b\right)\right)}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{c}}{z}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{1}{\frac{c \cdot z}{\mathsf{fma}\left(t\_3, t, t\_1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999952e-178Initial program 88.2%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites87.1%
if -9.99999999999999952e-178 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 53.0%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6476.7
Applied rewrites76.7%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6489.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6489.6
lift-+.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
Applied rewrites86.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites69.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
Applied rewrites63.6%
Final simplification84.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* x y) 9.0 b))
(t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z)))
(t_3 (* (* -4.0 z) a)))
(if (<= t_2 -1e-177)
(/ (fma (* x 9.0) y (fma t_3 t b)) (* c z))
(if (<= t_2 0.0)
(/ (/ t_1 c) z)
(if (<= t_2 INFINITY)
(* (/ (- -1.0) (* c z)) (fma t_3 t t_1))
(* (* a (/ t c)) -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((x * y), 9.0, b);
double t_2 = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
double t_3 = (-4.0 * z) * a;
double tmp;
if (t_2 <= -1e-177) {
tmp = fma((x * 9.0), y, fma(t_3, t, b)) / (c * z);
} else if (t_2 <= 0.0) {
tmp = (t_1 / c) / z;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (-(-1.0) / (c * z)) * fma(t_3, t, t_1);
} else {
tmp = (a * (t / c)) * -4.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(x * y), 9.0, b) t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)) t_3 = Float64(Float64(-4.0 * z) * a) tmp = 0.0 if (t_2 <= -1e-177) tmp = Float64(fma(Float64(x * 9.0), y, fma(t_3, t, b)) / Float64(c * z)); elseif (t_2 <= 0.0) tmp = Float64(Float64(t_1 / c) / z); elseif (t_2 <= Inf) tmp = Float64(Float64(Float64(-(-1.0)) / Float64(c * z)) * fma(t_3, t, t_1)); else tmp = Float64(Float64(a * Float64(t / c)) * -4.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-177], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(t$95$3 * t + b), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(t$95$1 / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[((--1.0) / N[(c * z), $MachinePrecision]), $MachinePrecision] * N[(t$95$3 * t + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x \cdot y, 9, b\right)\\
t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
t_3 := \left(-4 \cdot z\right) \cdot a\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-177}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(t\_3, t, b\right)\right)}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{c}}{z}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{--1}{c \cdot z} \cdot \mathsf{fma}\left(t\_3, t, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999952e-178Initial program 88.2%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites87.1%
if -9.99999999999999952e-178 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 53.0%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6476.7
Applied rewrites76.7%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.7%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lower-*.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6489.5
lift-+.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites86.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites69.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
Applied rewrites63.6%
Final simplification84.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z)))
(t_2 (/ (fma (* x 9.0) y (fma (* (* -4.0 z) a) t b)) (* c z))))
(if (<= t_1 -1e-177)
t_2
(if (<= t_1 0.0)
(/ (/ (fma (* x y) 9.0 b) c) z)
(if (<= t_1 INFINITY) t_2 (* (* a (/ t c)) -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
double t_2 = fma((x * 9.0), y, fma(((-4.0 * z) * a), t, b)) / (c * z);
double tmp;
if (t_1 <= -1e-177) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (fma((x * y), 9.0, b) / c) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (a * (t / c)) * -4.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)) t_2 = Float64(fma(Float64(x * 9.0), y, fma(Float64(Float64(-4.0 * z) * a), t, b)) / Float64(c * z)) tmp = 0.0 if (t_1 <= -1e-177) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(fma(Float64(x * y), 9.0, b) / c) / z); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(Float64(a * Float64(t / c)) * -4.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-177], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
t_2 := \frac{\mathsf{fma}\left(x \cdot 9, y, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c \cdot z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-177}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999952e-178 or 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 89.0%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites86.6%
if -9.99999999999999952e-178 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 53.0%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6476.7
Applied rewrites76.7%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites69.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
Applied rewrites63.6%
Final simplification84.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ (fma (* x y) 9.0 b) c) z)) (t_2 (* (* x 9.0) y)))
(if (<= t_2 (- INFINITY))
(* (/ (* 9.0 y) z) (/ x c))
(if (<= t_2 -1e+133)
(/ (fma (* x 9.0) y (* (* (* t z) a) -4.0)) (* c z))
(if (<= t_2 -2e-126)
t_1
(if (<= t_2 5e-53)
(/ (/ (fma (* (* a t) -4.0) z b) z) c)
(if (<= t_2 1e+190) t_1 (* (/ x z) (* (/ y c) 9.0)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fma((x * y), 9.0, b) / c) / z;
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((9.0 * y) / z) * (x / c);
} else if (t_2 <= -1e+133) {
tmp = fma((x * 9.0), y, (((t * z) * a) * -4.0)) / (c * z);
} else if (t_2 <= -2e-126) {
tmp = t_1;
} else if (t_2 <= 5e-53) {
tmp = (fma(((a * t) * -4.0), z, b) / z) / c;
} else if (t_2 <= 1e+190) {
tmp = t_1;
} else {
tmp = (x / z) * ((y / c) * 9.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(fma(Float64(x * y), 9.0, b) / c) / z) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); elseif (t_2 <= -1e+133) tmp = Float64(fma(Float64(x * 9.0), y, Float64(Float64(Float64(t * z) * a) * -4.0)) / Float64(c * z)); elseif (t_2 <= -2e-126) tmp = t_1; elseif (t_2 <= 5e-53) tmp = Float64(Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / z) / c); elseif (t_2 <= 1e+190) tmp = t_1; else tmp = Float64(Float64(x / z) * Float64(Float64(y / c) * 9.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e+133], N[(N[(N[(x * 9.0), $MachinePrecision] * y + N[(N[(N[(t * z), $MachinePrecision] * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-126], t$95$1, If[LessEqual[t$95$2, 5e-53], N[(N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 1e+190], t$95$1, N[(N[(x / z), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z}\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot 9, y, \left(\left(t \cdot z\right) \cdot a\right) \cdot -4\right)}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{z}}{c}\\
\mathbf{elif}\;t\_2 \leq 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{c} \cdot 9\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 57.3%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6487.6
Applied rewrites87.6%
Applied rewrites93.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 87.5%
lift-+.f64N/A
lift--.f64N/A
associate-+l-N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites87.4%
Taylor expanded in b around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6487.5
Applied rewrites87.5%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-126 or 5e-53 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e190Initial program 83.8%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.0
Applied rewrites73.0%
if -1.9999999999999999e-126 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e-53Initial program 81.4%
Taylor expanded in y around 0
associate-/l/N/A
lower-/.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6486.5
Applied rewrites86.5%
if 1.0000000000000001e190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 71.5%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6471.8
Applied rewrites71.8%
Final simplification80.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ (fma (* x y) 9.0 b) c) z)) (t_2 (* (* x 9.0) y)))
(if (<= t_2 (- INFINITY))
(* (/ (* 9.0 y) z) (/ x c))
(if (<= t_2 -1e+133)
(/ (fma -4.0 (* (* t z) a) (* (* x y) 9.0)) (* c z))
(if (<= t_2 -2e-126)
t_1
(if (<= t_2 5e-53)
(/ (/ (fma (* (* a t) -4.0) z b) z) c)
(if (<= t_2 1e+190) t_1 (* (/ x z) (* (/ y c) 9.0)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fma((x * y), 9.0, b) / c) / z;
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = ((9.0 * y) / z) * (x / c);
} else if (t_2 <= -1e+133) {
tmp = fma(-4.0, ((t * z) * a), ((x * y) * 9.0)) / (c * z);
} else if (t_2 <= -2e-126) {
tmp = t_1;
} else if (t_2 <= 5e-53) {
tmp = (fma(((a * t) * -4.0), z, b) / z) / c;
} else if (t_2 <= 1e+190) {
tmp = t_1;
} else {
tmp = (x / z) * ((y / c) * 9.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(fma(Float64(x * y), 9.0, b) / c) / z) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); elseif (t_2 <= -1e+133) tmp = Float64(fma(-4.0, Float64(Float64(t * z) * a), Float64(Float64(x * y) * 9.0)) / Float64(c * z)); elseif (t_2 <= -2e-126) tmp = t_1; elseif (t_2 <= 5e-53) tmp = Float64(Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / z) / c); elseif (t_2 <= 1e+190) tmp = t_1; else tmp = Float64(Float64(x / z) * Float64(Float64(y / c) * 9.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e+133], N[(N[(-4.0 * N[(N[(t * z), $MachinePrecision] * a), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-126], t$95$1, If[LessEqual[t$95$2, 5e-53], N[(N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 1e+190], t$95$1, N[(N[(x / z), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z}\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+133}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(x \cdot y\right) \cdot 9\right)}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{z}}{c}\\
\mathbf{elif}\;t\_2 \leq 10^{+190}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{c} \cdot 9\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 57.3%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6487.6
Applied rewrites87.6%
Applied rewrites93.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e133Initial program 87.5%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6487.4
Applied rewrites87.4%
if -1e133 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-126 or 5e-53 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e190Initial program 83.8%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.0
Applied rewrites73.0%
if -1.9999999999999999e-126 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e-53Initial program 81.4%
Taylor expanded in y around 0
associate-/l/N/A
lower-/.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6486.5
Applied rewrites86.5%
if 1.0000000000000001e190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 71.5%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6471.8
Applied rewrites71.8%
Final simplification80.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (/ (fma (* x y) 9.0 b) c) z)))
(if (<= t_1 (- INFINITY))
(* (/ (* 9.0 y) z) (/ x c))
(if (<= t_1 -2e-126)
t_2
(if (<= t_1 5e-53)
(/ (/ (fma (* (* a t) -4.0) z b) z) c)
(if (<= t_1 1e+190) t_2 (* (/ x z) (* (/ y c) 9.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = (fma((x * y), 9.0, b) / c) / z;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((9.0 * y) / z) * (x / c);
} else if (t_1 <= -2e-126) {
tmp = t_2;
} else if (t_1 <= 5e-53) {
tmp = (fma(((a * t) * -4.0), z, b) / z) / c;
} else if (t_1 <= 1e+190) {
tmp = t_2;
} else {
tmp = (x / z) * ((y / c) * 9.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(Float64(fma(Float64(x * y), 9.0, b) / c) / z) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); elseif (t_1 <= -2e-126) tmp = t_2; elseif (t_1 <= 5e-53) tmp = Float64(Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / z) / c); elseif (t_1 <= 1e+190) tmp = t_2; else tmp = Float64(Float64(x / z) * Float64(Float64(y / c) * 9.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-126], t$95$2, If[LessEqual[t$95$1, 5e-53], N[(N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 1e+190], t$95$2, N[(N[(x / z), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{z}}{c}\\
\mathbf{elif}\;t\_1 \leq 10^{+190}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{c} \cdot 9\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 57.3%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6487.6
Applied rewrites87.6%
Applied rewrites93.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-126 or 5e-53 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e190Initial program 84.3%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6471.2
Applied rewrites71.2%
if -1.9999999999999999e-126 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e-53Initial program 81.4%
Taylor expanded in y around 0
associate-/l/N/A
lower-/.f64N/A
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6486.5
Applied rewrites86.5%
if 1.0000000000000001e190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 71.5%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6471.8
Applied rewrites71.8%
Final simplification79.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (/ (fma (* x y) 9.0 b) c) z)))
(if (<= t_1 (- INFINITY))
(* (/ (* 9.0 y) z) (/ x c))
(if (<= t_1 -1e-126)
t_2
(if (<= t_1 5e-53)
(/ (fma (* (* a t) -4.0) z b) (* c z))
(if (<= t_1 1e+190) t_2 (* (/ x z) (* (/ y c) 9.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = (fma((x * y), 9.0, b) / c) / z;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((9.0 * y) / z) * (x / c);
} else if (t_1 <= -1e-126) {
tmp = t_2;
} else if (t_1 <= 5e-53) {
tmp = fma(((a * t) * -4.0), z, b) / (c * z);
} else if (t_1 <= 1e+190) {
tmp = t_2;
} else {
tmp = (x / z) * ((y / c) * 9.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(Float64(fma(Float64(x * y), 9.0, b) / c) / z) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)); elseif (t_1 <= -1e-126) tmp = t_2; elseif (t_1 <= 5e-53) tmp = Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / Float64(c * z)); elseif (t_1 <= 1e+190) tmp = t_2; else tmp = Float64(Float64(x / z) * Float64(Float64(y / c) * 9.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-126], t$95$2, If[LessEqual[t$95$1, 5e-53], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+190], t$95$2, N[(N[(x / z), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{c \cdot z}\\
\mathbf{elif}\;t\_1 \leq 10^{+190}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{c} \cdot 9\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 57.3%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6487.6
Applied rewrites87.6%
Applied rewrites93.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999995e-127 or 5e-53 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e190Initial program 83.5%
Taylor expanded in a around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.5
Applied rewrites70.5%
if -9.9999999999999995e-127 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e-53Initial program 82.1%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6484.7
Applied rewrites84.7%
if 1.0000000000000001e190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 71.5%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6471.8
Applied rewrites71.8%
Final simplification78.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)) (t_2 (* (/ (* 9.0 y) z) (/ x c))))
(if (<= t_1 -2e+192)
t_2
(if (<= t_1 5e-53)
(/ (fma (* (* a t) -4.0) z b) (* c z))
(if (<= t_1 2e+260) (/ (fma (* x y) 9.0 b) (* c z)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = ((9.0 * y) / z) * (x / c);
double tmp;
if (t_1 <= -2e+192) {
tmp = t_2;
} else if (t_1 <= 5e-53) {
tmp = fma(((a * t) * -4.0), z, b) / (c * z);
} else if (t_1 <= 2e+260) {
tmp = fma((x * y), 9.0, b) / (c * z);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(Float64(Float64(9.0 * y) / z) * Float64(x / c)) tmp = 0.0 if (t_1 <= -2e+192) tmp = t_2; elseif (t_1 <= 5e-53) tmp = Float64(fma(Float64(Float64(a * t) * -4.0), z, b) / Float64(c * z)); elseif (t_1 <= 2e+260) tmp = Float64(fma(Float64(x * y), 9.0, b) / Float64(c * z)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+192], t$95$2, If[LessEqual[t$95$1, 5e-53], N[(N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] * z + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+260], N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{9 \cdot y}{z} \cdot \frac{x}{c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+192}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-53}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(a \cdot t\right) \cdot -4, z, b\right)}{c \cdot z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+260}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000008e192 or 2.00000000000000013e260 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 65.7%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.7
Applied rewrites79.7%
Applied rewrites89.6%
if -2.00000000000000008e192 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e-53Initial program 84.1%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.1
Applied rewrites76.1%
if 5e-53 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000013e260Initial program 79.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
Final simplification75.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(fma (* (/ y (* c z)) 9.0) x (fma (* (/ a c) -4.0) t (/ b (* c z))))))
(if (<= z -3.9e+55)
t_1
(if (<= z 7.2e+30)
(/ (+ (- (* (* x 9.0) y) (* (* (* 4.0 z) t) a)) b) (* c z))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(((y / (c * z)) * 9.0), x, fma(((a / c) * -4.0), t, (b / (c * z))));
double tmp;
if (z <= -3.9e+55) {
tmp = t_1;
} else if (z <= 7.2e+30) {
tmp = ((((x * 9.0) * y) - (((4.0 * z) * t) * a)) + b) / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(Float64(y / Float64(c * z)) * 9.0), x, fma(Float64(Float64(a / c) * -4.0), t, Float64(b / Float64(c * z)))) tmp = 0.0 if (z <= -3.9e+55) tmp = t_1; elseif (z <= 7.2e+30) tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(4.0 * z) * t) * a)) + b) / Float64(c * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision] * x + N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] * t + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e+55], t$95$1, If[LessEqual[z, 7.2e+30], N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{c \cdot z} \cdot 9, x, \mathsf{fma}\left(\frac{a}{c} \cdot -4, t, \frac{b}{c \cdot z}\right)\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(4 \cdot z\right) \cdot t\right) \cdot a\right) + b}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.90000000000000027e55 or 7.2000000000000004e30 < z Initial program 59.8%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites83.1%
if -3.90000000000000027e55 < z < 7.2000000000000004e30Initial program 96.6%
Final simplification90.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -6e+149)
t_1
(if (<= b -1.3e-211)
(* (* a (/ t c)) -4.0)
(if (<= b 1.02e-255)
(* (* (/ y (* c z)) 9.0) x)
(if (<= b 9.8e-37) (* (* (/ a c) t) -4.0) 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 <= -6e+149) {
tmp = t_1;
} else if (b <= -1.3e-211) {
tmp = (a * (t / c)) * -4.0;
} else if (b <= 1.02e-255) {
tmp = ((y / (c * z)) * 9.0) * x;
} else if (b <= 9.8e-37) {
tmp = ((a / c) * t) * -4.0;
} 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 <= (-6d+149)) then
tmp = t_1
else if (b <= (-1.3d-211)) then
tmp = (a * (t / c)) * (-4.0d0)
else if (b <= 1.02d-255) then
tmp = ((y / (c * z)) * 9.0d0) * x
else if (b <= 9.8d-37) then
tmp = ((a / c) * t) * (-4.0d0)
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 <= -6e+149) {
tmp = t_1;
} else if (b <= -1.3e-211) {
tmp = (a * (t / c)) * -4.0;
} else if (b <= 1.02e-255) {
tmp = ((y / (c * z)) * 9.0) * x;
} else if (b <= 9.8e-37) {
tmp = ((a / c) * t) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -6e+149: tmp = t_1 elif b <= -1.3e-211: tmp = (a * (t / c)) * -4.0 elif b <= 1.02e-255: tmp = ((y / (c * z)) * 9.0) * x elif b <= 9.8e-37: tmp = ((a / c) * t) * -4.0 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 <= -6e+149) tmp = t_1; elseif (b <= -1.3e-211) tmp = Float64(Float64(a * Float64(t / c)) * -4.0); elseif (b <= 1.02e-255) tmp = Float64(Float64(Float64(y / Float64(c * z)) * 9.0) * x); elseif (b <= 9.8e-37) tmp = Float64(Float64(Float64(a / c) * t) * -4.0); 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 <= -6e+149) tmp = t_1; elseif (b <= -1.3e-211) tmp = (a * (t / c)) * -4.0; elseif (b <= 1.02e-255) tmp = ((y / (c * z)) * 9.0) * x; elseif (b <= 9.8e-37) tmp = ((a / c) * t) * -4.0; 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, -6e+149], t$95$1, If[LessEqual[b, -1.3e-211], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 1.02e-255], N[(N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 9.8e-37], N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -6 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.3 \cdot 10^{-211}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-255}:\\
\;\;\;\;\left(\frac{y}{c \cdot z} \cdot 9\right) \cdot x\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{-37}:\\
\;\;\;\;\left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.00000000000000007e149 or 9.80000000000000036e-37 < b Initial program 81.8%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6459.6
Applied rewrites59.6%
Applied rewrites67.6%
if -6.00000000000000007e149 < b < -1.3e-211Initial program 80.0%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites90.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6451.1
Applied rewrites51.1%
Applied rewrites48.5%
if -1.3e-211 < b < 1.02000000000000002e-255Initial program 77.4%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6460.0
Applied rewrites60.0%
Applied rewrites63.0%
if 1.02000000000000002e-255 < b < 9.80000000000000036e-37Initial program 78.7%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites83.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6458.7
Applied rewrites58.7%
Applied rewrites57.1%
Final simplification59.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (/ (* a t) c) -4.0)))
(if (<= z -3.4e-5)
t_1
(if (<= z 1.25e+147) (/ (fma (* x y) 9.0 b) (* c z)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a * t) / c) * -4.0;
double tmp;
if (z <= -3.4e-5) {
tmp = t_1;
} else if (z <= 1.25e+147) {
tmp = fma((x * y), 9.0, b) / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a * t) / c) * -4.0) tmp = 0.0 if (z <= -3.4e-5) tmp = t_1; elseif (z <= 1.25e+147) tmp = Float64(fma(Float64(x * y), 9.0, b) / Float64(c * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[z, -3.4e-5], t$95$1, If[LessEqual[z, 1.25e+147], N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a \cdot t}{c} \cdot -4\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+147}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4e-5 or 1.2500000000000001e147 < z Initial program 56.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6462.9
Applied rewrites62.9%
if -3.4e-5 < z < 1.2500000000000001e147Initial program 94.5%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.8
Applied rewrites77.8%
Final simplification72.1%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ (/ b c) z))) (if (<= b -6e+149) t_1 (if (<= b 9.8e-37) (* (/ (* a t) c) -4.0) 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 <= -6e+149) {
tmp = t_1;
} else if (b <= 9.8e-37) {
tmp = ((a * t) / c) * -4.0;
} 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 <= (-6d+149)) then
tmp = t_1
else if (b <= 9.8d-37) then
tmp = ((a * t) / c) * (-4.0d0)
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 <= -6e+149) {
tmp = t_1;
} else if (b <= 9.8e-37) {
tmp = ((a * t) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -6e+149: tmp = t_1 elif b <= 9.8e-37: tmp = ((a * t) / c) * -4.0 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 <= -6e+149) tmp = t_1; elseif (b <= 9.8e-37) tmp = Float64(Float64(Float64(a * t) / c) * -4.0); 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 <= -6e+149) tmp = t_1; elseif (b <= 9.8e-37) tmp = ((a * t) / c) * -4.0; 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, -6e+149], t$95$1, If[LessEqual[b, 9.8e-37], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -6 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{-37}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.00000000000000007e149 or 9.80000000000000036e-37 < b Initial program 81.8%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6459.6
Applied rewrites59.6%
Applied rewrites67.6%
if -6.00000000000000007e149 < b < 9.80000000000000036e-37Initial program 79.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Final simplification57.0%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* (/ a c) t) -4.0))) (if (<= t -0.00032) t_1 (if (<= t 1.95e-185) (/ b (* c z)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double tmp;
if (t <= -0.00032) {
tmp = t_1;
} else if (t <= 1.95e-185) {
tmp = b / (c * z);
} 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 = ((a / c) * t) * (-4.0d0)
if (t <= (-0.00032d0)) then
tmp = t_1
else if (t <= 1.95d-185) then
tmp = b / (c * z)
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 = ((a / c) * t) * -4.0;
double tmp;
if (t <= -0.00032) {
tmp = t_1;
} else if (t <= 1.95e-185) {
tmp = b / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((a / c) * t) * -4.0 tmp = 0 if t <= -0.00032: tmp = t_1 elif t <= 1.95e-185: tmp = b / (c * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a / c) * t) * -4.0) tmp = 0.0 if (t <= -0.00032) tmp = t_1; elseif (t <= 1.95e-185) tmp = Float64(b / Float64(c * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((a / c) * t) * -4.0; tmp = 0.0; if (t <= -0.00032) tmp = t_1; elseif (t <= 1.95e-185) tmp = b / (c * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[t, -0.00032], t$95$1, If[LessEqual[t, 1.95e-185], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{if}\;t \leq -0.00032:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-185}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.20000000000000026e-4 or 1.95e-185 < t Initial program 78.6%
Taylor expanded in b around 0
associate--l+N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites86.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites53.2%
if -3.20000000000000026e-4 < t < 1.95e-185Initial program 82.5%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6445.2
Applied rewrites45.2%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (/ b (* c z)))) (if (<= b -6.2e+149) t_1 (if (<= b 8e-40) (* (/ (* a t) c) -4.0) 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.2e+149) {
tmp = t_1;
} else if (b <= 8e-40) {
tmp = ((a * t) / c) * -4.0;
} 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.2d+149)) then
tmp = t_1
else if (b <= 8d-40) then
tmp = ((a * t) / c) * (-4.0d0)
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.2e+149) {
tmp = t_1;
} else if (b <= 8e-40) {
tmp = ((a * t) / c) * -4.0;
} 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.2e+149: tmp = t_1 elif b <= 8e-40: tmp = ((a * t) / c) * -4.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) tmp = 0.0 if (b <= -6.2e+149) tmp = t_1; elseif (b <= 8e-40) tmp = Float64(Float64(Float64(a * t) / c) * -4.0); 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.2e+149) tmp = t_1; elseif (b <= 8e-40) tmp = ((a * t) / c) * -4.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.2e+149], t$95$1, If[LessEqual[b, 8e-40], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
\mathbf{if}\;b \leq -6.2 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-40}:\\
\;\;\;\;\frac{a \cdot t}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.19999999999999974e149 or 7.9999999999999994e-40 < b Initial program 81.8%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6459.6
Applied rewrites59.6%
if -6.19999999999999974e149 < b < 7.9999999999999994e-40Initial program 79.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Final simplification54.2%
(FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
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 / (c * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
def code(x, y, z, t, a, b, c): return b / (c * z)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(c * z)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (c * z); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{c \cdot z}
\end{array}
Initial program 80.0%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
(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 2024277
(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)))