Skip to content

Issues with %/% and %% and division by 0 #349

@DavisVaughan

Description

@DavisVaughan
duration_years(5) %/% 0
duration_years(5) %/% duration_years(0)

duration_years(5) %% 0
duration_years(5) %% duration_years(0)

These are all undefined C++ behavior and crash the session, but we should return missing values

In particular we should be consistent with 2L %/% 0L = NA rather than 2 %/% 0 = Inf since infinite durations are not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions