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

Handle subtractions and use MacroTools #7

Merged
merged 2 commits into from
Jul 15, 2018
Merged

Conversation

devmotion
Copy link
Member

The latest PR some days ago reminded me that I wanted to resolve #5 quite some time ago. Finally I took the time and came up with a rewritten implementation using MacroTools which handles subtractions as well. Hopefully the use of MacroTools can improve both the readability and further development of this package.

@coveralls
Copy link

coveralls commented Jul 15, 2018

Coverage Status

Coverage decreased (-2.9%) to 97.143% when pulling edc2efb on macrotools into ce4b244 on master.

else
ex.args[2:end]
:($(Meta.quot(Base.muladd))($x, $y, $z))
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why quoting is needed here and whether that's the correct way to handle the application of @. macros. But it was the only way I could get it to work besides expanding @. macros immediately which in my opinion should not be required (or at least feels a bit suboptimal).

@ChrisRackauckas
Copy link
Member

Wow, that is much simpler. I am enjoying it.

@ChrisRackauckas ChrisRackauckas merged commit d877284 into master Jul 15, 2018
@devmotion devmotion deleted the macrotools branch July 15, 2018 16:11
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

Successfully merging this pull request may close these issues.

Multiply-add with minus signs doesn't get converted to muladd
3 participants