?

Average Error: 0.1 → 0.1
Time: 25.8s
Precision: binary64
Cost: 1088

?

\[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
\[\left(\left(x \cdot y + \frac{z \cdot t}{16}\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
 (+ (- (+ (* 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;
}
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
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;
}
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
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 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
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]
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]
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\left(\left(x \cdot y + \frac{z \cdot t}{16}\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.1

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

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

Alternatives

Alternative 1
Error26.7
Cost2028
\[\begin{array}{l} t_1 := 0.25 \cdot \left(a \cdot b\right)\\ t_2 := y \cdot x - t_1\\ t_3 := c - t_1\\ t_4 := 0.0625 \cdot \left(t \cdot z\right)\\ t_5 := y \cdot x + t_4\\ t_6 := y \cdot x + c\\ t_7 := t_4 + c\\ \mathbf{if}\;t \leq -1.2 \cdot 10^{-66}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq -1.66 \cdot 10^{-245}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-278}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-285}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-176}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-72}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+123}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+182}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+199}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+228}:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 2
Error26.6
Cost1896
\[\begin{array}{l} t_1 := c - 0.25 \cdot \left(a \cdot b\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := y \cdot x + t_2\\ t_4 := y \cdot x + c\\ t_5 := t_2 + c\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{-68}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-283}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-72}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+123}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+178}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+228}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error25.2
Cost1636
\[\begin{array}{l} t_1 := c - 0.25 \cdot \left(a \cdot b\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ t_3 := y \cdot x + c\\ \mathbf{if}\;t \leq -1.02 \cdot 10^{-67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-256}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-283}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-73}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+123}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+178}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+200}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error9.3
Cost1224
\[\begin{array}{l} t_1 := 0.25 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+93}:\\ \;\;\;\;y \cdot x - t_1\\ \mathbf{elif}\;a \cdot b \leq 20000:\\ \;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\ \mathbf{else}:\\ \;\;\;\;c - t_1\\ \end{array} \]
Alternative 5
Error5.7
Cost1224
\[\begin{array}{l} t_1 := \left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)\\ \mathbf{if}\;a \cdot b \leq -4 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 8800:\\ \;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error29.1
Cost1112
\[\begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right)\\ t_2 := y \cdot x + c\\ t_3 := 0.0625 \cdot \left(t \cdot z\right) + c\\ \mathbf{if}\;b \leq -1.85 \cdot 10^{-239}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-308}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-161}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+241}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error28.9
Cost716
\[\begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right)\\ t_2 := y \cdot x + c\\ \mathbf{if}\;b \leq 8.2 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+239}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error35.7
Cost588
\[\begin{array}{l} \mathbf{if}\;c \leq -2.5 \cdot 10^{+71}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.9 \cdot 10^{-153}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;c \leq 3.1 \cdot 10^{+41}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 9
Error35.3
Cost456
\[\begin{array}{l} \mathbf{if}\;c \leq -2.1 \cdot 10^{-12}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.4 \cdot 10^{+42}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 10
Error43.5
Cost64
\[c \]

Error

Reproduce?

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