Average Error: 0.2 → 0.2
Time: 2.0s
Precision: 64
\[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y\]
\[\left(y \cdot 3\right) \cdot x + y \cdot \left(-0.4137931034482758563264326312491903081536\right)\]
\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y
\left(y \cdot 3\right) \cdot x + y \cdot \left(-0.4137931034482758563264326312491903081536\right)
double f(double x, double y) {
        double r817320 = x;
        double r817321 = 16.0;
        double r817322 = 116.0;
        double r817323 = r817321 / r817322;
        double r817324 = r817320 - r817323;
        double r817325 = 3.0;
        double r817326 = r817324 * r817325;
        double r817327 = y;
        double r817328 = r817326 * r817327;
        return r817328;
}

double f(double x, double y) {
        double r817329 = y;
        double r817330 = 3.0;
        double r817331 = r817329 * r817330;
        double r817332 = x;
        double r817333 = r817331 * r817332;
        double r817334 = 0.41379310344827586;
        double r817335 = -r817334;
        double r817336 = r817329 * r817335;
        double r817337 = r817333 + r817336;
        return r817337;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.2
Target0.2
Herbie0.2
\[y \cdot \left(x \cdot 3 - 0.4137931034482758563264326312491903081536\right)\]

Derivation

  1. Initial program 0.2

    \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{3 \cdot \left(x \cdot y\right) - 0.4137931034482758563264326312491903081536 \cdot y}\]
  3. Simplified0.2

    \[\leadsto \color{blue}{y \cdot \left(3 \cdot x - 0.4137931034482758563264326312491903081536\right)}\]
  4. Using strategy rm
  5. Applied sub-neg0.2

    \[\leadsto y \cdot \color{blue}{\left(3 \cdot x + \left(-0.4137931034482758563264326312491903081536\right)\right)}\]
  6. Applied distribute-lft-in0.2

    \[\leadsto \color{blue}{y \cdot \left(3 \cdot x\right) + y \cdot \left(-0.4137931034482758563264326312491903081536\right)}\]
  7. Using strategy rm
  8. Applied associate-*r*0.2

    \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} + y \cdot \left(-0.4137931034482758563264326312491903081536\right)\]
  9. Final simplification0.2

    \[\leadsto \left(y \cdot 3\right) \cdot x + y \cdot \left(-0.4137931034482758563264326312491903081536\right)\]

Reproduce

herbie shell --seed 2019356 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLAB from colour-2.3.3, A"
  :precision binary64

  :herbie-target
  (* y (- (* x 3) 0.41379310344827586))

  (* (* (- x (/ 16 116)) 3) y))