Skip to content

Testing new release candidate for approx #1581

Description

@jonaspleyer

Hi everyone,

I have released 0.6.0-rc1 of the approx crate. It is the first release after 4 years and contains several new features while still utilizing the same test-suite. In particular I am aiming at full backwards-compatibility. Therefore, I would love to get some feedback, even if it just is that the new version still works with ndarray. Feel free to let me know who I should also address within the ndarray ecosystem.

I have just cloned the repo and tested it with the new approx version and it seems to work flawlessly.

I am also open to feature suggestions and other feedback.

Activity

  1. akern40 commented on Jan 31, 2026

    @akern40
    Collaborator

    Congratulations on the upcoming release! Do you have release notes or a changeling that I can look through to see what's different?

  2. jonaspleyer commented on Feb 1, 2026

    @jonaspleyer
    Author

    So far I have not come around to provide a changelog. Since this has been asked frequently I will aim to provide one and keep you updated.

  3. jonaspleyer commented on Feb 2, 2026

    @jonaspleyer
    Author

    I have now added a CHANGELOGmd to the repository.
    https://github.com/brendanzab/approx/blob/master/CHANGELOG.md

    Are you in principle interested in implementing the traits AbsDiffEq, RelativeEq and ULPs directly for the ArrayRef<..> struct itself? This could be done by putting it into the approx crate with a very loose dependency such as ndarray >= "0.15.0" which would provide better compatibility for users. I saw that there are a few methods which are already implemented on ArrayRef
    https://docs.rs/ndarray/latest/ndarray/struct.ArrayRef.html#method.abs_diff_eq

  4. akern40 commented on Feb 14, 2026

    @akern40
    Collaborator

    Thanks for the changelog! These traits actually are already implemented on ArrayRef; the link you provided is a shortcut method we provide for ease-of-use.

    As best I can tell, 0.6.0-rc2 works well for us.

  5. jonaspleyer commented on Feb 14, 2026

    @jonaspleyer
    Author

    Thanks for testing the new release. I would like to leave this issue open since we have one more bugfix which might introduce a breaking change. I will keep you updated.

    brendanzab/approx#65

  6. jonaspleyer commented on May 13, 2026

    @jonaspleyer
    Author

    Hi @akern40 the proposed design for approx 0.6 requires an additional trait function to specify the default epsilon value for relative_eq comparisons.

    This would require small code additions in the form of:

    fn default_relative_epsilon() -> T::Epsilon {
        T::default_relative_epsilon()
    }

    within (only) the RelativeEq trait.

    The new default values will require a change in src/array_approx.rs. But my question is the following: Do your foresee any problems related to this breaking API? I want to be extra careful when making this change. Hence I am asking in advance.

    brendanzab/approx#102

    Addendum: I implemented the necessary changes in
    jonaspleyer@f265e8e and jonaspleyer@cb990a4

  7. akern40 commented on Jun 6, 2026

    @akern40
    Collaborator

    I @jonaspleyer, sorry for the delayed response, it's been a while since I was able to look at ndarray stuff. I took a quick look over the explanations from the linked approx discussions, seems like the core issue is that there are some implantation problems with small numbers, and the proposed solution is to make a breaking change. As best I can tell, you're adding a default epsilon trait so that there is an escape hatch from the fix; it will default to the new fix, but users can also add an argument to provide their own epsilon values and therefore get old behavior back?

    If that is correct, then I think this is a clear change, and when 0.6.0 comes out I'm good with ndarray bumping and doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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