Fast approximation operators in gen~ Max 7


    Dec 15 2014 | 2:17 pm
    Hello!
    Can you please shed a light on the nature of fast approximation operators (sin, cos, tan, pow, exp) added to gen~ in Max 7. I know that Max 6 gen~ uses standard C math.h library for this operators. Can you provide me with info on how faster this approximation operators compared to ones in standard math.h library? I haven't noticed any processing speed increase in Max 7 compared to Max 6.1.9 using my gen~ project.
    This is really a one feature I'd interested in apart of design change to buy the new version of Max.
    regards, Ruslan

    • Dec 15 2014 | 5:21 pm
      these are really not a reason to upgrade or not.
      i have not measured exactly, but used extensively, and the approximations are much, much faster and quite a lot cheaper. and a very very welcome addition to Gen.
      however, as with all approximations the tradeoff is accuracy. they are not very accurate. just substituting them in for pure math operations will not often work, especially for tuning and time sensitive operations such as feedback loops/delays/reverbs, filter coefficients, pitch, etc.
      you really need to design algorithms around them.
      for the code, just stick them in a gen~ and codexport them.
      remember, gen~ is a 64-bit doubles only environment, which means approximations are never going to be super cheap.
    • Dec 15 2014 | 6:09 pm
      Thank you STKR, I think this is quite reasonable choice to use in the project, as I have a lot of cos real-time calculations. Haven't checked the manual already on this approximations but what is the proper operator names and their syntax for codebox? For example for cos operator?
    • Dec 15 2014 | 7:12 pm
      I think you guys misunderstood each other. if you want fast approximation you should build a lookup table (data object in gen) to your taste. there are many ways of improving accuracy, and most of them are on net. for example http://lab.polygonal.de/?p=205