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

i.gensigset: fix possible pole and divide by zero errors in regroup #4500

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 23, 2024

  1. i.gensigset: fix possible pole and divide by zero errors in regroup

    Using logarithm function call with zero argument will lead to
    a pole error, which occurs if the mathematical function has
    an exact infinite result.
    
    Check if the argument value is zero before passing that to
    the log function to avoid such errors. I also added check
    for negative numbers just to make sure the argument is in
    the right domain for the log function as well.
    
    There was also a possible divide by zero scenario when we
    were dividing the class data by subsum, which can be zero.
    Added a conditional check which avoids going to that stage.
    
    Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
    ymdatta committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    2b1b9e6 View commit details
    Browse the repository at this point in the history