Dividing factorials on 15C CE
|
01-10-2024, 07:17 PM
Post: #18
|
|||
|
|||
RE: Dividing factorials on 15C CE
(01-10-2024 05:36 PM)Valentin Albillo Wrote: Or are you quoting some other expression/program ? I must admit that I was concerned grouping the terms like that. But while we had the discussion about implied multiplication and order of precedence I'm not aware of any programming language that changes the order based on whitespace. The reason I've added the Python code is that: Code: p *= n … and: Code: p *= n // m … are not the same. The expression is to be calculated strictly from left to right. Yes, I know that division is not associative. But in general it is considered left associative. The same with subtraction. I assume that \(a - b + c\) is interpreted as \((a - b) + c\) and not as \(a - (b + c)\). Otherwise writing polynomials becomes clumsy. I'm a bit surprised that this confused you. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)