Why? If Occam's razor doesn't see any parentheses why should there be any
parentheses? e.g. there is no sine() or cosine() function in that expression either,
so why anticipate for them?
Why? If Occam's razor doesn't see any parentheses why should there be any
parentheses? e.g. there is no sine() or cosine() function in that expression either,
so why anticipate for them?
Because "plz gimme teh c0des for a plus b divided by c minus d" is not likely to be a-d+(b/c) . Just like 1 divided by 1 plus x != (1/1) + x . And it is not the absolute truth, but supposition.
Because "plz gimme teh c0des for a plus b divided by c minus d" is not likely to be a-d+(b/c) . Just like 1 divided by 1 plus x != (1/1) + x . And it is not the absolute truth, but supposition.
Parentheses are only needed if you need to override the normal order of operations. Multiplication and division have higher priority than addition and subtraction, so
P = w + x/y - z
is the same as
P = w + (x/y) - z
which is the same as
P = (w + (x/y)) - z
Basically, without any parenthesis, the program will first divide x by y, then it will add that to w and lastly it will subtract z.
If you need it to do things differently then you'll need parenthesis. But you didn't really provide enough information to know what order you need the things to be carried out in.
But you didn't really provide enough information to know what order you need the things to be carried out in.
Actually newb16 didn't provide any information because they are not the original poster they are commenting on the solution proposed by Jos saying they think it is likely that some parentheses may be required. I suspect newb16 is fully aware of the significance of parentheses or lack their of.
Personally I am with Jos on this, why try to second guess what someone who can't be bothered to do there own work really means. I will be quite surprised if we get any follow up from the OP.
Comment