
(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 13 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 (fma 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, fma(z, (t / 16.0), ((a * b) / -4.0))) + c;
}
function code(x, y, z, t, a, b, c) return Float64(fma(x, y, fma(z, Float64(t / 16.0), Float64(Float64(a * b) / -4.0))) + c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, \frac{t}{16}, \frac{a \cdot b}{-4}\right)\right) + c
\end{array}
Initial program 98.4%
associate--l+98.4%
fma-define98.8%
associate-/l*98.8%
fma-neg98.8%
distribute-neg-frac298.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b c) :precision binary64 (+ c (- (fma 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 + (fma(x, y, (z * (t / 16.0))) - (a * (b / 4.0)));
}
function code(x, y, z, t, a, b, c) return Float64(c + Float64(fma(x, y, Float64(z * Float64(t / 16.0))) - Float64(a * Float64(b / 4.0)))) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(c + N[(N[(x * y + N[(z * N[(t / 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(b / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c + \left(\mathsf{fma}\left(x, y, z \cdot \frac{t}{16}\right) - a \cdot \frac{b}{4}\right)
\end{array}
Initial program 98.4%
associate-+l-98.4%
*-commutative98.4%
associate-+l-98.4%
fma-define98.4%
*-commutative98.4%
associate-/l*98.4%
associate-/l*98.4%
Simplified98.4%
Final simplification98.4%
(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 (<= (* a b) -1e+79)
t_2
(if (<= (* a b) -4e-181)
(+ c (* x y))
(if (<= (* a b) 1e+51)
t_1
(if (<= (* a b) 2e+123)
t_2
(if (<= (* a b) 1e+194) t_1 (- (* x y) (* (* a b) 0.25)))))))))
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 ((a * b) <= -1e+79) {
tmp = t_2;
} else if ((a * b) <= -4e-181) {
tmp = c + (x * y);
} else if ((a * b) <= 1e+51) {
tmp = t_1;
} else if ((a * b) <= 2e+123) {
tmp = t_2;
} else if ((a * b) <= 1e+194) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c + (t * (z * 0.0625d0))
t_2 = c + (b * (a * (-0.25d0)))
if ((a * b) <= (-1d+79)) then
tmp = t_2
else if ((a * b) <= (-4d-181)) then
tmp = c + (x * y)
else if ((a * b) <= 1d+51) then
tmp = t_1
else if ((a * b) <= 2d+123) then
tmp = t_2
else if ((a * b) <= 1d+194) then
tmp = t_1
else
tmp = (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 t_1 = c + (t * (z * 0.0625));
double t_2 = c + (b * (a * -0.25));
double tmp;
if ((a * b) <= -1e+79) {
tmp = t_2;
} else if ((a * b) <= -4e-181) {
tmp = c + (x * y);
} else if ((a * b) <= 1e+51) {
tmp = t_1;
} else if ((a * b) <= 2e+123) {
tmp = t_2;
} else if ((a * b) <= 1e+194) {
tmp = t_1;
} else {
tmp = (x * y) - ((a * b) * 0.25);
}
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 (a * b) <= -1e+79: tmp = t_2 elif (a * b) <= -4e-181: tmp = c + (x * y) elif (a * b) <= 1e+51: tmp = t_1 elif (a * b) <= 2e+123: tmp = t_2 elif (a * b) <= 1e+194: tmp = t_1 else: tmp = (x * y) - ((a * b) * 0.25) 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(a * b) <= -1e+79) tmp = t_2; elseif (Float64(a * b) <= -4e-181) tmp = Float64(c + Float64(x * y)); elseif (Float64(a * b) <= 1e+51) tmp = t_1; elseif (Float64(a * b) <= 2e+123) tmp = t_2; elseif (Float64(a * b) <= 1e+194) tmp = t_1; else tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); 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 ((a * b) <= -1e+79) tmp = t_2; elseif ((a * b) <= -4e-181) tmp = c + (x * y); elseif ((a * b) <= 1e+51) tmp = t_1; elseif ((a * b) <= 2e+123) tmp = t_2; elseif ((a * b) <= 1e+194) tmp = t_1; else tmp = (x * y) - ((a * b) * 0.25); 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[(a * b), $MachinePrecision], -1e+79], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -4e-181], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+51], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 2e+123], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 1e+194], t$95$1, N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]]]]]]
\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}\;a \cdot b \leq -1 \cdot 10^{+79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq -4 \cdot 10^{-181}:\\
\;\;\;\;c + x \cdot y\\
\mathbf{elif}\;a \cdot b \leq 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+123}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \cdot b \leq 10^{+194}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if (*.f64 a b) < -9.99999999999999967e78 or 1e51 < (*.f64 a b) < 1.99999999999999996e123Initial program 98.5%
Taylor expanded in a around inf 73.6%
*-commutative73.6%
*-commutative73.6%
associate-*r*73.6%
Simplified73.6%
if -9.99999999999999967e78 < (*.f64 a b) < -4.00000000000000019e-181Initial program 98.1%
Taylor expanded in x around inf 69.5%
if -4.00000000000000019e-181 < (*.f64 a b) < 1e51 or 1.99999999999999996e123 < (*.f64 a b) < 9.99999999999999945e193Initial program 100.0%
Taylor expanded in z around inf 75.9%
associate-*r*75.9%
*-commutative75.9%
associate-*r*75.9%
Simplified75.9%
if 9.99999999999999945e193 < (*.f64 a b) Initial program 93.7%
Taylor expanded in z around 0 90.3%
Taylor expanded in c around 0 87.2%
Final simplification75.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ c (* x y))))
(if (<= (* x y) -1.22e+76)
t_1
(if (<= (* x y) 3e-11)
(+ c (* b (* a -0.25)))
(if (or (<= (* x y) 1300000000.0)
(and (not (<= (* x y) 3.7e+65)) (<= (* x y) 4.6e+111)))
(* z (* t 0.0625))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = c + (x * y);
double tmp;
if ((x * y) <= -1.22e+76) {
tmp = t_1;
} else if ((x * y) <= 3e-11) {
tmp = c + (b * (a * -0.25));
} else if (((x * y) <= 1300000000.0) || (!((x * y) <= 3.7e+65) && ((x * y) <= 4.6e+111))) {
tmp = z * (t * 0.0625);
} 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 = c + (x * y)
if ((x * y) <= (-1.22d+76)) then
tmp = t_1
else if ((x * y) <= 3d-11) then
tmp = c + (b * (a * (-0.25d0)))
else if (((x * y) <= 1300000000.0d0) .or. (.not. ((x * y) <= 3.7d+65)) .and. ((x * y) <= 4.6d+111)) then
tmp = z * (t * 0.0625d0)
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 = c + (x * y);
double tmp;
if ((x * y) <= -1.22e+76) {
tmp = t_1;
} else if ((x * y) <= 3e-11) {
tmp = c + (b * (a * -0.25));
} else if (((x * y) <= 1300000000.0) || (!((x * y) <= 3.7e+65) && ((x * y) <= 4.6e+111))) {
tmp = z * (t * 0.0625);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = c + (x * y) tmp = 0 if (x * y) <= -1.22e+76: tmp = t_1 elif (x * y) <= 3e-11: tmp = c + (b * (a * -0.25)) elif ((x * y) <= 1300000000.0) or (not ((x * y) <= 3.7e+65) and ((x * y) <= 4.6e+111)): tmp = z * (t * 0.0625) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(c + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.22e+76) tmp = t_1; elseif (Float64(x * y) <= 3e-11) tmp = Float64(c + Float64(b * Float64(a * -0.25))); elseif ((Float64(x * y) <= 1300000000.0) || (!(Float64(x * y) <= 3.7e+65) && (Float64(x * y) <= 4.6e+111))) tmp = Float64(z * Float64(t * 0.0625)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = c + (x * y); tmp = 0.0; if ((x * y) <= -1.22e+76) tmp = t_1; elseif ((x * y) <= 3e-11) tmp = c + (b * (a * -0.25)); elseif (((x * y) <= 1300000000.0) || (~(((x * y) <= 3.7e+65)) && ((x * y) <= 4.6e+111))) tmp = z * (t * 0.0625); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.22e+76], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3e-11], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], 1300000000.0], And[N[Not[LessEqual[N[(x * y), $MachinePrecision], 3.7e+65]], $MachinePrecision], LessEqual[N[(x * y), $MachinePrecision], 4.6e+111]]], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -1.22 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 3 \cdot 10^{-11}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\mathbf{elif}\;x \cdot y \leq 1300000000 \lor \neg \left(x \cdot y \leq 3.7 \cdot 10^{+65}\right) \land x \cdot y \leq 4.6 \cdot 10^{+111}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.22000000000000002e76 or 1.3e9 < (*.f64 x y) < 3.69999999999999995e65 or 4.60000000000000004e111 < (*.f64 x y) Initial program 97.1%
Taylor expanded in x around inf 68.9%
if -1.22000000000000002e76 < (*.f64 x y) < 3e-11Initial program 99.2%
Taylor expanded in a around inf 66.8%
*-commutative66.8%
*-commutative66.8%
associate-*r*66.8%
Simplified66.8%
if 3e-11 < (*.f64 x y) < 1.3e9 or 3.69999999999999995e65 < (*.f64 x y) < 4.60000000000000004e111Initial program 100.0%
Taylor expanded in z around inf 80.6%
associate-*r*80.6%
*-commutative80.6%
associate-*r*80.6%
Simplified80.6%
Taylor expanded in z around inf 80.6%
Taylor expanded in t around inf 80.6%
Final simplification68.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (+ c (* x y)) (* (* a b) 0.25))))
(if (<= (* a b) -1.5e+20)
t_1
(if (<= (* a b) 5e+67)
(+ c (+ (* x y) (* 0.0625 (* z t))))
(if (<= (* a b) 5e+168)
(* t (- (* z 0.0625) (* 0.25 (/ (* a b) t))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (c + (x * y)) - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -1.5e+20) {
tmp = t_1;
} else if ((a * b) <= 5e+67) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else if ((a * b) <= 5e+168) {
tmp = t * ((z * 0.0625) - (0.25 * ((a * b) / t)));
} 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 = (c + (x * y)) - ((a * b) * 0.25d0)
if ((a * b) <= (-1.5d+20)) then
tmp = t_1
else if ((a * b) <= 5d+67) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else if ((a * b) <= 5d+168) then
tmp = t * ((z * 0.0625d0) - (0.25d0 * ((a * b) / t)))
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 = (c + (x * y)) - ((a * b) * 0.25);
double tmp;
if ((a * b) <= -1.5e+20) {
tmp = t_1;
} else if ((a * b) <= 5e+67) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else if ((a * b) <= 5e+168) {
tmp = t * ((z * 0.0625) - (0.25 * ((a * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (c + (x * y)) - ((a * b) * 0.25) tmp = 0 if (a * b) <= -1.5e+20: tmp = t_1 elif (a * b) <= 5e+67: tmp = c + ((x * y) + (0.0625 * (z * t))) elif (a * b) <= 5e+168: tmp = t * ((z * 0.0625) - (0.25 * ((a * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)) tmp = 0.0 if (Float64(a * b) <= -1.5e+20) tmp = t_1; elseif (Float64(a * b) <= 5e+67) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); elseif (Float64(a * b) <= 5e+168) tmp = Float64(t * Float64(Float64(z * 0.0625) - Float64(0.25 * Float64(Float64(a * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (c + (x * y)) - ((a * b) * 0.25); tmp = 0.0; if ((a * b) <= -1.5e+20) tmp = t_1; elseif ((a * b) <= 5e+67) tmp = c + ((x * y) + (0.0625 * (z * t))); elseif ((a * b) <= 5e+168) tmp = t * ((z * 0.0625) - (0.25 * ((a * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.5e+20], t$95$1, If[LessEqual[N[(a * b), $MachinePrecision], 5e+67], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+168], N[(t * N[(N[(z * 0.0625), $MachinePrecision] - N[(0.25 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+67}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+168}:\\
\;\;\;\;t \cdot \left(z \cdot 0.0625 - 0.25 \cdot \frac{a \cdot b}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a b) < -1.5e20 or 4.99999999999999967e168 < (*.f64 a b) Initial program 96.8%
Taylor expanded in z around 0 86.6%
if -1.5e20 < (*.f64 a b) < 4.99999999999999976e67Initial program 99.3%
Taylor expanded in a around 0 95.8%
if 4.99999999999999976e67 < (*.f64 a b) < 4.99999999999999967e168Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in t around inf 80.8%
Taylor expanded in c around 0 80.8%
Final simplification91.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a b) 0.25))
(t_2 (* 0.0625 (* z t)))
(t_3 (- (+ c (* x y)) t_1)))
(if (<= (* a b) -1.5e+20)
t_3
(if (<= (* a b) 5e+59)
(+ c (+ (* x y) t_2))
(if (<= (* a b) 5e+168) (- (+ c t_2) t_1) t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double t_3 = (c + (x * y)) - t_1;
double tmp;
if ((a * b) <= -1.5e+20) {
tmp = t_3;
} else if ((a * b) <= 5e+59) {
tmp = c + ((x * y) + t_2);
} else if ((a * b) <= 5e+168) {
tmp = (c + t_2) - 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 = (a * b) * 0.25d0
t_2 = 0.0625d0 * (z * t)
t_3 = (c + (x * y)) - t_1
if ((a * b) <= (-1.5d+20)) then
tmp = t_3
else if ((a * b) <= 5d+59) then
tmp = c + ((x * y) + t_2)
else if ((a * b) <= 5d+168) then
tmp = (c + t_2) - 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 = (a * b) * 0.25;
double t_2 = 0.0625 * (z * t);
double t_3 = (c + (x * y)) - t_1;
double tmp;
if ((a * b) <= -1.5e+20) {
tmp = t_3;
} else if ((a * b) <= 5e+59) {
tmp = c + ((x * y) + t_2);
} else if ((a * b) <= 5e+168) {
tmp = (c + t_2) - t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * b) * 0.25 t_2 = 0.0625 * (z * t) t_3 = (c + (x * y)) - t_1 tmp = 0 if (a * b) <= -1.5e+20: tmp = t_3 elif (a * b) <= 5e+59: tmp = c + ((x * y) + t_2) elif (a * b) <= 5e+168: tmp = (c + t_2) - t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) * 0.25) t_2 = Float64(0.0625 * Float64(z * t)) t_3 = Float64(Float64(c + Float64(x * y)) - t_1) tmp = 0.0 if (Float64(a * b) <= -1.5e+20) tmp = t_3; elseif (Float64(a * b) <= 5e+59) tmp = Float64(c + Float64(Float64(x * y) + t_2)); elseif (Float64(a * b) <= 5e+168) tmp = Float64(Float64(c + t_2) - t_1); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * b) * 0.25; t_2 = 0.0625 * (z * t); t_3 = (c + (x * y)) - t_1; tmp = 0.0; if ((a * b) <= -1.5e+20) tmp = t_3; elseif ((a * b) <= 5e+59) tmp = c + ((x * y) + t_2); elseif ((a * b) <= 5e+168) tmp = (c + t_2) - t_1; else tmp = t_3; 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]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1.5e+20], t$95$3, If[LessEqual[N[(a * b), $MachinePrecision], 5e+59], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+168], N[(N[(c + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 0.25\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := \left(c + x \cdot y\right) - t\_1\\
\mathbf{if}\;a \cdot b \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+59}:\\
\;\;\;\;c + \left(x \cdot y + t\_2\right)\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+168}:\\
\;\;\;\;\left(c + t\_2\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 a b) < -1.5e20 or 4.99999999999999967e168 < (*.f64 a b) Initial program 96.8%
Taylor expanded in z around 0 86.6%
if -1.5e20 < (*.f64 a b) < 4.9999999999999997e59Initial program 99.3%
Taylor expanded in a around 0 96.4%
if 4.9999999999999997e59 < (*.f64 a b) < 4.99999999999999967e168Initial program 100.0%
Taylor expanded in x around 0 100.0%
Final simplification93.0%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* a b) -2e+181) (not (<= (* a b) 1e+194))) (- (* x y) (* (* a b) 0.25)) (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((a * b) <= -2e+181) || !((a * b) <= 1e+194)) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
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) <= (-2d+181)) .or. (.not. ((a * b) <= 1d+194))) then
tmp = (x * y) - ((a * b) * 0.25d0)
else
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
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) <= -2e+181) || !((a * b) <= 1e+194)) {
tmp = (x * y) - ((a * b) * 0.25);
} else {
tmp = c + ((x * y) + (0.0625 * (z * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((a * b) <= -2e+181) or not ((a * b) <= 1e+194): tmp = (x * y) - ((a * b) * 0.25) else: tmp = c + ((x * y) + (0.0625 * (z * t))) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(a * b) <= -2e+181) || !(Float64(a * b) <= 1e+194)) tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25)); else tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((a * b) <= -2e+181) || ~(((a * b) <= 1e+194))) tmp = (x * y) - ((a * b) * 0.25); else tmp = c + ((x * y) + (0.0625 * (z * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2e+181], N[Not[LessEqual[N[(a * b), $MachinePrecision], 1e+194]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+181} \lor \neg \left(a \cdot b \leq 10^{+194}\right):\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 a b) < -1.9999999999999998e181 or 9.99999999999999945e193 < (*.f64 a b) Initial program 95.1%
Taylor expanded in z around 0 90.1%
Taylor expanded in c around 0 86.9%
if -1.9999999999999998e181 < (*.f64 a b) < 9.99999999999999945e193Initial program 99.5%
Taylor expanded in a around 0 88.0%
Final simplification87.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.6e+90) (not (<= z 3.5e-52))) (+ c (+ (* x y) (* 0.0625 (* z t)))) (- (+ c (* 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 ((z <= -2.6e+90) || !(z <= 3.5e-52)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (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 ((z <= (-2.6d+90)) .or. (.not. (z <= 3.5d-52))) then
tmp = c + ((x * y) + (0.0625d0 * (z * t)))
else
tmp = (c + (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 ((z <= -2.6e+90) || !(z <= 3.5e-52)) {
tmp = c + ((x * y) + (0.0625 * (z * t)));
} else {
tmp = (c + (x * y)) - ((a * b) * 0.25);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.6e+90) or not (z <= 3.5e-52): tmp = c + ((x * y) + (0.0625 * (z * t))) else: tmp = (c + (x * y)) - ((a * b) * 0.25) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.6e+90) || !(z <= 3.5e-52)) tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t)))); else tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -2.6e+90) || ~((z <= 3.5e-52))) tmp = c + ((x * y) + (0.0625 * (z * t))); else tmp = (c + (x * y)) - ((a * b) * 0.25); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.6e+90], N[Not[LessEqual[z, 3.5e-52]], $MachinePrecision]], 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] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+90} \lor \neg \left(z \leq 3.5 \cdot 10^{-52}\right):\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\
\end{array}
\end{array}
if z < -2.5999999999999998e90 or 3.5e-52 < z Initial program 97.6%
Taylor expanded in a around 0 83.0%
if -2.5999999999999998e90 < z < 3.5e-52Initial program 99.2%
Taylor expanded in z around 0 92.0%
Final simplification87.5%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.1e+90) (not (<= z 1.5e-74))) (+ c (* t (* z 0.0625))) (+ c (* b (* a -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.1e+90) || !(z <= 1.5e-74)) {
tmp = c + (t * (z * 0.0625));
} else {
tmp = c + (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 ((z <= (-3.1d+90)) .or. (.not. (z <= 1.5d-74))) then
tmp = c + (t * (z * 0.0625d0))
else
tmp = c + (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 ((z <= -3.1e+90) || !(z <= 1.5e-74)) {
tmp = c + (t * (z * 0.0625));
} else {
tmp = c + (b * (a * -0.25));
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.1e+90) or not (z <= 1.5e-74): tmp = c + (t * (z * 0.0625)) else: tmp = c + (b * (a * -0.25)) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.1e+90) || !(z <= 1.5e-74)) tmp = Float64(c + Float64(t * Float64(z * 0.0625))); else tmp = Float64(c + Float64(b * Float64(a * -0.25))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((z <= -3.1e+90) || ~((z <= 1.5e-74))) tmp = c + (t * (z * 0.0625)); else tmp = c + (b * (a * -0.25)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.1e+90], N[Not[LessEqual[z, 1.5e-74]], $MachinePrecision]], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+90} \lor \neg \left(z \leq 1.5 \cdot 10^{-74}\right):\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\
\end{array}
\end{array}
if z < -3.09999999999999988e90 or 1.50000000000000003e-74 < z Initial program 97.7%
Taylor expanded in z around inf 65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r*65.8%
Simplified65.8%
if -3.09999999999999988e90 < z < 1.50000000000000003e-74Initial program 99.2%
Taylor expanded in a around inf 63.3%
*-commutative63.3%
*-commutative63.3%
associate-*r*63.3%
Simplified63.3%
Final simplification64.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 98.4%
Final simplification98.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -4.3e-10) (not (<= t 3.8e+16))) (* z (* t 0.0625)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -4.3e-10) || !(t <= 3.8e+16)) {
tmp = z * (t * 0.0625);
} 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 ((t <= (-4.3d-10)) .or. (.not. (t <= 3.8d+16))) then
tmp = z * (t * 0.0625d0)
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 ((t <= -4.3e-10) || !(t <= 3.8e+16)) {
tmp = z * (t * 0.0625);
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -4.3e-10) or not (t <= 3.8e+16): tmp = z * (t * 0.0625) else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -4.3e-10) || !(t <= 3.8e+16)) tmp = Float64(z * Float64(t * 0.0625)); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((t <= -4.3e-10) || ~((t <= 3.8e+16))) tmp = z * (t * 0.0625); else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -4.3e-10], N[Not[LessEqual[t, 3.8e+16]], $MachinePrecision]], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-10} \lor \neg \left(t \leq 3.8 \cdot 10^{+16}\right):\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if t < -4.30000000000000014e-10 or 3.8e16 < t Initial program 96.6%
Taylor expanded in z around inf 70.2%
associate-*r*70.2%
*-commutative70.2%
associate-*r*70.2%
Simplified70.2%
Taylor expanded in z around inf 63.0%
Taylor expanded in t around inf 53.6%
if -4.30000000000000014e-10 < t < 3.8e16Initial program 100.0%
Taylor expanded in c around inf 29.0%
Final simplification40.3%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.1e+90) (not (<= z 0.007))) (* z (* t 0.0625)) (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.1e+90) || !(z <= 0.007)) {
tmp = z * (t * 0.0625);
} 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.1d+90)) .or. (.not. (z <= 0.007d0))) then
tmp = z * (t * 0.0625d0)
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.1e+90) || !(z <= 0.007)) {
tmp = z * (t * 0.0625);
} else {
tmp = c + (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.1e+90) or not (z <= 0.007): tmp = z * (t * 0.0625) else: tmp = c + (x * y) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.1e+90) || !(z <= 0.007)) tmp = Float64(z * Float64(t * 0.0625)); 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.1e+90) || ~((z <= 0.007))) tmp = z * (t * 0.0625); else tmp = c + (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.1e+90], N[Not[LessEqual[z, 0.007]], $MachinePrecision]], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+90} \lor \neg \left(z \leq 0.007\right):\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\
\end{array}
\end{array}
if z < -2.09999999999999981e90 or 0.00700000000000000015 < z Initial program 97.5%
Taylor expanded in z around inf 68.5%
associate-*r*68.5%
*-commutative68.5%
associate-*r*68.5%
Simplified68.5%
Taylor expanded in z around inf 68.5%
Taylor expanded in t around inf 54.3%
if -2.09999999999999981e90 < z < 0.00700000000000000015Initial program 99.3%
Taylor expanded in x around inf 60.7%
Final simplification57.7%
(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.4%
Taylor expanded in c around inf 24.4%
Final simplification24.4%
herbie shell --seed 2024054
(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))