im trying to write a gcd (Stein's algorithm) in TCl and i'm using '&' as a bitwise operand so i can check if the number is odd or even, by multiplying the number (bitwise) by 1 (result 0 is even, 1 is odd) when i run the code in linux using genus, it keeps giving me the error :
'can't use non-numeric strin as operand of '&' '
im very new to TCL, does anybody can help how to solve this?
Thanks in advance
i looked for an answer but i didnt really find...
Please give the exact code which is causing your problem.
You're probably expressing a binary number incorrectly.
Here are some examples which show that expression a binary 1 as "b1" is not allowed because it should be "0b1", or just 1!