HISE Logo Forum
    • Categories
    • Register
    • Login

    SNEX isnan

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 311 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.
    • griffinboyG
      griffinboy @ustk
      last edited by

      @ustk
      I ended up just writing a helper for it.
      I haven't experimented with external libs for Snex as I do stuff in the c++ directly so I'm not sure how that would be done.

      Christoph HartC 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart @griffinboy
        last edited by

        I would have to add a function to the Math library, but sounds reasonable. I can then also add a sanitize function that sets inf and nan to zero, which I‘m using alot in C++.

        ustkU 2 Replies Last reply Reply Quote 3
        • ustkU
          ustk @Christoph Hart
          last edited by ustk

          @Christoph-Hart Sounds good, I had to deal with a nan in Hise script too, so a Math method would be nice :thumbs_up:

          Can't help pressing F5 in the forum...

          1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @Christoph Hart
            last edited by

            @Christoph-Hart Bump ☺

            Can't help pressing F5 in the forum...

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @ustk
              last edited by

              @ustk I tried to implement isnan and isinf myself within snex_Math.h, it compiles but isn't recognised in SNEX...

              Can't help pressing F5 in the forum...

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @ustk
                last edited by

                @ustk There you go.

                4f7bc2dd-07e4-4e24-b61a-9e65fbc2e795-image.png

                I've also added a sanitize function which clears inf & nan values (and denormals) to zero. Available in both SNEX and HiseScript

                ustkU 2 Replies Last reply Reply Quote 1
                • ustkU
                  ustk @Christoph Hart
                  last edited by

                  @Christoph-Hart Youhou ! Merci beaucoup Chris !

                  Can't help pressing F5 in the forum...

                  1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @Christoph Hart
                    last edited by

                    @Christoph-Hart Strange I checked the commit and except the sanitise thing it's exactly what I tried, but not having the functions to work... Or maybe I used std_ instead of direct std

                    Can't help pressing F5 in the forum...

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @ustk
                      last edited by

                      @ustk Have you added them to the SNEX Math JIT object?

                      ustkU 1 Reply Last reply Reply Quote 0
                      • ustkU
                        ustk @Christoph Hart
                        last edited by

                        @Christoph-Hart Nah... Forgot that part !

                        Can't help pressing F5 in the forum...

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

                        12

                        Online

                        1.8k

                        Users

                        11.9k

                        Topics

                        103.9k

                        Posts