?

Average Accuracy: 100.0% → 100.0%
Time: 2.3s
Precision: binary64
Cost: 320

?

\[\frac{x + 16}{116} \]
\[0.13793103448275862 - \frac{x}{-116} \]
(FPCore (x) :precision binary64 (/ (+ x 16.0) 116.0))
(FPCore (x) :precision binary64 (- 0.13793103448275862 (/ x -116.0)))
double code(double x) {
	return (x + 16.0) / 116.0;
}
double code(double x) {
	return 0.13793103448275862 - (x / -116.0);
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = (x + 16.0d0) / 116.0d0
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = 0.13793103448275862d0 - (x / (-116.0d0))
end function
public static double code(double x) {
	return (x + 16.0) / 116.0;
}
public static double code(double x) {
	return 0.13793103448275862 - (x / -116.0);
}
def code(x):
	return (x + 16.0) / 116.0
def code(x):
	return 0.13793103448275862 - (x / -116.0)
function code(x)
	return Float64(Float64(x + 16.0) / 116.0)
end
function code(x)
	return Float64(0.13793103448275862 - Float64(x / -116.0))
end
function tmp = code(x)
	tmp = (x + 16.0) / 116.0;
end
function tmp = code(x)
	tmp = 0.13793103448275862 - (x / -116.0);
end
code[x_] := N[(N[(x + 16.0), $MachinePrecision] / 116.0), $MachinePrecision]
code[x_] := N[(0.13793103448275862 - N[(x / -116.0), $MachinePrecision]), $MachinePrecision]
\frac{x + 16}{116}
0.13793103448275862 - \frac{x}{-116}

Error?

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 100.0%

    \[\frac{x + 16}{116} \]
  2. Applied egg-rr100.0%

    \[\leadsto \color{blue}{-\frac{x + 16}{-116}} \]
    Proof

    [Start]100.0

    \[ \frac{x + 16}{116} \]

    frac-2neg [=>]100.0

    \[ \color{blue}{\frac{-\left(x + 16\right)}{-116}} \]

    distribute-frac-neg [=>]100.0

    \[ \color{blue}{-\frac{x + 16}{-116}} \]

    metadata-eval [=>]100.0

    \[ -\frac{x + 16}{\color{blue}{-116}} \]
  3. Simplified100.0%

    \[\leadsto \color{blue}{0.13793103448275862 - \frac{x}{-116}} \]
    Proof

    [Start]100.0

    \[ -\frac{x + 16}{-116} \]

    distribute-neg-frac [=>]100.0

    \[ \color{blue}{\frac{-\left(x + 16\right)}{-116}} \]

    distribute-neg-in [=>]100.0

    \[ \frac{\color{blue}{\left(-x\right) + \left(-16\right)}}{-116} \]

    metadata-eval [=>]100.0

    \[ \frac{\left(-x\right) + \color{blue}{-16}}{-116} \]

    +-commutative [<=]100.0

    \[ \frac{\color{blue}{-16 + \left(-x\right)}}{-116} \]

    unsub-neg [=>]100.0

    \[ \frac{\color{blue}{-16 - x}}{-116} \]

    div-sub [=>]100.0

    \[ \color{blue}{\frac{-16}{-116} - \frac{x}{-116}} \]

    metadata-eval [=>]100.0

    \[ \color{blue}{0.13793103448275862} - \frac{x}{-116} \]
  4. Final simplification100.0%

    \[\leadsto 0.13793103448275862 - \frac{x}{-116} \]

Alternatives

Alternative 1
Accuracy97.9%
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -16:\\ \;\;\;\;x \cdot 0.008620689655172414\\ \mathbf{elif}\;x \leq 16:\\ \;\;\;\;0.13793103448275862\\ \mathbf{else}:\\ \;\;\;\;x \cdot 0.008620689655172414\\ \end{array} \]
Alternative 2
Accuracy50.4%
Cost64
\[0.13793103448275862 \]

Error

Reproduce?

herbie shell --seed 2023160 
(FPCore (x)
  :name "Data.Colour.CIE:cieLAB from colour-2.3.3, B"
  :precision binary64
  (/ (+ x 16.0) 116.0))