Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A simplier math formula
Message
Information générale
Forum:
Politics
Catégorie:
Autre
Divers
Thread ID:
01367448
Message ID:
01367713
Vues:
8
>Metin,
>
>> but online math calculator, my math. eng. friend and my daughter say -4... :(
>
>They are all wrong. The answer is 4.
>
>The unary negation operation has higher precedence than exponentiation.
>
>I order for the answer to be -4, the expression would have to be -(2**2) using parens in order to force the exponentiation to happen first.

This is a very interresting discussion. I would have gone along with you on the unary operator being a higher precedence than exponentiation. However, after reading this thread adn the supporting links to the various arguments I am beginning to agree with the idea that unary sign is at the precedence evel of multiplication and division.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform