
(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 14 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 t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
function code(x, y, z, t, a, b, c) return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0))))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Initial program 98.8%
associate-+l-98.8%
+-commutative98.8%
associate--l+98.8%
associate-*l/98.8%
*-commutative98.8%
fma-def99.2%
fma-neg99.6%
neg-sub099.6%
associate-+l-99.6%
neg-sub099.6%
+-commutative99.6%
unsub-neg99.6%
*-commutative99.6%
associate-*r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b c) :precision binary64 (+ (fma x y (/ z (/ 16.0 t))) (- c (/ a (/ 4.0 b)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(x, y, (z / (16.0 / t))) + (c - (a / (4.0 / b)));
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, Float64(z / Float64(16.0 / t))) + Float64(c - Float64(a / Float64(4.0 / b)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z / N[(16.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c - N[(a / N[(4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) + \left(c - \frac{a}{\frac{4}{b}}\right)
\end{array}
Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
neg-mul-198.8%
metadata-eval98.8%
metadata-eval98.8%
cancel-sign-sub-inv98.8%
fma-def99.2%
associate-/l*99.1%
metadata-eval99.1%
*-lft-identity99.1%
associate-/l*99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y)))
(t_2 (+ c (* t (* z 0.0625))))
(t_3 (- (* x y) (* (* b a) 0.25))))
(if (<= (* b a) -5e+158)
t_3
(if (<= (* b a) -1e-42)
t_2
(if (<= (* b a) -1e-197)
t_1
(if (<= (* b a) 1e-34)
t_2
(if (<= (* b a) 0.0005)
t_3
(if (<= (* b a) 5e+55)
t_1
(if (<= (* b a) 1e+109) t_2 t_3)))))))))
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 = c + (t * (z * 0.0625));
double t_3 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -5e+158) {
tmp = t_3;
} else if ((b * a) <= -1e-42) {
tmp = t_2;
} else if ((b * a) <= -1e-197) {
tmp = t_1;
} else if ((b * a) <= 1e-34) {
tmp = t_2;
} else if ((b * a) <= 0.0005) {
tmp = t_3;
} else if ((b * a) <= 5e+55) {
tmp = t_1;
} else if ((b * a) <= 1e+109) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: tmp
t_1 = c + (x * y)
t_2 = c + (t * (z * 0.0625d0))
t_3 = (x * y) - ((b * a) * 0.25d0)
if ((b * a) <= (-5d+158)) then
tmp = t_3
else if ((b * a) <= (-1d-42)) then
tmp = t_2
else if ((b * a) <= (-1d-197)) then
tmp = t_1
else if ((b * a) <= 1d-34) then
tmp = t_2
else if ((b * a) <= 0.0005d0) then
tmp = t_3
else if ((b * a) <= 5d+55) then
tmp = t_1
else if ((b * a) <= 1d+109) then
tmp = t_2
else
tmp = t_3
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 = c + (t * (z * 0.0625));
double t_3 = (x * y) - ((b * a) * 0.25);
double tmp;
if ((b * a) <= -5e+158) {
tmp = t_3;
} else if ((b * a) <= -1e-42) {
tmp = t_2;
} else if ((b * a) <= -1e-197) {
tmp = t_1;
} else if ((b * a) <= 1e-34) {
tmp = t_2;
} else if ((b * a) <= 0.0005) {
tmp = t_3;
} else if ((b * a) <= 5e+55) {
tmp = t_1;
} else if ((b * a) <= 1e+109) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = c + (t * (z * 0.0625)) t_3 = (x * y) - ((b * a) * 0.25) tmp = 0 if (b * a) <= -5e+158: tmp = t_3 elif (b * a) <= -1e-42: tmp = t_2 elif (b * a) <= -1e-197: tmp = t_1 elif (b * a) <= 1e-34: tmp = t_2 elif (b * a) <= 0.0005: tmp = t_3 elif (b * a) <= 5e+55: tmp = t_1 elif (b * a) <= 1e+109: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(c + Float64(t * Float64(z * 0.0625))) t_3 = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)) tmp = 0.0 if (Float64(b * a) <= -5e+158) tmp = t_3; elseif (Float64(b * a) <= -1e-42) tmp = t_2; elseif (Float64(b * a) <= -1e-197) tmp = t_1; elseif (Float64(b * a) <= 1e-34) tmp = t_2; elseif (Float64(b * a) <= 0.0005) tmp = t_3; elseif (Float64(b * a) <= 5e+55) tmp = t_1; elseif (Float64(b * a) <= 1e+109) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = c + (t * (z * 0.0625)); t_3 = (x * y) - ((b * a) * 0.25); tmp = 0.0; if ((b * a) <= -5e+158) tmp = t_3; elseif ((b * a) <= -1e-42) tmp = t_2; elseif ((b * a) <= -1e-197) tmp = t_1; elseif ((b * a) <= 1e-34) tmp = t_2; elseif ((b * a) <= 0.0005) tmp = t_3; elseif ((b * a) <= 5e+55) tmp = t_1; elseif ((b * a) <= 1e+109) tmp = t_2; else tmp = t_3; 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[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+158], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -1e-42], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -1e-197], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e-34], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 0.0005], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 5e+55], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 1e+109], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_3 := x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+158}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{-34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 0.0005:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 10^{+109}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -4.9999999999999996e158 or 9.99999999999999928e-35 < (*.f64 a b) < 5.0000000000000001e-4 or 9.99999999999999982e108 < (*.f64 a b) Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
neg-mul-199.0%
metadata-eval99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
fma-def99.0%
associate-/l*99.0%
metadata-eval99.0%
*-lft-identity99.0%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in z around 0 92.8%
Taylor expanded in c around 0 86.3%
if -4.9999999999999996e158 < (*.f64 a b) < -1.00000000000000004e-42 or -9.9999999999999999e-198 < (*.f64 a b) < 9.99999999999999928e-35 or 5.00000000000000046e55 < (*.f64 a b) < 9.99999999999999982e108Initial program 98.4%
associate-+l-98.4%
sub-neg98.4%
neg-mul-198.4%
metadata-eval98.4%
metadata-eval98.4%
cancel-sign-sub-inv98.4%
fma-def99.2%
associate-/l*99.1%
metadata-eval99.1%
*-lft-identity99.1%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in a around 0 93.7%
Taylor expanded in y around 0 69.9%
*-commutative69.9%
associate-*l*69.9%
Simplified69.9%
if -1.00000000000000004e-42 < (*.f64 a b) < -9.9999999999999999e-198 or 5.0000000000000001e-4 < (*.f64 a b) < 5.00000000000000046e55Initial program 100.0%
Taylor expanded in z around 0 86.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
fma-neg86.9%
distribute-rgt-neg-in86.9%
distribute-rgt-neg-in86.9%
metadata-eval86.9%
Simplified86.9%
Taylor expanded in y around inf 83.0%
Final simplification77.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* z 0.0625))) (t_2 (* (* b a) -0.25)))
(if (<= (* b a) -7.2e+139)
t_2
(if (<= (* b a) -4.4e-48)
t_1
(if (<= (* b a) -1.12e-133)
(* x y)
(if (<= (* b a) 2.35e-179)
c
(if (<= (* b a) 9.5e+60)
(* x y)
(if (<= (* b a) 2.7e+108) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (z * 0.0625);
double t_2 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -7.2e+139) {
tmp = t_2;
} else if ((b * a) <= -4.4e-48) {
tmp = t_1;
} else if ((b * a) <= -1.12e-133) {
tmp = x * y;
} else if ((b * a) <= 2.35e-179) {
tmp = c;
} else if ((b * a) <= 9.5e+60) {
tmp = x * y;
} else if ((b * a) <= 2.7e+108) {
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 = t * (z * 0.0625d0)
t_2 = (b * a) * (-0.25d0)
if ((b * a) <= (-7.2d+139)) then
tmp = t_2
else if ((b * a) <= (-4.4d-48)) then
tmp = t_1
else if ((b * a) <= (-1.12d-133)) then
tmp = x * y
else if ((b * a) <= 2.35d-179) then
tmp = c
else if ((b * a) <= 9.5d+60) then
tmp = x * y
else if ((b * a) <= 2.7d+108) 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 = t * (z * 0.0625);
double t_2 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -7.2e+139) {
tmp = t_2;
} else if ((b * a) <= -4.4e-48) {
tmp = t_1;
} else if ((b * a) <= -1.12e-133) {
tmp = x * y;
} else if ((b * a) <= 2.35e-179) {
tmp = c;
} else if ((b * a) <= 9.5e+60) {
tmp = x * y;
} else if ((b * a) <= 2.7e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (z * 0.0625) t_2 = (b * a) * -0.25 tmp = 0 if (b * a) <= -7.2e+139: tmp = t_2 elif (b * a) <= -4.4e-48: tmp = t_1 elif (b * a) <= -1.12e-133: tmp = x * y elif (b * a) <= 2.35e-179: tmp = c elif (b * a) <= 9.5e+60: tmp = x * y elif (b * a) <= 2.7e+108: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(z * 0.0625)) t_2 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -7.2e+139) tmp = t_2; elseif (Float64(b * a) <= -4.4e-48) tmp = t_1; elseif (Float64(b * a) <= -1.12e-133) tmp = Float64(x * y); elseif (Float64(b * a) <= 2.35e-179) tmp = c; elseif (Float64(b * a) <= 9.5e+60) tmp = Float64(x * y); elseif (Float64(b * a) <= 2.7e+108) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = t * (z * 0.0625); t_2 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -7.2e+139) tmp = t_2; elseif ((b * a) <= -4.4e-48) tmp = t_1; elseif ((b * a) <= -1.12e-133) tmp = x * y; elseif ((b * a) <= 2.35e-179) tmp = c; elseif ((b * a) <= 9.5e+60) tmp = x * y; elseif ((b * a) <= 2.7e+108) 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[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -7.2e+139], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -4.4e-48], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -1.12e-133], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2.35e-179], c, If[LessEqual[N[(b * a), $MachinePrecision], 9.5e+60], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2.7e+108], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 0.0625\right)\\
t_2 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -7.2 \cdot 10^{+139}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -4.4 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -1.12 \cdot 10^{-133}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq 2.35 \cdot 10^{-179}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq 9.5 \cdot 10^{+60}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq 2.7 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -7.19999999999999971e139 or 2.7e108 < (*.f64 a b) Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
neg-mul-199.0%
metadata-eval99.0%
metadata-eval99.0%
cancel-sign-sub-inv99.0%
fma-def99.0%
associate-/l*99.0%
metadata-eval99.0%
*-lft-identity99.0%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around 0 88.5%
Taylor expanded in c around 0 80.3%
Taylor expanded in t around 0 74.1%
if -7.19999999999999971e139 < (*.f64 a b) < -4.40000000000000025e-48 or 9.49999999999999988e60 < (*.f64 a b) < 2.7e108Initial program 98.0%
associate-+l-98.0%
sub-neg98.0%
neg-mul-198.0%
metadata-eval98.0%
metadata-eval98.0%
cancel-sign-sub-inv98.0%
fma-def100.0%
associate-/l*99.8%
metadata-eval99.8%
*-lft-identity99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.3%
Taylor expanded in y around 0 69.6%
*-commutative69.6%
associate-*l*69.6%
Simplified69.6%
Taylor expanded in c around 0 51.0%
*-commutative51.0%
associate-*r*51.0%
*-commutative51.0%
Simplified51.0%
if -4.40000000000000025e-48 < (*.f64 a b) < -1.1199999999999999e-133 or 2.3500000000000001e-179 < (*.f64 a b) < 9.49999999999999988e60Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 78.7%
Taylor expanded in c around 0 60.9%
Taylor expanded in y around inf 55.3%
if -1.1199999999999999e-133 < (*.f64 a b) < 2.3500000000000001e-179Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
neg-mul-198.3%
metadata-eval98.3%
metadata-eval98.3%
cancel-sign-sub-inv98.3%
fma-def98.3%
associate-/l*98.2%
metadata-eval98.2%
*-lft-identity98.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in c around inf 39.7%
Final simplification58.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))) (t_2 (* t (* z 0.0625))) (t_3 (* (* b a) -0.25)))
(if (<= (* b a) -3.2e+250)
t_3
(if (<= (* b a) -2.75e+140)
t_1
(if (<= (* b a) -9e+74)
t_2
(if (<= (* b a) 7e+62)
t_1
(if (<= (* b a) 3.4e+100)
t_2
(if (<= (* b a) 7.6e+122) t_1 t_3))))))))
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 = t * (z * 0.0625);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -3.2e+250) {
tmp = t_3;
} else if ((b * a) <= -2.75e+140) {
tmp = t_1;
} else if ((b * a) <= -9e+74) {
tmp = t_2;
} else if ((b * a) <= 7e+62) {
tmp = t_1;
} else if ((b * a) <= 3.4e+100) {
tmp = t_2;
} else if ((b * a) <= 7.6e+122) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: tmp
t_1 = c + (x * y)
t_2 = t * (z * 0.0625d0)
t_3 = (b * a) * (-0.25d0)
if ((b * a) <= (-3.2d+250)) then
tmp = t_3
else if ((b * a) <= (-2.75d+140)) then
tmp = t_1
else if ((b * a) <= (-9d+74)) then
tmp = t_2
else if ((b * a) <= 7d+62) then
tmp = t_1
else if ((b * a) <= 3.4d+100) then
tmp = t_2
else if ((b * a) <= 7.6d+122) then
tmp = t_1
else
tmp = t_3
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 = t * (z * 0.0625);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -3.2e+250) {
tmp = t_3;
} else if ((b * a) <= -2.75e+140) {
tmp = t_1;
} else if ((b * a) <= -9e+74) {
tmp = t_2;
} else if ((b * a) <= 7e+62) {
tmp = t_1;
} else if ((b * a) <= 3.4e+100) {
tmp = t_2;
} else if ((b * a) <= 7.6e+122) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) t_2 = t * (z * 0.0625) t_3 = (b * a) * -0.25 tmp = 0 if (b * a) <= -3.2e+250: tmp = t_3 elif (b * a) <= -2.75e+140: tmp = t_1 elif (b * a) <= -9e+74: tmp = t_2 elif (b * a) <= 7e+62: tmp = t_1 elif (b * a) <= 3.4e+100: tmp = t_2 elif (b * a) <= 7.6e+122: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) t_2 = Float64(t * Float64(z * 0.0625)) t_3 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -3.2e+250) tmp = t_3; elseif (Float64(b * a) <= -2.75e+140) tmp = t_1; elseif (Float64(b * a) <= -9e+74) tmp = t_2; elseif (Float64(b * a) <= 7e+62) tmp = t_1; elseif (Float64(b * a) <= 3.4e+100) tmp = t_2; elseif (Float64(b * a) <= 7.6e+122) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); t_2 = t * (z * 0.0625); t_3 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -3.2e+250) tmp = t_3; elseif ((b * a) <= -2.75e+140) tmp = t_1; elseif ((b * a) <= -9e+74) tmp = t_2; elseif ((b * a) <= 7e+62) tmp = t_1; elseif ((b * a) <= 3.4e+100) tmp = t_2; elseif ((b * a) <= 7.6e+122) tmp = t_1; else tmp = t_3; 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[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -3.2e+250], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -2.75e+140], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -9e+74], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 7e+62], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 3.4e+100], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 7.6e+122], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := t \cdot \left(z \cdot 0.0625\right)\\
t_3 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -3.2 \cdot 10^{+250}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -2.75 \cdot 10^{+140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -9 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 7 \cdot 10^{+62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 3.4 \cdot 10^{+100}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 7.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -3.1999999999999997e250 or 7.5999999999999996e122 < (*.f64 a b) Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
neg-mul-198.7%
metadata-eval98.7%
metadata-eval98.7%
cancel-sign-sub-inv98.7%
fma-def98.7%
associate-/l*98.7%
metadata-eval98.7%
*-lft-identity98.7%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in x around 0 94.3%
Taylor expanded in c around 0 90.4%
Taylor expanded in t around 0 86.4%
if -3.1999999999999997e250 < (*.f64 a b) < -2.75e140 or -8.9999999999999999e74 < (*.f64 a b) < 6.99999999999999967e62 or 3.39999999999999994e100 < (*.f64 a b) < 7.5999999999999996e122Initial program 98.8%
Taylor expanded in z around 0 72.1%
associate-*r*72.1%
*-commutative72.1%
*-commutative72.1%
fma-neg72.1%
distribute-rgt-neg-in72.1%
distribute-rgt-neg-in72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in y around inf 67.0%
if -2.75e140 < (*.f64 a b) < -8.9999999999999999e74 or 6.99999999999999967e62 < (*.f64 a b) < 3.39999999999999994e100Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
neg-mul-199.9%
metadata-eval99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
fma-def99.9%
associate-/l*99.7%
metadata-eval99.7%
*-lft-identity99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.1%
Taylor expanded in y around 0 74.6%
*-commutative74.6%
associate-*l*74.6%
Simplified74.6%
Taylor expanded in c around 0 74.7%
*-commutative74.7%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
Final simplification73.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625))))
(t_2 (+ c (* x y)))
(t_3 (* (* b a) -0.25)))
(if (<= (* b a) -3.2e+250)
t_3
(if (<= (* b a) -2e-43)
t_1
(if (<= (* b a) 2.3e+62)
t_2
(if (<= (* b a) 1.9e+120) t_1 (if (<= (* b a) 7.6e+122) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (t * (z * 0.0625));
double t_2 = c + (x * y);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -3.2e+250) {
tmp = t_3;
} else if ((b * a) <= -2e-43) {
tmp = t_1;
} else if ((b * a) <= 2.3e+62) {
tmp = t_2;
} else if ((b * a) <= 1.9e+120) {
tmp = t_1;
} else if ((b * a) <= 7.6e+122) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: tmp
t_1 = c + (t * (z * 0.0625d0))
t_2 = c + (x * y)
t_3 = (b * a) * (-0.25d0)
if ((b * a) <= (-3.2d+250)) then
tmp = t_3
else if ((b * a) <= (-2d-43)) then
tmp = t_1
else if ((b * a) <= 2.3d+62) then
tmp = t_2
else if ((b * a) <= 1.9d+120) then
tmp = t_1
else if ((b * a) <= 7.6d+122) then
tmp = t_2
else
tmp = t_3
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 + (t * (z * 0.0625));
double t_2 = c + (x * y);
double t_3 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -3.2e+250) {
tmp = t_3;
} else if ((b * a) <= -2e-43) {
tmp = t_1;
} else if ((b * a) <= 2.3e+62) {
tmp = t_2;
} else if ((b * a) <= 1.9e+120) {
tmp = t_1;
} else if ((b * a) <= 7.6e+122) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (t * (z * 0.0625)) t_2 = c + (x * y) t_3 = (b * a) * -0.25 tmp = 0 if (b * a) <= -3.2e+250: tmp = t_3 elif (b * a) <= -2e-43: tmp = t_1 elif (b * a) <= 2.3e+62: tmp = t_2 elif (b * a) <= 1.9e+120: tmp = t_1 elif (b * a) <= 7.6e+122: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(t * Float64(z * 0.0625))) t_2 = Float64(c + Float64(x * y)) t_3 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -3.2e+250) tmp = t_3; elseif (Float64(b * a) <= -2e-43) tmp = t_1; elseif (Float64(b * a) <= 2.3e+62) tmp = t_2; elseif (Float64(b * a) <= 1.9e+120) tmp = t_1; elseif (Float64(b * a) <= 7.6e+122) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (t * (z * 0.0625)); t_2 = c + (x * y); t_3 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -3.2e+250) tmp = t_3; elseif ((b * a) <= -2e-43) tmp = t_1; elseif ((b * a) <= 2.3e+62) tmp = t_2; elseif ((b * a) <= 1.9e+120) tmp = t_1; elseif ((b * a) <= 7.6e+122) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -3.2e+250], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -2e-43], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 2.3e+62], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 1.9e+120], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 7.6e+122], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_2 := c + x \cdot y\\
t_3 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -3.2 \cdot 10^{+250}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 2.3 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq 1.9 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 7.6 \cdot 10^{+122}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if (*.f64 a b) < -3.1999999999999997e250 or 7.5999999999999996e122 < (*.f64 a b) Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
neg-mul-198.7%
metadata-eval98.7%
metadata-eval98.7%
cancel-sign-sub-inv98.7%
fma-def98.7%
associate-/l*98.7%
metadata-eval98.7%
*-lft-identity98.7%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in x around 0 94.3%
Taylor expanded in c around 0 90.4%
Taylor expanded in t around 0 86.4%
if -3.1999999999999997e250 < (*.f64 a b) < -2.00000000000000015e-43 or 2.29999999999999984e62 < (*.f64 a b) < 1.8999999999999999e120Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
neg-mul-198.5%
metadata-eval98.5%
metadata-eval98.5%
cancel-sign-sub-inv98.5%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.3%
Taylor expanded in y around 0 62.1%
*-commutative62.1%
associate-*l*62.1%
Simplified62.1%
if -2.00000000000000015e-43 < (*.f64 a b) < 2.29999999999999984e62 or 1.8999999999999999e120 < (*.f64 a b) < 7.5999999999999996e122Initial program 99.1%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
*-commutative73.6%
*-commutative73.6%
fma-neg73.6%
distribute-rgt-neg-in73.6%
distribute-rgt-neg-in73.6%
metadata-eval73.6%
Simplified73.6%
Taylor expanded in y around inf 70.8%
Final simplification73.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* t (* z 0.0625)))) (t_2 (+ c (* b (* a -0.25)))))
(if (<= (* b a) -1e+141)
t_2
(if (<= (* b a) -1e-42)
t_1
(if (<= (* b a) 5e+55)
(+ c (* x y))
(if (<= (* b a) 1e+106) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (t * (z * 0.0625));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -1e+141) {
tmp = t_2;
} else if ((b * a) <= -1e-42) {
tmp = t_1;
} else if ((b * a) <= 5e+55) {
tmp = c + (x * y);
} else if ((b * a) <= 1e+106) {
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 + (t * (z * 0.0625d0))
t_2 = c + (b * (a * (-0.25d0)))
if ((b * a) <= (-1d+141)) then
tmp = t_2
else if ((b * a) <= (-1d-42)) then
tmp = t_1
else if ((b * a) <= 5d+55) then
tmp = c + (x * y)
else if ((b * a) <= 1d+106) 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 + (t * (z * 0.0625));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((b * a) <= -1e+141) {
tmp = t_2;
} else if ((b * a) <= -1e-42) {
tmp = t_1;
} else if ((b * a) <= 5e+55) {
tmp = c + (x * y);
} else if ((b * a) <= 1e+106) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (t * (z * 0.0625)) t_2 = c + (b * (a * -0.25)) tmp = 0 if (b * a) <= -1e+141: tmp = t_2 elif (b * a) <= -1e-42: tmp = t_1 elif (b * a) <= 5e+55: tmp = c + (x * y) elif (b * a) <= 1e+106: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(t * Float64(z * 0.0625))) t_2 = Float64(c + Float64(b * Float64(a * -0.25))) tmp = 0.0 if (Float64(b * a) <= -1e+141) tmp = t_2; elseif (Float64(b * a) <= -1e-42) tmp = t_1; elseif (Float64(b * a) <= 5e+55) tmp = Float64(c + Float64(x * y)); elseif (Float64(b * a) <= 1e+106) 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 + (t * (z * 0.0625)); t_2 = c + (b * (a * -0.25)); tmp = 0.0; if ((b * a) <= -1e+141) tmp = t_2; elseif ((b * a) <= -1e-42) tmp = t_1; elseif ((b * a) <= 5e+55) tmp = c + (x * y); elseif ((b * a) <= 1e+106) 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[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+141], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -1e-42], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5e+55], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e+106], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + t \cdot \left(z \cdot 0.0625\right)\\
t_2 := c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+55}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;b \cdot a \leq 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000002e141 or 1.00000000000000009e106 < (*.f64 a b) Initial program 99.0%
Taylor expanded in a around inf 82.3%
*-commutative82.3%
*-commutative82.3%
associate-*r*82.3%
Simplified82.3%
if -1.00000000000000002e141 < (*.f64 a b) < -1.00000000000000004e-42 or 5.00000000000000046e55 < (*.f64 a b) < 1.00000000000000009e106Initial program 98.0%
associate-+l-98.0%
sub-neg98.0%
neg-mul-198.0%
metadata-eval98.0%
metadata-eval98.0%
cancel-sign-sub-inv98.0%
fma-def100.0%
associate-/l*99.8%
metadata-eval99.8%
*-lft-identity99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.3%
Taylor expanded in y around 0 69.6%
*-commutative69.6%
associate-*l*69.6%
Simplified69.6%
if -1.00000000000000004e-42 < (*.f64 a b) < 5.00000000000000046e55Initial program 99.1%
Taylor expanded in z around 0 73.1%
associate-*r*73.1%
*-commutative73.1%
*-commutative73.1%
fma-neg73.1%
distribute-rgt-neg-in73.1%
distribute-rgt-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in y around inf 70.2%
Final simplification74.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) -0.25)))
(if (<= (* b a) -4.2e+196)
t_1
(if (<= (* b a) -2.55e-105)
(* x y)
(if (<= (* b a) -4e-297) c (if (<= (* b a) 9.5e+58) (* x y) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -4.2e+196) {
tmp = t_1;
} else if ((b * a) <= -2.55e-105) {
tmp = x * y;
} else if ((b * a) <= -4e-297) {
tmp = c;
} else if ((b * a) <= 9.5e+58) {
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 = (b * a) * (-0.25d0)
if ((b * a) <= (-4.2d+196)) then
tmp = t_1
else if ((b * a) <= (-2.55d-105)) then
tmp = x * y
else if ((b * a) <= (-4d-297)) then
tmp = c
else if ((b * a) <= 9.5d+58) 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 = (b * a) * -0.25;
double tmp;
if ((b * a) <= -4.2e+196) {
tmp = t_1;
} else if ((b * a) <= -2.55e-105) {
tmp = x * y;
} else if ((b * a) <= -4e-297) {
tmp = c;
} else if ((b * a) <= 9.5e+58) {
tmp = x * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * -0.25 tmp = 0 if (b * a) <= -4.2e+196: tmp = t_1 elif (b * a) <= -2.55e-105: tmp = x * y elif (b * a) <= -4e-297: tmp = c elif (b * a) <= 9.5e+58: tmp = x * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * -0.25) tmp = 0.0 if (Float64(b * a) <= -4.2e+196) tmp = t_1; elseif (Float64(b * a) <= -2.55e-105) tmp = Float64(x * y); elseif (Float64(b * a) <= -4e-297) tmp = c; elseif (Float64(b * a) <= 9.5e+58) 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 = (b * a) * -0.25; tmp = 0.0; if ((b * a) <= -4.2e+196) tmp = t_1; elseif ((b * a) <= -2.55e-105) tmp = x * y; elseif ((b * a) <= -4e-297) tmp = c; elseif ((b * a) <= 9.5e+58) 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[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -4.2e+196], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -2.55e-105], N[(x * y), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], -4e-297], c, If[LessEqual[N[(b * a), $MachinePrecision], 9.5e+58], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot -0.25\\
\mathbf{if}\;b \cdot a \leq -4.2 \cdot 10^{+196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot a \leq -2.55 \cdot 10^{-105}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;b \cdot a \leq -4 \cdot 10^{-297}:\\
\;\;\;\;c\\
\mathbf{elif}\;b \cdot a \leq 9.5 \cdot 10^{+58}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.20000000000000029e196 or 9.5000000000000002e58 < (*.f64 a b) Initial program 97.8%
associate-+l-97.8%
sub-neg97.8%
neg-mul-197.8%
metadata-eval97.8%
metadata-eval97.8%
cancel-sign-sub-inv97.8%
fma-def98.9%
associate-/l*98.9%
metadata-eval98.9%
*-lft-identity98.9%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around 0 92.3%
Taylor expanded in c around 0 84.9%
Taylor expanded in t around 0 74.4%
if -4.20000000000000029e196 < (*.f64 a b) < -2.55000000000000004e-105 or -4.00000000000000016e-297 < (*.f64 a b) < 9.5000000000000002e58Initial program 99.3%
associate-+l-99.3%
sub-neg99.3%
neg-mul-199.3%
metadata-eval99.3%
metadata-eval99.3%
cancel-sign-sub-inv99.3%
fma-def99.3%
associate-/l*99.2%
metadata-eval99.2%
*-lft-identity99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around 0 68.2%
Taylor expanded in c around 0 45.7%
Taylor expanded in y around inf 40.2%
if -2.55000000000000004e-105 < (*.f64 a b) < -4.00000000000000016e-297Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in c around inf 54.6%
Final simplification53.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* b a) -1e+141) (not (<= (* b a) 4e+100))) (- (+ c (* x y)) (* (* b a) 0.25)) (+ c (+ (* x y) (* (* t z) 0.0625)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -1e+141) || !((b * a) <= 4e+100)) {
tmp = (c + (x * y)) - ((b * a) * 0.25);
} else {
tmp = c + ((x * y) + ((t * z) * 0.0625));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (((b * a) <= (-1d+141)) .or. (.not. ((b * a) <= 4d+100))) then
tmp = (c + (x * y)) - ((b * a) * 0.25d0)
else
tmp = c + ((x * y) + ((t * z) * 0.0625d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((b * a) <= -1e+141) || !((b * a) <= 4e+100)) {
tmp = (c + (x * y)) - ((b * a) * 0.25);
} else {
tmp = c + ((x * y) + ((t * z) * 0.0625));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((b * a) <= -1e+141) or not ((b * a) <= 4e+100): tmp = (c + (x * y)) - ((b * a) * 0.25) else: tmp = c + ((x * y) + ((t * z) * 0.0625)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(b * a) <= -1e+141) || !(Float64(b * a) <= 4e+100)) tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(b * a) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(Float64(t * z) * 0.0625))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((b * a) <= -1e+141) || ~(((b * a) <= 4e+100))) tmp = (c + (x * y)) - ((b * a) * 0.25); else tmp = c + ((x * y) + ((t * z) * 0.0625)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(b * a), $MachinePrecision], -1e+141], N[Not[LessEqual[N[(b * a), $MachinePrecision], 4e+100]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(N[(t * z), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+141} \lor \neg \left(b \cdot a \leq 4 \cdot 10^{+100}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(b \cdot a\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + \left(t \cdot z\right) \cdot 0.0625\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.00000000000000002e141 or 4.00000000000000006e100 < (*.f64 a b) Initial program 98.0%
associate-+l-98.0%
sub-neg98.0%
neg-mul-198.0%
metadata-eval98.0%
metadata-eval98.0%
cancel-sign-sub-inv98.0%
fma-def99.0%
associate-/l*99.0%
metadata-eval99.0%
*-lft-identity99.0%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in z around 0 92.0%
if -1.00000000000000002e141 < (*.f64 a b) < 4.00000000000000006e100Initial program 99.3%
associate-+l-99.3%
sub-neg99.3%
neg-mul-199.3%
metadata-eval99.3%
metadata-eval99.3%
cancel-sign-sub-inv99.3%
fma-def99.3%
associate-/l*99.2%
metadata-eval99.2%
*-lft-identity99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in a around 0 94.1%
Final simplification93.3%
(FPCore (x y z t a b c)
:precision binary64
(if (<= (* b a) -4e+252)
(* (* b a) -0.25)
(if (<= (* b a) 2e+143)
(+ c (+ (* x y) (* (* t z) 0.0625)))
(- (* x y) (* (* b a) 0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b * a) <= -4e+252) {
tmp = (b * a) * -0.25;
} else if ((b * a) <= 2e+143) {
tmp = c + ((x * y) + ((t * z) * 0.0625));
} else {
tmp = (x * y) - ((b * a) * 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 ((b * a) <= (-4d+252)) then
tmp = (b * a) * (-0.25d0)
else if ((b * a) <= 2d+143) then
tmp = c + ((x * y) + ((t * z) * 0.0625d0))
else
tmp = (x * y) - ((b * a) * 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 ((b * a) <= -4e+252) {
tmp = (b * a) * -0.25;
} else if ((b * a) <= 2e+143) {
tmp = c + ((x * y) + ((t * z) * 0.0625));
} else {
tmp = (x * y) - ((b * a) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (b * a) <= -4e+252: tmp = (b * a) * -0.25 elif (b * a) <= 2e+143: tmp = c + ((x * y) + ((t * z) * 0.0625)) else: tmp = (x * y) - ((b * a) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(b * a) <= -4e+252) tmp = Float64(Float64(b * a) * -0.25); elseif (Float64(b * a) <= 2e+143) tmp = Float64(c + Float64(Float64(x * y) + Float64(Float64(t * z) * 0.0625))); else tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((b * a) <= -4e+252) tmp = (b * a) * -0.25; elseif ((b * a) <= 2e+143) tmp = c + ((x * y) + ((t * z) * 0.0625)); else tmp = (x * y) - ((b * a) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(b * a), $MachinePrecision], -4e+252], N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+143], N[(c + N[(N[(x * y), $MachinePrecision] + N[(N[(t * z), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -4 \cdot 10^{+252}:\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+143}:\\
\;\;\;\;c + \left(x \cdot y + \left(t \cdot z\right) \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -4.0000000000000004e252Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*100.0%
metadata-eval100.0%
*-lft-identity100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 100.0%
Taylor expanded in c around 0 100.0%
Taylor expanded in t around 0 97.1%
if -4.0000000000000004e252 < (*.f64 a b) < 2e143Initial program 98.9%
associate-+l-98.9%
sub-neg98.9%
neg-mul-198.9%
metadata-eval98.9%
metadata-eval98.9%
cancel-sign-sub-inv98.9%
fma-def99.4%
associate-/l*99.4%
metadata-eval99.4%
*-lft-identity99.4%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in a around 0 90.7%
if 2e143 < (*.f64 a b) Initial program 97.5%
associate-+l-97.5%
sub-neg97.5%
neg-mul-197.5%
metadata-eval97.5%
metadata-eval97.5%
cancel-sign-sub-inv97.5%
fma-def97.5%
associate-/l*97.5%
metadata-eval97.5%
*-lft-identity97.5%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around 0 97.0%
Taylor expanded in c around 0 89.7%
Final simplification91.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* b a) 0.25)) (t_2 (* (* t z) 0.0625)))
(if (<= (* b a) -4e+252)
(- t_2 t_1)
(if (<= (* b a) 2e+143) (+ c (+ (* x y) t_2)) (- (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b * a) * 0.25;
double t_2 = (t * z) * 0.0625;
double tmp;
if ((b * a) <= -4e+252) {
tmp = t_2 - t_1;
} else if ((b * a) <= 2e+143) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (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) :: t_2
real(8) :: tmp
t_1 = (b * a) * 0.25d0
t_2 = (t * z) * 0.0625d0
if ((b * a) <= (-4d+252)) then
tmp = t_2 - t_1
else if ((b * a) <= 2d+143) then
tmp = c + ((x * y) + t_2)
else
tmp = (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 = (b * a) * 0.25;
double t_2 = (t * z) * 0.0625;
double tmp;
if ((b * a) <= -4e+252) {
tmp = t_2 - t_1;
} else if ((b * a) <= 2e+143) {
tmp = c + ((x * y) + t_2);
} else {
tmp = (x * y) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (b * a) * 0.25 t_2 = (t * z) * 0.0625 tmp = 0 if (b * a) <= -4e+252: tmp = t_2 - t_1 elif (b * a) <= 2e+143: tmp = c + ((x * y) + t_2) else: tmp = (x * y) - t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b * a) * 0.25) t_2 = Float64(Float64(t * z) * 0.0625) tmp = 0.0 if (Float64(b * a) <= -4e+252) tmp = Float64(t_2 - t_1); elseif (Float64(b * a) <= 2e+143) tmp = Float64(c + Float64(Float64(x * y) + t_2)); else tmp = Float64(Float64(x * y) - t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (b * a) * 0.25; t_2 = (t * z) * 0.0625; tmp = 0.0; if ((b * a) <= -4e+252) tmp = t_2 - t_1; elseif ((b * a) <= 2e+143) tmp = c + ((x * y) + t_2); else tmp = (x * y) - t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * z), $MachinePrecision] * 0.0625), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -4e+252], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 2e+143], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot 0.25\\
t_2 := \left(t \cdot z\right) \cdot 0.0625\\
\mathbf{if}\;b \cdot a \leq -4 \cdot 10^{+252}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \cdot a \leq 2 \cdot 10^{+143}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - t_1\\
\end{array}
\end{array}
if (*.f64 a b) < -4.0000000000000004e252Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*100.0%
metadata-eval100.0%
*-lft-identity100.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 100.0%
Taylor expanded in c around 0 100.0%
if -4.0000000000000004e252 < (*.f64 a b) < 2e143Initial program 98.9%
associate-+l-98.9%
sub-neg98.9%
neg-mul-198.9%
metadata-eval98.9%
metadata-eval98.9%
cancel-sign-sub-inv98.9%
fma-def99.4%
associate-/l*99.4%
metadata-eval99.4%
*-lft-identity99.4%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in a around 0 90.7%
if 2e143 < (*.f64 a b) Initial program 97.5%
associate-+l-97.5%
sub-neg97.5%
neg-mul-197.5%
metadata-eval97.5%
metadata-eval97.5%
cancel-sign-sub-inv97.5%
fma-def97.5%
associate-/l*97.5%
metadata-eval97.5%
*-lft-identity97.5%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around 0 97.0%
Taylor expanded in c around 0 89.7%
Final simplification91.7%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (+ (/ (* t z) 16.0) (* x y)) (/ (* b a) 4.0))))
double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((t * z) / 16.0) + (x * y)) - ((b * a) / 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 + ((((t * z) / 16.0d0) + (x * y)) - ((b * a) / 4.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c + ((((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0));
}
def code(x, y, z, t, a, b, c): return c + ((((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0))
function code(x, y, z, t, a, b, c) return Float64(c + Float64(Float64(Float64(Float64(t * z) / 16.0) + Float64(x * y)) - Float64(Float64(b * a) / 4.0))) end
function tmp = code(x, y, z, t, a, b, c) tmp = c + ((((t * z) / 16.0) + (x * y)) - ((b * a) / 4.0)); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(N[(N[(t * z), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\right)
\end{array}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= y -680000.0) (* x y) (if (<= y 2.2e+36) c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -680000.0) {
tmp = x * y;
} else if (y <= 2.2e+36) {
tmp = c;
} 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) :: tmp
if (y <= (-680000.0d0)) then
tmp = x * y
else if (y <= 2.2d+36) then
tmp = c
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 tmp;
if (y <= -680000.0) {
tmp = x * y;
} else if (y <= 2.2e+36) {
tmp = c;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if y <= -680000.0: tmp = x * y elif y <= 2.2e+36: tmp = c else: tmp = x * y return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -680000.0) tmp = Float64(x * y); elseif (y <= 2.2e+36) tmp = c; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (y <= -680000.0) tmp = x * y; elseif (y <= 2.2e+36) tmp = c; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -680000.0], N[(x * y), $MachinePrecision], If[LessEqual[y, 2.2e+36], c, N[(x * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -680000:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+36}:\\
\;\;\;\;c\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < -6.8e5 or 2.2e36 < y Initial program 97.5%
associate-+l-97.5%
sub-neg97.5%
neg-mul-197.5%
metadata-eval97.5%
metadata-eval97.5%
cancel-sign-sub-inv97.5%
fma-def98.3%
associate-/l*98.3%
metadata-eval98.3%
*-lft-identity98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around 0 85.4%
Taylor expanded in c around 0 70.7%
Taylor expanded in y around inf 47.8%
if -6.8e5 < y < 2.2e36Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
neg-mul-1100.0%
metadata-eval100.0%
metadata-eval100.0%
cancel-sign-sub-inv100.0%
fma-def100.0%
associate-/l*99.9%
metadata-eval99.9%
*-lft-identity99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in c around inf 24.8%
Final simplification35.6%
(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 98.8%
associate-+l-98.8%
sub-neg98.8%
neg-mul-198.8%
metadata-eval98.8%
metadata-eval98.8%
cancel-sign-sub-inv98.8%
fma-def99.2%
associate-/l*99.1%
metadata-eval99.1%
*-lft-identity99.1%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in c around inf 21.1%
Final simplification21.1%
herbie shell --seed 2023238
(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))