?

Average Error: 0.1 → 0.1
Time: 10.0s
Precision: binary64
Cost: 320

?

\[\frac{841}{108} \cdot x + \frac{4}{29} \]
\[7.787037037037037 \cdot x + 0.13793103448275862 \]
(FPCore (x) :precision binary64 (+ (* (/ 841.0 108.0) x) (/ 4.0 29.0)))
(FPCore (x)
 :precision binary64
 (+ (* 7.787037037037037 x) 0.13793103448275862))
double code(double x) {
	return ((841.0 / 108.0) * x) + (4.0 / 29.0);
}
double code(double x) {
	return (7.787037037037037 * x) + 0.13793103448275862;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = ((841.0d0 / 108.0d0) * x) + (4.0d0 / 29.0d0)
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = (7.787037037037037d0 * x) + 0.13793103448275862d0
end function
public static double code(double x) {
	return ((841.0 / 108.0) * x) + (4.0 / 29.0);
}
public static double code(double x) {
	return (7.787037037037037 * x) + 0.13793103448275862;
}
def code(x):
	return ((841.0 / 108.0) * x) + (4.0 / 29.0)
def code(x):
	return (7.787037037037037 * x) + 0.13793103448275862
function code(x)
	return Float64(Float64(Float64(841.0 / 108.0) * x) + Float64(4.0 / 29.0))
end
function code(x)
	return Float64(Float64(7.787037037037037 * x) + 0.13793103448275862)
end
function tmp = code(x)
	tmp = ((841.0 / 108.0) * x) + (4.0 / 29.0);
end
function tmp = code(x)
	tmp = (7.787037037037037 * x) + 0.13793103448275862;
end
code[x_] := N[(N[(N[(841.0 / 108.0), $MachinePrecision] * x), $MachinePrecision] + N[(4.0 / 29.0), $MachinePrecision]), $MachinePrecision]
code[x_] := N[(N[(7.787037037037037 * x), $MachinePrecision] + 0.13793103448275862), $MachinePrecision]
\frac{841}{108} \cdot x + \frac{4}{29}
7.787037037037037 \cdot x + 0.13793103448275862

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[\frac{841}{108} \cdot x + \frac{4}{29} \]
  2. Simplified0.1

    \[\leadsto \color{blue}{7.787037037037037 \cdot x + 0.13793103448275862} \]
    Proof

    [Start]0.1

    \[ \frac{841}{108} \cdot x + \frac{4}{29} \]

    metadata-eval [=>]0.1

    \[ \color{blue}{7.787037037037037} \cdot x + \frac{4}{29} \]

    metadata-eval [=>]0.1

    \[ 7.787037037037037 \cdot x + \color{blue}{0.13793103448275862} \]
  3. Final simplification0.1

    \[\leadsto 7.787037037037037 \cdot x + 0.13793103448275862 \]

Alternatives

Alternative 1
Error1.3
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -0.018:\\ \;\;\;\;7.787037037037037 \cdot x\\ \mathbf{elif}\;x \leq 0.0175:\\ \;\;\;\;0.13793103448275862\\ \mathbf{else}:\\ \;\;\;\;7.787037037037037 \cdot x\\ \end{array} \]
Alternative 2
Error32.1
Cost64
\[0.13793103448275862 \]

Error

Reproduce?

herbie shell --seed 2023077 
(FPCore (x)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, A"
  :precision binary64
  (+ (* (/ 841.0 108.0) x) (/ 4.0 29.0)))