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

Issues with log implementation for Neon #151

Open
christophe0606 opened this issue Jan 30, 2024 · 3 comments
Open

Issues with log implementation for Neon #151

christophe0606 opened this issue Jan 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@christophe0606
Copy link
Contributor

vlogq_f32 is used directly to implement the arm_vlog_f32.
But vlogq_f32 being based on Taylor expansion for Neon, it can be used only for a limited range of the argument. So arm_vlog_f32 should not use it directly but apply some scaling when the argument is not in the right range.

@Gao-HaoYuan
Copy link

I've conducted some tests, and when the value is very close to 1, there are significant differences in the calculation results. It might be beneficial to pay attention to values close to 1, such as 1.000000119, 1.00000119, and 0.9999911.

This critical issue :
I extracted the code for vlogq_f32 from CMSIS-DSP, When calculating log(1.000000119), the result is -0 instead of +0.

@christophe0606
Copy link
Contributor Author

@Gao-HaoYuan I think we should do something like computing log(1.000000119/2) + log(2)

I need to study the Taylor expansion used to find the right bounds for the argument.

@Gao-HaoYuan
Copy link

Gao-HaoYuan commented Jan 30, 2024

Log_test.zip

@christophe0606
This is a code example that requires modification of the IP and NDK addresses.

I attempted to understand the coefficients of the Taylor expansion in the log, but I couldn't figure out the source of the coefficients in the code. It might be a special value from (x-n) of the Taylor expansion. If I have the time, I will also try to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants