Skip to content

refactor: replaces the math functions with float based function from the standard namespace#1

Open
deepsource-autofix[bot] wants to merge 1 commit into
masterfrom
deepsource-autofix-2746f64d
Open

refactor: replaces the math functions with float based function from the standard namespace#1
deepsource-autofix[bot] wants to merge 1 commit into
masterfrom
deepsource-autofix-2746f64d

Conversation

@deepsource-autofix
Copy link
Copy Markdown

Calling math functions from the C libray that only accept double with float arguments causes an implicit type promotion of the float argument. Type promoting float to double costs extra space in memory, it also costs extra instructions for the conversion from float and lastly vectorisation of float is a lot more efficient compared to double.

…m the standard namespace

Calling math functions from the C libray that only accept `double` with `float` arguments causes an implicit type promotion of the `float` argument. Type promoting `float` to `double` costs extra space in memory, it also costs extra instructions for the conversion from `float` and lastly vectorisation of `float` is a lot more efficient compared to `double`.
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.

0 participants