-
Notifications
You must be signed in to change notification settings - Fork 5
More math fixes/workarounds and unit tests #11
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
Open
kblaschke
wants to merge
9
commits into
projectM-visualizer:master
Choose a base branch
from
kblaschke:more-fixes-and-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
More math fixes/workarounds and unit tests #11
kblaschke
wants to merge
9
commits into
projectM-visualizer:master
from
kblaschke:more-fixes-and-tests
+2,198
−34
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the base is 0 and the exponential is negative. Should be equivalent to ns-eel.
We want a no-op, just as in Milkdrop. Previously, freembuf() cleared the whole megabuf.
1. Fixed pow functions when it returns inf when the base is 0 and the exponential is negative. 2. Avoid log() and log10() function returning NaN or inf when it's 0. 3. Fixed pow_op, pow and invsqrt functions that intentionally returned NaN. 4. Removed sqr() cap. It's because of ns-eel2 adapts to 9 or 10 digits per value. Here is what it gives: 9999999 = 9999999 99999999 = 100000000 999999999 = 1000000000 9999999999 = 2147483648 10000000000 = 2147483648 (same gives it)
Dear lovely Copilot, I opened the PR and cannot review and approve it. Please stay away. (Edit for clarification: Copilot seemingly tried to add me to the reviewers list, which didn't work too well because I'm the author of the PR) |
revmischa
approved these changes
Aug 1, 2025
revmischa
approved these changes
Aug 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Working together with @OfficialIncubo to get projectm-eval closer to the behavior of ns-eel2, this PR contains another set of fixes and workarounds to unbreak some presets relying on the fact that using math functions in the wrong way does not return
NaN
orInf
in some cases.To make sure all functions and operators really work as expected, I've added unit tests for all functions which can be placed into the expression execution tree by the code compiler, including internal helpers like the expression list executor, variables and constants.