Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数学库有点杂糅 #3

Open
farteryhr opened this issue Sep 19, 2024 · 0 comments
Open

数学库有点杂糅 #3

farteryhr opened this issue Sep 19, 2024 · 0 comments

Comments

@farteryhr
Copy link

总体是顺便替换libc的做法了是吧【参见musl

比如,sin cos是走的土法制作小代码路线,pi reduction如此直白,sqrt来源于网红invsqrt土制,atan又是薅的分割那么多区间,条件二分超级加速,还管了fpexception的超完善版,pow也大规模,画风就不太一致【话说atan网红写法是CORDIC呀【

https://github.com/zephyrproject-rtos/zephyr/tree/main/lib/libc/minimal/source/math

https://github.com/picolibc/picolibc/blob/main/newlib/libm/math/s_atan.c

https://forums.developer.nvidia.com/t/weekend-project-fast-arctangent-computation-with-borchardts-algorithm/303546

https://personal.math.ubc.ca/~wetton/talks/archimedes22.pdf

https://www.dsprelated.com/showarticle/1052.php

供参考,为了显得更土制还可以进行相应删减【

最后,要不要还是对于wasm实际上有的sqrt稍微搞点条件编译让他用自带指令【毕竟wsam还是虚拟机的不然太慢了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant