Skip to content

Centralize floating-point conversion and implement isapprox#59

Merged
timholy merged 2 commits intomasterfrom
teh/approx
Oct 9, 2016
Merged

Centralize floating-point conversion and implement isapprox#59
timholy merged 2 commits intomasterfrom
teh/approx

Conversation

@timholy
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

This looks good thank you for tackling this.

@tkelman
Copy link
Copy Markdown
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
Copy Markdown
Member Author

timholy commented Aug 5, 2017

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

@tkelman
Copy link
Copy Markdown
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