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

Update Nvector.cpp #4

Closed
wants to merge 1 commit into from
Closed

Conversation

Angeld55
Copy link

@Angeld55 Angeld55 commented Apr 6, 2023

The code for operator|| doesn't work if the second vector contains a zero.
Fixed the algorithm to handle this cases.

The code for operator|| doesn't work if the second vector contains a zero.
if (abs(coeff - curCoeff) > eps)
for (size_t i = 0; i < size; i++)
{
if (lhs[i] * rhs[i + 1] != lhs[i + 1] * rhs[i])
Copy link
Owner

Choose a reason for hiding this comment

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

Nice catch!

Yet, the proposed fix won't compile.
Perhaps we need to change the names "lhs" and "rhs" to "this.data" and "other.data"
accordingly.

Please, be aware that this repository is deprecated.
A lot of effort shall be put in, in order to make it reliable.

@Angeld55 Angeld55 closed this by deleting the head repository Jul 30, 2024
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.

None yet

2 participants