Skip to content

Enforce 0.0 * inf = 0.0#47

Open
martenlienen wants to merge 1 commit into
jeanfeydy:mainfrom
martenlienen:nans
Open

Enforce 0.0 * inf = 0.0#47
martenlienen wants to merge 1 commit into
jeanfeydy:mainfrom
martenlienen:nans

Conversation

@martenlienen

Copy link
Copy Markdown

In unbalanced OT with small reach, f can become inf in some cases which should not matter because it is multiplied by 0 (alpha is 0 in the cases where f is inf in my experience). But without this fix, we multiply 0.0 * inf which is NaN in floating point numbers instead of 0.

@mvinyard

Copy link
Copy Markdown

Thanks @martenlienen - I found this patch quite useful.

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.

2 participants