When the input is negativ for sqrt, nan is returned for some reason instead of a domain error.