...
While replacing numeric constants with a symbolic constant is often a good practice, it can be taken too far. In this compliant solution, for example, the quadratic theorem is provably correct with hard-coded Exceptions can be made for constants that are unlikely to changethemselves the abstraction you want to represent, as in this compliant solution.
Code Block | ||
---|---|---|
| ||
x = (-b + sqrt(b*b - 4*a*c)) / (2*a); |
...