Skip to content

Adding rules for rem2pi, mod2pi #18

@tkoolen

Description

@tkoolen

To get both rem2pi and mod2pi, it should be sufficient to just define a rule for rem2pi, as mod2pi is implemented in terms of rem2pi in Base. Unfortunately, rem2pi, with its RoundingMode argument, doesn't really fit the mold of functions accepting only numeric arguments (and thus having derivatives with respect to all of the arguments). I also don't really think it makes sense to define rules for the lower-level functions that are called in rem2pi (e.g., ieee754_rem_pio2, add22condh), as those seem more like implementation details.

Do you have any plans for how to handle this case? I can help implement this, but if you could give me an idea of what the required changes to DiffBase (and possibly dependent packages) would be, that would be very helpful.

Ref: JuliaDiff/ForwardDiff.jl#113.

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