SULTHAN: no prave v tom "typicky" je ten problem, ze. Kdyz si to nekteri definuji jednim, a jini druhym zpusobem, tak vznika nejednoznacnost (pokud definice neni soucasti zadani). Ale to uz je prece popsane i v tom odkazu na wiki co daval
BROUKOID:
"In some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2n equals 1 ÷ (2n), not (1 ÷ 2)n.[1] For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division,[20] and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics.[d] This ambiguity is often exploited in internet memes such as "8÷2(2+2)" that is often misinterpreted to be 1=8÷[2(2+2)]≠8÷2(2+2)=4×4=16.[21]"
Takze zrovna jisty docela dulezity casopis, Physical Review, to definuje a ten zapis 20/5(2*2) je v ramci toho casopisu uplne jednoznacny. A ten zapis se pouziva i na kazdem gymplu: 1/2x je vnimano jako (2x)^-1, malokdo rekne ze to je 0.5*x.
Takze imho jde o definici prednosti operatoru. Kdyz budes psat do Physrevu, tak 20/5(2*2) = 1. Kdyz to budes psat vyraz v pythonu, tak musis napsat 20/5*(2*2) a vysledek je 16.
Koukal jsem na kalkulacku co pouzivam na kupecke pocty - speedcrunch, a ten implikovane nasobeni pouziva:
20/5(2*2)=1
20/5*(2*2)=16
(coz jsem ani netusil ze tuhle funkci ma, ale ja rad zavorkuju takze jsem asi nikdy o penize neprisel, aspon ne kvuli tomuhle :) )