Skip to content

Fixed operand order in declarg operator overloads - #123

Open
dbrundu wants to merge 1 commit into
MultithreadCorner:develop-hydra4from
dbrundu:bugfix/argoperators
Open

Fixed operand order in declarg operator overloads#123
dbrundu wants to merge 1 commit into
MultithreadCorner:develop-hydra4from
dbrundu:bugfix/argoperators

Conversation

@dbrundu

@dbrundu dbrundu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

While testing the NewtonianNoise repository, that uses Hydra as main dependency, I hit silently wrong numerical results traced to hydra/detail/FunctionArgument.h: the operator overloads for declarg types were correct for the commutative operators, but - and / operators returned the reciprocal of the intended values.

Changes:

  • Fix the two reversed bodies: a2 - a1.Value() and a2 / a1.Value().
  • Fix the reversed overloads' declared return-type operand order (Arg2 @ Arg1::value_type).

Verified with a minimal local reproducer; existing test suite passes.

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.

1 participant