
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (+ (- (fma x y (* z (/ t 16.0))) (* a (/ b 4.0))) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right) + c
\end{array}
Initial program 99.3%
associate-+l-99.3%
*-commutative99.3%
associate-+l-99.3%
fma-define99.3%
*-commutative99.3%
associate-/l*99.3%
associate-/l*99.6%
Simplified99.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (* a (* b -0.25))))
(if (<= y -4.8e-17)
(* x y)
(if (<= y -1.8e-101)
t_1
(if (<= y -4.2e-245)
t_2
(if (<= y 1.65e-281)
c
(if (<= y 2.65e-229) t_2 (if (<= y 1.32e+108) t_1 (* x y)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = a * (b * -0.25);
double tmp;
if (y <= -4.8e-17) {
tmp = x * y;
} else if (y <= -1.8e-101) {
tmp = t_1;
} else if (y <= -4.2e-245) {
tmp = t_2;
} else if (y <= 1.65e-281) {
tmp = c;
} else if (y <= 2.65e-229) {
tmp = t_2;
} else if (y <= 1.32e+108) {
tmp = t_1;
} else {
tmp = x * y;
}
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 = 0.0625d0 * (z * t)
t_2 = a * (b * (-0.25d0))
if (y <= (-4.8d-17)) then
tmp = x * y
else if (y <= (-1.8d-101)) then
tmp = t_1
else if (y <= (-4.2d-245)) then
tmp = t_2
else if (y <= 1.65d-281) then
tmp = c
else if (y <= 2.65d-229) then
tmp = t_2
else if (y <= 1.32d+108) then
tmp = t_1
else
tmp = x * y
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 = 0.0625 * (z * t);
double t_2 = a * (b * -0.25);
double tmp;
if (y <= -4.8e-17) {
tmp = x * y;
} else if (y <= -1.8e-101) {
tmp = t_1;
} else if (y <= -4.2e-245) {
tmp = t_2;
} else if (y <= 1.65e-281) {
tmp = c;
} else if (y <= 2.65e-229) {
tmp = t_2;
} else if (y <= 1.32e+108) {
tmp = t_1;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = a * (b * -0.25) tmp = 0 if y <= -4.8e-17: tmp = x * y elif y <= -1.8e-101: tmp = t_1 elif y <= -4.2e-245: tmp = t_2 elif y <= 1.65e-281: tmp = c elif y <= 2.65e-229: tmp = t_2 elif y <= 1.32e+108: tmp = t_1 else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(a * Float64(b * -0.25)) tmp = 0.0 if (y <= -4.8e-17) tmp = Float64(x * y); elseif (y <= -1.8e-101) tmp = t_1; elseif (y <= -4.2e-245) tmp = t_2; elseif (y <= 1.65e-281) tmp = c; elseif (y <= 2.65e-229) tmp = t_2; elseif (y <= 1.32e+108) tmp = t_1; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = a * (b * -0.25); tmp = 0.0; if (y <= -4.8e-17) tmp = x * y; elseif (y <= -1.8e-101) tmp = t_1; elseif (y <= -4.2e-245) tmp = t_2; elseif (y <= 1.65e-281) tmp = c; elseif (y <= 2.65e-229) tmp = t_2; elseif (y <= 1.32e+108) tmp = t_1; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e-17], N[(x * y), $MachinePrecision], If[LessEqual[y, -1.8e-101], t$95$1, If[LessEqual[y, -4.2e-245], t$95$2, If[LessEqual[y, 1.65e-281], c, If[LessEqual[y, 2.65e-229], t$95$2, If[LessEqual[y, 1.32e+108], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{-17}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-245}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-281}:\\
\;\;\;\;c\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-229}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -4.79999999999999973e-17 or 1.32000000000000013e108 < y Initial program 99.1%
Taylor expanded in y around inf 99.1%
Taylor expanded in t around 0 77.1%
Taylor expanded in c around 0 64.6%
Taylor expanded in x around inf 45.6%
if -4.79999999999999973e-17 < y < -1.8e-101 or 2.64999999999999999e-229 < y < 1.32000000000000013e108Initial program 99.0%
Taylor expanded in y around inf 86.3%
Taylor expanded in t around inf 66.8%
Taylor expanded in t around inf 35.4%
if -1.8e-101 < y < -4.2000000000000002e-245 or 1.65e-281 < y < 2.64999999999999999e-229Initial program 100.0%
Taylor expanded in z around 0 70.4%
Taylor expanded in c around 0 48.5%
Taylor expanded in a around inf 48.4%
Taylor expanded in a around inf 42.4%
*-commutative42.4%
associate-*r*42.4%
*-commutative42.4%
Simplified42.4%
if -4.2000000000000002e-245 < y < 1.65e-281Initial program 100.0%
Taylor expanded in c around inf 38.4%
Final simplification41.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))))
(if (<= t -5.2e-139)
t_1
(if (<= t 7.2e-285)
c
(if (<= t 7.5e-170)
(* x y)
(if (<= t 2.3e-114) c (if (<= t 3.2e+55) (* x y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double tmp;
if (t <= -5.2e-139) {
tmp = t_1;
} else if (t <= 7.2e-285) {
tmp = c;
} else if (t <= 7.5e-170) {
tmp = x * y;
} else if (t <= 2.3e-114) {
tmp = c;
} else if (t <= 3.2e+55) {
tmp = x * y;
} 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 = 0.0625d0 * (z * t)
if (t <= (-5.2d-139)) then
tmp = t_1
else if (t <= 7.2d-285) then
tmp = c
else if (t <= 7.5d-170) then
tmp = x * y
else if (t <= 2.3d-114) then
tmp = c
else if (t <= 3.2d+55) then
tmp = x * y
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 = 0.0625 * (z * t);
double tmp;
if (t <= -5.2e-139) {
tmp = t_1;
} else if (t <= 7.2e-285) {
tmp = c;
} else if (t <= 7.5e-170) {
tmp = x * y;
} else if (t <= 2.3e-114) {
tmp = c;
} else if (t <= 3.2e+55) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) tmp = 0 if t <= -5.2e-139: tmp = t_1 elif t <= 7.2e-285: tmp = c elif t <= 7.5e-170: tmp = x * y elif t <= 2.3e-114: tmp = c elif t <= 3.2e+55: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (t <= -5.2e-139) tmp = t_1; elseif (t <= 7.2e-285) tmp = c; elseif (t <= 7.5e-170) tmp = Float64(x * y); elseif (t <= 2.3e-114) tmp = c; elseif (t <= 3.2e+55) tmp = Float64(x * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); tmp = 0.0; if (t <= -5.2e-139) tmp = t_1; elseif (t <= 7.2e-285) tmp = c; elseif (t <= 7.5e-170) tmp = x * y; elseif (t <= 2.3e-114) tmp = c; elseif (t <= 3.2e+55) tmp = x * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e-139], t$95$1, If[LessEqual[t, 7.2e-285], c, If[LessEqual[t, 7.5e-170], N[(x * y), $MachinePrecision], If[LessEqual[t, 2.3e-114], c, If[LessEqual[t, 3.2e+55], N[(x * y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-285}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-170}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-114}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+55}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.1999999999999996e-139 or 3.2000000000000003e55 < t Initial program 100.0%
Taylor expanded in y around inf 86.2%
Taylor expanded in t around inf 65.7%
Taylor expanded in t around inf 49.1%
if -5.1999999999999996e-139 < t < 7.20000000000000008e-285 or 7.4999999999999998e-170 < t < 2.2999999999999999e-114Initial program 100.0%
Taylor expanded in c around inf 41.4%
if 7.20000000000000008e-285 < t < 7.4999999999999998e-170 or 2.2999999999999999e-114 < t < 3.2000000000000003e55Initial program 97.2%
Taylor expanded in y around inf 88.8%
Taylor expanded in t around 0 84.3%
Taylor expanded in c around 0 62.3%
Taylor expanded in x around inf 38.2%
Final simplification44.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* 0.0625 (* z t)))))
(if (<= y -1.08e-16)
(* x y)
(if (<= y -3e-100)
t_1
(if (<= y 4.9e-235)
(+ c (* b (* a -0.25)))
(if (<= y 6.6e+106) t_1 (+ c (* x y))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (0.0625 * (z * t));
double tmp;
if (y <= -1.08e-16) {
tmp = x * y;
} else if (y <= -3e-100) {
tmp = t_1;
} else if (y <= 4.9e-235) {
tmp = c + (b * (a * -0.25));
} else if (y <= 6.6e+106) {
tmp = t_1;
} else {
tmp = c + (x * y);
}
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 = c + (0.0625d0 * (z * t))
if (y <= (-1.08d-16)) then
tmp = x * y
else if (y <= (-3d-100)) then
tmp = t_1
else if (y <= 4.9d-235) then
tmp = c + (b * (a * (-0.25d0)))
else if (y <= 6.6d+106) then
tmp = t_1
else
tmp = c + (x * y)
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 = c + (0.0625 * (z * t));
double tmp;
if (y <= -1.08e-16) {
tmp = x * y;
} else if (y <= -3e-100) {
tmp = t_1;
} else if (y <= 4.9e-235) {
tmp = c + (b * (a * -0.25));
} else if (y <= 6.6e+106) {
tmp = t_1;
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (0.0625 * (z * t)) tmp = 0 if y <= -1.08e-16: tmp = x * y elif y <= -3e-100: tmp = t_1 elif y <= 4.9e-235: tmp = c + (b * (a * -0.25)) elif y <= 6.6e+106: tmp = t_1 else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(0.0625 * Float64(z * t))) tmp = 0.0 if (y <= -1.08e-16) tmp = Float64(x * y); elseif (y <= -3e-100) tmp = t_1; elseif (y <= 4.9e-235) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (y <= 6.6e+106) tmp = t_1; else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (0.0625 * (z * t)); tmp = 0.0; if (y <= -1.08e-16) tmp = x * y; elseif (y <= -3e-100) tmp = t_1; elseif (y <= 4.9e-235) tmp = c + (b * (a * -0.25)); elseif (y <= 6.6e+106) tmp = t_1; else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.08e-16], N[(x * y), $MachinePrecision], If[LessEqual[y, -3e-100], t$95$1, If[LessEqual[y, 4.9e-235], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+106], t$95$1, N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;y \leq -1.08 \cdot 10^{-16}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-235}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if y < -1.08e-16Initial program 100.0%
Taylor expanded in y around inf 99.9%
Taylor expanded in t around 0 74.5%
Taylor expanded in c around 0 61.4%
Taylor expanded in x around inf 40.2%
if -1.08e-16 < y < -3.0000000000000001e-100 or 4.89999999999999965e-235 < y < 6.60000000000000015e106Initial program 99.0%
Taylor expanded in y around inf 86.7%
Taylor expanded in t around inf 66.5%
if -3.0000000000000001e-100 < y < 4.89999999999999965e-235Initial program 100.0%
Taylor expanded in a around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
*-commutative61.1%
Simplified61.1%
if 6.60000000000000015e106 < y Initial program 97.8%
Taylor expanded in y around inf 97.8%
Taylor expanded in x around inf 65.4%
Final simplification57.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* 0.0625 (* z t))))
(if (<= t -2e-8)
t_2
(if (<= t 3.8e-206)
t_1
(if (<= t 1.15e-185) (* a (* b -0.25)) (if (<= t 9e+58) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double tmp;
if (t <= -2e-8) {
tmp = t_2;
} else if (t <= 3.8e-206) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = a * (b * -0.25);
} else if (t <= 9e+58) {
tmp = t_1;
} 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 = c + (x * y)
t_2 = 0.0625d0 * (z * t)
if (t <= (-2d-8)) then
tmp = t_2
else if (t <= 3.8d-206) then
tmp = t_1
else if (t <= 1.15d-185) then
tmp = a * (b * (-0.25d0))
else if (t <= 9d+58) then
tmp = t_1
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 = c + (x * y);
double t_2 = 0.0625 * (z * t);
double tmp;
if (t <= -2e-8) {
tmp = t_2;
} else if (t <= 3.8e-206) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = a * (b * -0.25);
} else if (t <= 9e+58) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = 0.0625 * (z * t) tmp = 0 if t <= -2e-8: tmp = t_2 elif t <= 3.8e-206: tmp = t_1 elif t <= 1.15e-185: tmp = a * (b * -0.25) elif t <= 9e+58: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(0.0625 * Float64(z * t)) tmp = 0.0 if (t <= -2e-8) tmp = t_2; elseif (t <= 3.8e-206) tmp = t_1; elseif (t <= 1.15e-185) tmp = Float64(a * Float64(b * -0.25)); elseif (t <= 9e+58) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = 0.0625 * (z * t); tmp = 0.0; if (t <= -2e-8) tmp = t_2; elseif (t <= 3.8e-206) tmp = t_1; elseif (t <= 1.15e-185) tmp = a * (b * -0.25); elseif (t <= 9e+58) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-8], t$95$2, If[LessEqual[t, 3.8e-206], t$95$1, If[LessEqual[t, 1.15e-185], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+58], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{-8}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2e-8 or 8.9999999999999996e58 < t Initial program 100.0%
Taylor expanded in y around inf 85.2%
Taylor expanded in t around inf 70.9%
Taylor expanded in t around inf 56.9%
if -2e-8 < t < 3.80000000000000003e-206 or 1.15e-185 < t < 8.9999999999999996e58Initial program 98.6%
Taylor expanded in y around inf 91.0%
Taylor expanded in x around inf 65.8%
if 3.80000000000000003e-206 < t < 1.15e-185Initial program 100.0%
Taylor expanded in z around 0 89.9%
Taylor expanded in c around 0 78.9%
Taylor expanded in a around inf 68.6%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
Final simplification61.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25)))
(if (<= (* a b) -4e+197)
(- (* x y) t_1)
(if (<= (* a b) 1e+134)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(- (+ c (* x y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double tmp;
if ((a * b) <= -4e+197) {
tmp = (x * y) - t_1;
} else if ((a * b) <= 1e+134) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (x * y)) - 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 * b) * 0.25d0
if ((a * b) <= (-4d+197)) then
tmp = (x * y) - t_1
else if ((a * b) <= 1d+134) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = (c + (x * y)) - 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 * b) * 0.25;
double tmp;
if ((a * b) <= -4e+197) {
tmp = (x * y) - t_1;
} else if ((a * b) <= 1e+134) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (x * y)) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 tmp = 0 if (a * b) <= -4e+197: tmp = (x * y) - t_1 elif (a * b) <= 1e+134: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = (c + (x * y)) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) tmp = 0.0 if (Float64(a * b) <= -4e+197) tmp = Float64(Float64(x * y) - t_1); elseif (Float64(a * b) <= 1e+134) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(Float64(c + Float64(x * y)) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; tmp = 0.0; if ((a * b) <= -4e+197) tmp = (x * y) - t_1; elseif ((a * b) <= 1e+134) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = (c + (x * y)) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -4e+197], N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+134], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+197}:\\
\;\;\;\;x \cdot y - t\_1\\
\mathbf{elif}\;a \cdot b \leq 10^{+134}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -3.9999999999999998e197Initial program 100.0%
Taylor expanded in z around 0 86.6%
Taylor expanded in c around 0 86.6%
if -3.9999999999999998e197 < (*.f64 a b) < 9.99999999999999921e133Initial program 99.5%
Taylor expanded in a around 0 92.3%
if 9.99999999999999921e133 < (*.f64 a b) Initial program 97.4%
Taylor expanded in z around 0 92.0%
Final simplification91.8%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* a b) -4e+197)
(- (* x y) (* (* a b) 0.25))
(if (<= (* a b) 1e+134)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(* a (- (/ (* x y) a) (* b 0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a * b) <= -4e+197) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 1e+134) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = a * (((x * y) / a) - (b * 0.25));
}
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 ((a * b) <= (-4d+197)) then
tmp = (x * y) - ((a * b) * 0.25d0)
else if ((a * b) <= 1d+134) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = a * (((x * y) / a) - (b * 0.25d0))
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 ((a * b) <= -4e+197) {
tmp = (x * y) - ((a * b) * 0.25);
} else if ((a * b) <= 1e+134) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = a * (((x * y) / a) - (b * 0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (a * b) <= -4e+197: tmp = (x * y) - ((a * b) * 0.25) elif (a * b) <= 1e+134: tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = a * (((x * y) / a) - (b * 0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(a * b) <= -4e+197) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); elseif (Float64(a * b) <= 1e+134) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(a * Float64(Float64(Float64(x * y) / a) - Float64(b * 0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((a * b) <= -4e+197) tmp = (x * y) - ((a * b) * 0.25); elseif ((a * b) <= 1e+134) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = a * (((x * y) / a) - (b * 0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -4e+197], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+134], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision] - N[(b * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+197}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{elif}\;a \cdot b \leq 10^{+134}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{x \cdot y}{a} - b \cdot 0.25\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -3.9999999999999998e197Initial program 100.0%
Taylor expanded in z around 0 86.6%
Taylor expanded in c around 0 86.6%
if -3.9999999999999998e197 < (*.f64 a b) < 9.99999999999999921e133Initial program 99.5%
Taylor expanded in a around 0 92.3%
if 9.99999999999999921e133 < (*.f64 a b) Initial program 97.4%
Taylor expanded in z around 0 92.0%
Taylor expanded in c around 0 89.1%
Taylor expanded in a around inf 91.6%
Final simplification91.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 0.0625 (* z t))) (t_2 (+ (* x y) t_1)))
(if (<= y -7.5e-101)
t_2
(if (<= y 6e-235)
(+ c (* b (* a -0.25)))
(if (<= y 3.7e+101) (+ c t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 0.0625 * (z * t);
double t_2 = (x * y) + t_1;
double tmp;
if (y <= -7.5e-101) {
tmp = t_2;
} else if (y <= 6e-235) {
tmp = c + (b * (a * -0.25));
} else if (y <= 3.7e+101) {
tmp = c + t_1;
} 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 = 0.0625d0 * (z * t)
t_2 = (x * y) + t_1
if (y <= (-7.5d-101)) then
tmp = t_2
else if (y <= 6d-235) then
tmp = c + (b * (a * (-0.25d0)))
else if (y <= 3.7d+101) then
tmp = c + t_1
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 = 0.0625 * (z * t);
double t_2 = (x * y) + t_1;
double tmp;
if (y <= -7.5e-101) {
tmp = t_2;
} else if (y <= 6e-235) {
tmp = c + (b * (a * -0.25));
} else if (y <= 3.7e+101) {
tmp = c + t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 0.0625 * (z * t) t_2 = (x * y) + t_1 tmp = 0 if y <= -7.5e-101: tmp = t_2 elif y <= 6e-235: tmp = c + (b * (a * -0.25)) elif y <= 3.7e+101: tmp = c + t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(0.0625 * Float64(z * t)) t_2 = Float64(Float64(x * y) + t_1) tmp = 0.0 if (y <= -7.5e-101) tmp = t_2; elseif (y <= 6e-235) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif (y <= 3.7e+101) tmp = Float64(c + t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 0.0625 * (z * t); t_2 = (x * y) + t_1; tmp = 0.0; if (y <= -7.5e-101) tmp = t_2; elseif (y <= 6e-235) tmp = c + (b * (a * -0.25)); elseif (y <= 3.7e+101) tmp = c + t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[y, -7.5e-101], t$95$2, If[LessEqual[y, 6e-235], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+101], N[(c + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := x \cdot y + t\_1\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{-101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-235}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+101}:\\
\;\;\;\;c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7.5000000000000001e-101 or 3.6999999999999997e101 < y Initial program 99.3%
Taylor expanded in a around 0 81.5%
Taylor expanded in c around 0 66.7%
if -7.5000000000000001e-101 < y < 5.9999999999999997e-235Initial program 100.0%
Taylor expanded in a around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
*-commutative61.1%
Simplified61.1%
if 5.9999999999999997e-235 < y < 3.6999999999999997e101Initial program 98.6%
Taylor expanded in y around inf 84.4%
Taylor expanded in t around inf 64.5%
Final simplification65.0%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.4e+129) (not (<= z 4e-48))) (+ c (* 0.0625 (* z t))) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.4e+129) || !(z <= 4e-48)) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = c + (x * y);
}
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 ((z <= (-2.4d+129)) .or. (.not. (z <= 4d-48))) then
tmp = c + (0.0625d0 * (z * t))
else
tmp = c + (x * y)
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 ((z <= -2.4e+129) || !(z <= 4e-48)) {
tmp = c + (0.0625 * (z * t));
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.4e+129) or not (z <= 4e-48): tmp = c + (0.0625 * (z * t)) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.4e+129) || !(z <= 4e-48)) tmp = Float64(c + Float64(0.0625 * Float64(z * t))); else tmp = Float64(c + Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -2.4e+129) || ~((z <= 4e-48))) tmp = c + (0.0625 * (z * t)); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.4e+129], N[Not[LessEqual[z, 4e-48]], $MachinePrecision]], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+129} \lor \neg \left(z \leq 4 \cdot 10^{-48}\right):\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if z < -2.3999999999999999e129 or 3.9999999999999999e-48 < z Initial program 98.5%
Taylor expanded in y around inf 84.0%
Taylor expanded in t around inf 68.0%
if -2.3999999999999999e129 < z < 3.9999999999999999e-48Initial program 100.0%
Taylor expanded in y around inf 91.6%
Taylor expanded in x around inf 65.4%
Final simplification66.6%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
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 = c + (((x * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right)
\end{array}
Initial program 99.3%
Final simplification99.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= y -4.6e-44) (not (<= y 1.85e+101))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -4.6e-44) || !(y <= 1.85e+101)) {
tmp = x * y;
} else {
tmp = 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 ((y <= (-4.6d-44)) .or. (.not. (y <= 1.85d+101))) then
tmp = x * y
else
tmp = 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 ((y <= -4.6e-44) || !(y <= 1.85e+101)) {
tmp = x * y;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -4.6e-44) or not (y <= 1.85e+101): tmp = x * y else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -4.6e-44) || !(y <= 1.85e+101)) tmp = Float64(x * y); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((y <= -4.6e-44) || ~((y <= 1.85e+101))) tmp = x * y; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -4.6e-44], N[Not[LessEqual[y, 1.85e+101]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-44} \lor \neg \left(y \leq 1.85 \cdot 10^{+101}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if y < -4.59999999999999996e-44 or 1.8499999999999999e101 < y Initial program 99.2%
Taylor expanded in y around inf 98.5%
Taylor expanded in t around 0 74.0%
Taylor expanded in c around 0 60.8%
Taylor expanded in x around inf 42.2%
if -4.59999999999999996e-44 < y < 1.8499999999999999e101Initial program 99.3%
Taylor expanded in c around inf 33.1%
Final simplification37.9%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 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 = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 99.3%
Taylor expanded in c around inf 23.8%
herbie shell --seed 2024110
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))