Skip to content

Adjust modulus/remainder calculation for infinity arguments #187

Closed
@jeremyevans

Description

@jeremyevans
require 'bigdecimal'
bd = BigDecimal("4.2")
bd.remainder(BigDecimal("+Infinity")) # => NaN, should be bd
bd.remainder(BigDecimal("-Infinity")) # => NaN, should be bd

See https://bugs.ruby-lang.org/issues/6120

I've submitted a pull request to ruby to fix the issue with Integer/Float, but bigdecimal should be handled separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions