HISE Logo Forum
    • Categories
    • Register
    • Login

    Call to member function 'pow' is ambiguous

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 178 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by A Former User

      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?

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @A Former User
        last edited by

        "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 the math.expr node is single precision) and the second one is double precision. You should use 0.3f instead then it should work (in the meantime you can also change 0.33 to 0.33f or there will be another unnecessary type conversion.

        ? 1 Reply Last reply Reply Quote 1
        • ?
          A Former User @Christoph Hart
          last edited by

          @Christoph-Hart Thank you so much for the clarification. Now Understood :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          21

          Online

          1.8k

          Users

          11.9k

          Topics

          104.0k

          Posts