| Alternative 1 | |
|---|---|
| Accuracy | 74.9% |
| Cost | 456 |
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+44}:\\
\;\;\;\;200 \cdot x\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-7}:\\
\;\;\;\;y \cdot -200\\
\mathbf{else}:\\
\;\;\;\;200 \cdot x\\
\end{array}
\]
(FPCore (x y) :precision binary64 (* 200.0 (- x y)))
(FPCore (x y) :precision binary64 (* 200.0 (- x y)))
double code(double x, double y) {
return 200.0 * (x - y);
}
double code(double x, double y) {
return 200.0 * (x - y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 200.0d0 * (x - y)
end function
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 200.0d0 * (x - y)
end function
public static double code(double x, double y) {
return 200.0 * (x - y);
}
public static double code(double x, double y) {
return 200.0 * (x - y);
}
def code(x, y): return 200.0 * (x - y)
def code(x, y): return 200.0 * (x - y)
function code(x, y) return Float64(200.0 * Float64(x - y)) end
function code(x, y) return Float64(200.0 * Float64(x - y)) end
function tmp = code(x, y) tmp = 200.0 * (x - y); end
function tmp = code(x, y) tmp = 200.0 * (x - y); end
code[x_, y_] := N[(200.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(200.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]
200 \cdot \left(x - y\right)
200 \cdot \left(x - y\right)
Results
Initial program 100.0%
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 74.9% |
| Cost | 456 |
| Alternative 2 | |
|---|---|
| Accuracy | 50.6% |
| Cost | 192 |
herbie shell --seed 2023137
(FPCore (x y)
:name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
:precision binary64
(* 200.0 (- x y)))