|
|
^
operator is binary xor, not power. You should use pow()
function or just multiply argument by itself (several times).1/ind_a
is equals to 0 because integer division is happening here. You should make one of the operands double to force compiler to use floating point division. Either declaring ind_a
/ind_b
as double
or using constant 1 as 1.0
will do this.