?

Average Error: 0.19% → 0.19%
Time: 11.9s
Precision: binary64
Cost: 1088

?

\[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
\[\left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{a \cdot b}{4}\right) + c \]
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (/ (* z t) 16.0) (* x y)) (/ (* 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;
}
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((z * t) / 16.0) + (x * y)) - ((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
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 = ((((z * t) / 16.0d0) + (x * y)) - ((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;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((z * t) / 16.0) + (x * y)) - ((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
def code(x, y, z, t, a, b, c):
	return ((((z * t) / 16.0) + (x * y)) - ((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 code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(z * t) / 16.0) + Float64(x * y)) - 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
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((z * t) / 16.0) + (x * y)) - ((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]
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{a \cdot b}{4}\right) + c

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.19

    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
  2. Final simplification0.19

    \[\leadsto \left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{a \cdot b}{4}\right) + c \]

Alternatives

Alternative 1
Error58.57%
Cost2660
\[\begin{array}{l} t_1 := \left(a \cdot b\right) \cdot -0.25\\ \mathbf{if}\;a \cdot b \leq -2300000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-122}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 1.3 \cdot 10^{-251}:\\ \;\;\;\;c\\ \mathbf{elif}\;a \cdot b \leq 1.35 \cdot 10^{-183}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 6.2 \cdot 10^{-140}:\\ \;\;\;\;c\\ \mathbf{elif}\;a \cdot b \leq 4.7 \cdot 10^{-91}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 9.5 \cdot 10^{-12}:\\ \;\;\;\;c\\ \mathbf{elif}\;a \cdot b \leq 5.4 \cdot 10^{+14}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 4.6 \cdot 10^{+63}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error35.97%
Cost1504
\[\begin{array}{l} t_1 := x \cdot y + \left(a \cdot b\right) \cdot -0.25\\ t_2 := c + b \cdot \left(a \cdot -0.25\right)\\ t_3 := c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;c \leq -4.6 \cdot 10^{+59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -5 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -0.00385:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -1.36 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq -1.7 \cdot 10^{-107}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.02 \cdot 10^{-103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 4.1 \cdot 10^{-73}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1060:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error55.6%
Cost1380
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;c \leq -6.4 \cdot 10^{+58}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -6.5 \cdot 10^{+29}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq -3.2:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -1.05 \cdot 10^{-160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.6 \cdot 10^{-302}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq 5.2 \cdot 10^{-215}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6.4 \cdot 10^{-109}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;c \leq 1.3 \cdot 10^{-72}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 6.2 \cdot 10^{+20}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 4
Error8.84%
Cost1225
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+15} \lor \neg \left(a \cdot b \leq 10^{+25}\right):\\ \;\;\;\;x \cdot y + \left(c - \frac{a}{\frac{4}{b}}\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\ \end{array} \]
Alternative 5
Error13.22%
Cost1224
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+115}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{+63}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + \left(a \cdot b\right) \cdot -0.25\\ \end{array} \]
Alternative 6
Error32.37%
Cost969
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+22} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+86}\right):\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]
Alternative 7
Error36.96%
Cost841
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+109} \lor \neg \left(a \cdot b \leq 4.8 \cdot 10^{+158}\right):\\ \;\;\;\;\left(a \cdot b\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]
Alternative 8
Error55.73%
Cost456
\[\begin{array}{l} \mathbf{if}\;c \leq -5.6 \cdot 10^{+59}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.6 \cdot 10^{+18}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 9
Error68.37%
Cost64
\[c \]

Error

Reproduce?

herbie shell --seed 2023115 
(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))