Fast transcendent / trigonometric functions for Java

前端 未结 12 1822
面向向阳花
面向向阳花 2020-11-29 02:06

Since the trigonometric functions in java.lang.Math are quite slow: is there a library that does a quick and good approximation? It seems possible to do a calculation severa

12条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 02:45

    The java.lang.Math functions call the hardware functions. There should be simple appromiations you can make but they won't be as accurate.

    On my labtop, sin and cos takes about 144 ns.

提交回复
热议问题