Unexpected arguments in a function

Hello, I'm studying C++ by two months using the book : Programming principles and practice using C++, at chapter 5 (the chapter about errors) the author explains differents source of errors, including this :

Unexpected arguments : Functions take arguments. If a function is given an argument we don't handle, we have a problem. An example is calling the standard library square root function with -1.2: sqrt(-1.2). Since sqrt() of a double returns a double, there is no possible correct value.

I know that the question may sound stupid but I do not understand. what the author intends to: Since sqrt () returns of a double to double, there is no possible correct value.
I thought that we could represent negative values with double. Or the author means to say that this is a logic error?

Sorry but I'm just a beginner and confused by this words.



He's just saying (in a very silly way in my opinion, if they are his words) that sqrt doesn't cater for complex numbers (and by complex numbers I mean mathematical complex).
http://en.wikipedia.org/wiki/Complex_number
Topic archived. No new replies allowed.