Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A simplier math formula
Message
De
16/12/2008 10:01:01
 
 
À
16/12/2008 09:59:16
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
Information générale
Forum:
Politics
Catégorie:
Autre
Divers
Thread ID:
01367448
Message ID:
01367872
Vues:
8
From that site:

octave> -4^2
ans = -16

which matches my daughter's math worksheets.

and yours:

octave> -2**2
ans = -4


>>I believe that unary negation has a lower precedence than exponentiation. I think it is included in the rules for binary operations so it is not spelled out in PEMDAS.
>>
>>I don't think we can go by any programming language's rules of precendence because each language determines its own and it doesn't always match that of math .
>
>I think so it's a bug.
>
>>
>>For example, -4^2 = -(4^2) = -16 NOT (-4)^2 = 16
>>
>>That's from my daughter's math worksheets :o) So, if it is wrong, blame her teacher or the math books her teacher used :o)
>
>I asked a mathematic engineer. Her teacher should be wrong. But I think so math books her teacher used don't wrong. Maybe her teacher careless about that.
>
>Try this link too http://www.online-utility.org/math/math_calculator.jsp
>
>Microsoft accept that's an "unexpected positive number":
>http://support.microsoft.com/kb/q132686/
>
>
>>
>>
>>>Alan,
>>>
>>>Unary negation does have higher precedence than exponentiation! It also represents a subtraction from 0.
>>>
>>>You can't believe everything you read on the internet.
>>>
>>>>No David. In normal math, the unary operator does not have precedence because it actually represents a multiplication by -1. In other words, -2**2 is the same as saying -1*2**2 and since exponentiation takes precedence over multiplication, the correct answer is -4. For the record, I thought it was 4 at first too.
>>>>
>>>>Check this out: http://mathforum.org/library/drmath/view/69058.html
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform