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

[decompiler] output optimized div-as-inverse-mult as divisions #3591

Open
ManDude opened this issue Jul 17, 2024 · 0 comments
Open

[decompiler] output optimized div-as-inverse-mult as divisions #3591

ManDude opened this issue Jul 17, 2024 · 0 comments
Assignees
Labels
decompiler Decompiler Related enhancement New feature or request messy-decomp Decompiler outputs correct but messy code

Comments

@ManDude
Copy link
Member

ManDude commented Jul 17, 2024

This is already handled in the compiler and would make some code much easier to read. e.g.:

(f1-1 (* 0.33333334 (- 1.5 (* 0.00024414062 f0-0))))

becomes

(f1-1 (/ (- 1.5 (/ f0-0 4096)) 3))
@ManDude ManDude added enhancement New feature or request messy-decomp Decompiler outputs correct but messy code decompiler Decompiler Related labels Jul 17, 2024
@ManDude ManDude self-assigned this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decompiler Decompiler Related enhancement New feature or request messy-decomp Decompiler outputs correct but messy code
Projects
Status: No status
Development

No branches or pull requests

1 participant