Skip to content

Centralize floating-point conversion and implement isapprox #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 9, 2016

Conversation

timholy
Copy link
Member

@timholy timholy commented Oct 8, 2016

This tries to be a little more consistent about which floating-point type (Float32 or Float64) we use for conversions. As a consequence, this has the possibility of being breaking ☹️, but I personally think it's worth it. I'll give others a chance to chime in before merging.

Also implemented isapprox so x ≈ y works nicely in tests (by default, allowing a 1-eps difference).

By default it asks whether two FixedPoints are within eps of each other. Handy in testing.
@vchuravy
Copy link
Collaborator

This looks good thank you for tackling this.

@tkelman
Copy link
Contributor

tkelman commented Aug 5, 2017

Guess nobody has complained for almost a year, but this supported 0.4 and has been giving ambiguity warnings there.

@timholy
Copy link
Member Author

timholy commented Aug 5, 2017

Is there anything we need to do? The current FPN requires Julia 0.5.

@tkelman
Copy link
Contributor

tkelman commented Aug 5, 2017

Right but the last 0.4-supporting versions was after this. If it's a one liner to fix, might be worth backporting to a branch off that last 0.4-supporting version and doing one last tag in that old minor series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants