Machine-translated by Google. Questions are authored in English.
Top

Discussion

If the result overflows, the function returns the value of the macro HUGE_VAL, carrying the same sign except for the_________ function as the correct value of the function.

  • A.sin
  • B.cos
  • C.cosec
  • D.tan

Answer: D

Correct answer: tan

On overflow a maths function returns HUGE_VAL with the same sign as the true result - but tan is the exception. Its overflow happens at a pole, where the function runs to \(+\infty\) on one side and \(-\infty\) on the other, so an argument only slightly to one side or the other of \(\pi/2\) gives opposite signs. With the argument itself known only approximately, the sign cannot be relied on.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.