Average Error: 0.1 → 0.0
Time: 9.5s
Precision: binary64
\[\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}{4} \cdot \frac{t}{4}\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
\left(\left(x \cdot y + \frac{z}{4} \cdot \frac{t}{4}\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 4.0) (/ t 4.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 / 4.0) * (t / 4.0))) - ((a * b) / 4.0)) + c;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

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. Using strategy rm
  3. Applied add-sqr-sqrt_binary64_62930.1

    \[\leadsto \left(\left(x \cdot y + \frac{z \cdot t}{\color{blue}{\sqrt{16} \cdot \sqrt{16}}}\right) - \frac{a \cdot b}{4}\right) + c\]
  4. Applied times-frac_binary64_62770.0

    \[\leadsto \left(\left(x \cdot y + \color{blue}{\frac{z}{\sqrt{16}} \cdot \frac{t}{\sqrt{16}}}\right) - \frac{a \cdot b}{4}\right) + c\]
  5. Simplified0.0

    \[\leadsto \left(\left(x \cdot y + \color{blue}{\frac{z}{4}} \cdot \frac{t}{\sqrt{16}}\right) - \frac{a \cdot b}{4}\right) + c\]
  6. Simplified0.0

    \[\leadsto \left(\left(x \cdot y + \frac{z}{4} \cdot \color{blue}{\frac{t}{4}}\right) - \frac{a \cdot b}{4}\right) + c\]
  7. Final simplification0.0

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

Reproduce

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