問題文
The Math class allows some of its floating-point methods an error bound of one or two units in the last place. What does it ask of such a method in return, and why?
選択肢
- It asks that the method be correctly rounded, because an approximation with an error above a half-unit is admitted only where no closer result can be represented at all
- It asks that the method report the bound it used, because an approximation with a wider bound has to let the caller pick the correctly rounded one of the two neighbors of the exact result
- It asks that the method hold within one unit at every argument, because an approximation is measured at the argument that gives the smallest error rather than at the worst of the whole set
- It asks that the method stay semi-monotonic, because an approximation not correctly rounded within that bound can still follow the way the exact function moves