Call to member function 'pow' is ambiguous
-
While compiling the SNEX node as a DSP Network dll, Hise complains about this:
❌ call to member function 'pow' is ambiguous input = input - 0.33 * drive * Math.pow(input, 3.0);
Does it mean it uses too much cpu? I am seeing 1% while using it on Hise. But when it comes to compiling as DSP Network, this happens. Any hints please?
-
"ambiguous" means that it can't find the correct function because you have a subtle type mismatch. In this case the first argument to the pow call is a
float
number (the input in themath.expr
node is single precision) and the second one isdouble
precision. You should use0.3f
instead then it should work (in the meantime you can also change0.33
to0.33f
or there will be another unnecessary type conversion. -
@Christoph-Hart Thank you so much for the clarification. Now Understood :)