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

Discussion

What error occurs if an input argument is outside the domain over which the mathematical function is defined?

  • A.domain error
  • B.range error
  • C.no error
  • D.domain and range error

Answer: A

Correct answer: domain error

A domain error occurs when an argument lies outside the set of values for which the function is defined - sqrt(-1) or asin(2). The function returns an implementation-defined value and sets errno to EDOM. A range error is the other case: the argument is fine but the result cannot be represented.

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

Post your comment

Please log in or register to post a comment.