All you need is your library card. Was this helpful? Yes 6 No 0. Warning: Your browser has javascript disabled. Without javascript some functions will not work, including question submission via the form. When I square a negative number i. Why is this? Toggle menu visibility.
You can order fried eggs. Show 1 more comment. Emilio Novati Emilio Novati But honestly I think Mark asked him a different question than he intended because he didn't know the concept , especially considering how the title of this StackExchange question is formulated: "Is a negative number squared negative? I get things wrong all the time. Whether or not a particular person gets something wrong is not always a valid indicator that something is a problem.
This notation, like others have said, is a convention. It is still a good question to ask. Show 4 more comments. Pedro Destri Pedro Destri 2 2 silver badges 8 8 bronze badges. Add a comment. In programming languages, the parsing rules are generally these: Parentheses group a subtree together, no matter what happens around them. Function application is typically connected to parenthesis, so this also binds tighly.
Commata always separate independent subtrees. Hence the -3 in pow -3,2 is independent of the 2 and the pow function. Oh well This cost me a few bugs, and made me very frustrated with the language, which is why I immediately noticed the error here. Either one or the other has to go, for consistency's sake. Now as for precedence with spaced bindings Fixity is understood to actually assign tight-binding operators higher numbers, which makes more sense. DanielWainfleet DanielWainfleet This seems to be the one answer that actually explains why the order of precedence is absolute and not just a convention.
Upcoming Events. Featured on Meta. Now live: A fully responsive profile. The unofficial elections nomination post. You may be confused about whether you can square a negative number because what you can't do is take the square root of a negative number. This is because if a negative number had a square root, you would have to find a number that when you multiply it by itself, the result would come out negative. This can't happen because either that number would be positive and a positive times a positive is positive, or that number would be negative and a negative times a negative is also positive.
0コメント