Skip to content

Floating point arithmetic 101 - it doesn't add up! aka Don't touch user input without telling them the rules #265

Closed
@pkofod

Description

@pkofod

For in-place methods my own mental picture is that it's expected that the cache arrays are touched, but that other input is left intact. That's why in-place methods often allow for extra cache variables when things should not allocate at all. However, these lines directly modify the input state, and as a result the parameter can drift simply from evaluations of Hv. If this is intentional, I think it should be documented.
https://github.com/JuliaDiff/SparseDiffTools.jl/blob/7b271eddbe4394fb63d10ddeb157be843051bd6b/src/differentiation/jaches_products.jl#L97C4-L101C18

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