Clear[r, len, lenn, alpha, prec];
r = 0;
prec = 50;
len = 2;
lenn = len - 1;
If[r < len - 1, <-----problem here, I can change "len-1" to "lenn" and it still has a problem, if I change it to "len" it works
alpha = N[r, prec] <---simplified here, but I want to run multiple lines of code if this condition is true, maybe there's a "better" way to do this?
Hi all, I'm new to mathematica and have to program an algorithm for a maths class. We have minimal training in mathematica, focusing more on the maths, but this is a simplification of some code that is giving me problems I just cannot comprehend.
Basically, the variable "alpha" keeps showing up in blue as not recognised, unless I set the "len-1" to len. Why is it doing that?