?

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

?

\[x - \frac{3}{8} \cdot y \]
\[x - 0.375 \cdot y \]
(FPCore (x y) :precision binary64 (- x (* (/ 3.0 8.0) y)))
(FPCore (x y) :precision binary64 (- x (* 0.375 y)))
double code(double x, double y) {
	return x - ((3.0 / 8.0) * y);
}
double code(double x, double y) {
	return x - (0.375 * y);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x - ((3.0d0 / 8.0d0) * y)
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = x - (0.375d0 * y)
end function
public static double code(double x, double y) {
	return x - ((3.0 / 8.0) * y);
}
public static double code(double x, double y) {
	return x - (0.375 * y);
}
def code(x, y):
	return x - ((3.0 / 8.0) * y)
def code(x, y):
	return x - (0.375 * y)
function code(x, y)
	return Float64(x - Float64(Float64(3.0 / 8.0) * y))
end
function code(x, y)
	return Float64(x - Float64(0.375 * y))
end
function tmp = code(x, y)
	tmp = x - ((3.0 / 8.0) * y);
end
function tmp = code(x, y)
	tmp = x - (0.375 * y);
end
code[x_, y_] := N[(x - N[(N[(3.0 / 8.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(x - N[(0.375 * y), $MachinePrecision]), $MachinePrecision]
x - \frac{3}{8} \cdot y
x - 0.375 \cdot y

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.1

    \[x - \frac{3}{8} \cdot y \]
  2. Simplified0.1

    \[\leadsto \color{blue}{x - 0.375 \cdot y} \]
    Proof

    [Start]0.1

    \[ x - \frac{3}{8} \cdot y \]

    metadata-eval [=>]0.1

    \[ x - \color{blue}{0.375} \cdot y \]
  3. Final simplification0.1

    \[\leadsto x - 0.375 \cdot y \]

Alternatives

Alternative 1
Error17.7
Cost984
\[\begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+133}:\\ \;\;\;\;-0.375 \cdot y\\ \mathbf{elif}\;y \leq -2.9 \cdot 10^{+26}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-27}:\\ \;\;\;\;-0.375 \cdot y\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 310:\\ \;\;\;\;-0.375 \cdot y\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-0.375 \cdot y\\ \end{array} \]
Alternative 2
Error31.2
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023064 
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, A"
  :precision binary64
  (- x (* (/ 3.0 8.0) y)))