?

Average Error: 0.1 → 0.1
Time: 24.2s
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
Error20.6
Cost2396
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+43}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\ \mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-232}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 500:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot x - 0.25 \cdot \left(a \cdot b\right)\\ \end{array} \]
Alternative 2
Error23.7
Cost2268
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ t_3 := \left(a \cdot b\right) \cdot -0.25\\ \mathbf{if}\;a \cdot b \leq -2.3 \cdot 10^{+42}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \cdot b \leq -6.5 \cdot 10^{-300}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 3.1 \cdot 10^{-229}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 1.22 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 8 \cdot 10^{-120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 720:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 1.35 \cdot 10^{+97}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 3
Error20.2
Cost2268
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ t_3 := a \cdot \left(b \cdot -0.25\right) + c\\ \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+43}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-232}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 500:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+96}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error25.4
Cost1880
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := \left(a \cdot b\right) \cdot -0.25\\ \mathbf{if}\;a \cdot b \leq -1.05 \cdot 10^{+43}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \cdot b \leq 7.3 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 6.2 \cdot 10^{-121}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 2.8 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 1.15 \cdot 10^{+119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 5.5 \cdot 10^{+156}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 5
Error35.4
Cost1244
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;c \leq -1.05 \cdot 10^{+48}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -1.6 \cdot 10^{-132}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 3.9 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-149}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 4.4 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 8 \cdot 10^{+37}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{+60}:\\ \;\;\;\;\left(a \cdot b\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 6
Error8.9
Cost1224
\[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+43}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+96}:\\ \;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\ \mathbf{else}:\\ \;\;\;\;y \cdot x - 0.25 \cdot \left(a \cdot b\right)\\ \end{array} \]
Alternative 7
Error6.1
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 -5 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+96}:\\ \;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error35.2
Cost980
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;c \leq -7.5 \cdot 10^{+46}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -7.4 \cdot 10^{-137}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 2.4 \cdot 10^{-268}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{-146}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 3.6 \cdot 10^{+65}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 9
Error35.3
Cost456
\[\begin{array}{l} \mathbf{if}\;c \leq -6.6 \cdot 10^{+49}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{+59}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 10
Error43.3
Cost64
\[c \]

Error

Reproduce?

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