Wouldn’t we just assume function expressions are always “in parenthesis”? Then it’s just a substitution and no rules were changed.
Comment on I dunno
Truscape@lemmy.blahaj.zone 2 weeks agoSome forms of programming syntax, although there are the fringe cases where an equation is represented by a symbol in conjunction with a parentheses input.
For example:
y(x) = 2x+3
5+y(1) = 10, as 1 is substituted in for x in the prior equation.
moriquende@lemmy.world 2 weeks ago
SmartmanApps@programming.dev 3 days ago
Wouldn’t we just assume function expressions are always “in parenthesis”?
No, because factorised Terms also are, ab+ac=a(b+c).
moriquende@lemmy.world 3 days ago
But factorised terms are multiplications, so they’re still following the same rules: a(b+c) = a*(b+c)
Example: 2(3+5)=16, and also 23+25=16
SmartmanApps@programming.dev 3 days ago
But factorised terms are multiplications,
No, they’re Distribution done in the Brackets step, a(b+c)=(ab+ac), now solve (ab+ac)
a(b+c) = a*(b+c)
Nope! a(b+c)=(ab+ac). 1/a(b+c)=1/(ab+ac), but 1/ax(b+c)=(b+c)/a.
23+25=16
(23+25) actually, or you’ll get the wrong answer when it follows a Division sign. See previous point
TheBlackLounge@lemmy.zip 2 weeks ago
And in some languages a number can be used as a name of a variable or a function, so it can be anything really
SmartmanApps@programming.dev 3 days ago
Not in Maths it can’t
No, it can only be a Factorised Term, ab+ac=a(b+c). You also can’t call a function by any letter that you’ve used as a pronumeral
MotoAsh@piefed.social 2 weeks ago
Not in most programming languages, though. You cannot start names with a number. Unless you’re using some strange character that merely looks like a number, anyways. Programming with unicode can get weird but generally works without issue these days.