フリー問題

Java SE 11 Developer のフリー問題 1 / 20 問目

問題文

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?

選択肢

  1. 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
  2. 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
  3. 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
  4. 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

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。