[Solved] call to ‘pow’ is ambiguous

The error means there is not a version of the function which takes the type you are passing, but instead there are more than one version taking a type that could be converted to (like float and double). The compiler doesn’t know which you want. There is not an int version of this function, but … Read more

[Solved] Comparing 2 different scenarios on 2 different architectures when finding the max element of an array

I think you’re really trying to ask about branchless vs. branching ways to do m = max(m, array[i]). C compilers will already compile the if() version to branchless code (using cmov) depending on optimization settings. It can even auto-vectorize to a packed compare or packed-max function. Your 0.5 * abs() version is obviously terrible (a … Read more