Elektrine lite

← Feed

@SmartmanApps@dotnet.social

2023-10-30 10:36 UTC

@ingwar@mastodon.social No. Why would you say that?

Replies (1)

  • @SmartmanApps@dotnet.social I can answer that. You are saying that these have different answers: 8 / 2(3+1) and 8 / 2 * (3+1) You are saying that in the first case the 2 "binds to" the bracketed term and should be distributed first, before doing anything else. That means the first will evaluate to 8/(2*3+2*1) which is 1. But in the second case the division and multiplication must be evaluated left to right, being of equal precedence. Therefore the second evaluates to: (8 / 2) * (3+1) which is 16. So you are saying that the implicit multiplication in the first case has a higher precedence than the explicit multiplication in the second case. CC: @ingwar@mastodon.social

    Open ##5026466