?

Average Error: 0.1 → 0.1
Time: 29.4s
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
Error18.0
Cost1760
\[\begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right) + c\\ t_2 := y \cdot x - b \cdot \left(0.25 \cdot a\right)\\ t_3 := \left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\ \mathbf{if}\;z \leq -0.0215:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-126}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-306}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-151}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-65}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 2
Error26.5
Cost1504
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{-198}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-256}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-214}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+83}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error25.8
Cost1368
\[\begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right) + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := y \cdot x + t_2\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+33}:\\ \;\;\;\;t_2 + c\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-308}:\\ \;\;\;\;y \cdot x + c\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-170}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{-151}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error7.7
Cost1364
\[\begin{array}{l} t_1 := b \cdot \left(0.25 \cdot a\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := \left(t_2 + c\right) - t_1\\ t_4 := y \cdot x + t_2\\ t_5 := t_4 + c\\ \mathbf{if}\;c \leq -1.55 \cdot 10^{-113}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 5 \cdot 10^{-7}:\\ \;\;\;\;t_4 - 0.25 \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;c \leq 3 \cdot 10^{+78}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 9.6 \cdot 10^{+99}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;c \leq 1.65 \cdot 10^{+152}:\\ \;\;\;\;\left(c + y \cdot x\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 5
Error35.1
Cost1244
\[\begin{array}{l} t_1 := b \cdot \left(a \cdot -0.25\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;c \leq -1.55 \cdot 10^{+44}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq -2.7 \cdot 10^{-123}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq -1.45 \cdot 10^{-190}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.4 \cdot 10^{-285}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5200000:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 1.95 \cdot 10^{+32}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 6
Error24.6
Cost1240
\[\begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right) + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right) + c\\ t_3 := y \cdot x + c\\ \mathbf{if}\;z \leq -1.06 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-180}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-151}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error22.2
Cost1240
\[\begin{array}{l} t_1 := y \cdot x - b \cdot \left(0.25 \cdot a\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := t_2 + c\\ \mathbf{if}\;c \leq -3.65 \cdot 10^{-121}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq -2.5 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 2.65 \cdot 10^{-281}:\\ \;\;\;\;y \cdot x + t_2\\ \mathbf{elif}\;c \leq 3.7 \cdot 10^{+29}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 5 \cdot 10^{+80}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;c \leq 1.15 \cdot 10^{+189}:\\ \;\;\;\;y \cdot x + c\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\ \end{array} \]
Alternative 8
Error8.8
Cost1224
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+83}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right) + c\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+183}:\\ \;\;\;\;\left(y \cdot x + t_1\right) + c\\ \mathbf{else}:\\ \;\;\;\;t_1 - 0.25 \cdot \left(a \cdot b\right)\\ \end{array} \]
Alternative 9
Error31.0
Cost1112
\[\begin{array}{l} t_1 := y \cdot x + c\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+196}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+135}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-65}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error9.7
Cost1096
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ t_2 := b \cdot \left(0.25 \cdot a\right)\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+51}:\\ \;\;\;\;\left(y \cdot x + t_1\right) + c\\ \mathbf{elif}\;z \leq 1.36 \cdot 10^{-8}:\\ \;\;\;\;\left(c + y \cdot x\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;\left(t_1 + c\right) - t_2\\ \end{array} \]
Alternative 11
Error13.3
Cost968
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;z \leq -2 \cdot 10^{+52}:\\ \;\;\;\;\left(y \cdot x + t_1\right) + c\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-8}:\\ \;\;\;\;\left(c + y \cdot x\right) - b \cdot \left(0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 - 0.25 \cdot \left(a \cdot b\right)\\ \end{array} \]
Alternative 12
Error35.6
Cost852
\[\begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;c \leq -3.4 \cdot 10^{+40}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.2 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 1.14 \cdot 10^{-250}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;c \leq 5.8 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;c \leq 3.35 \cdot 10^{-7}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 13
Error36.8
Cost456
\[\begin{array}{l} \mathbf{if}\;c \leq -3.65 \cdot 10^{-121}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 1.75 \cdot 10^{-7}:\\ \;\;\;\;y \cdot x\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
Alternative 14
Error43.6
Cost64
\[c \]

Error

Reproduce?

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