Skip to content
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

Add float quickcheck implementations (fixes #45) #48

Merged
merged 3 commits into from
Sep 30, 2016

Conversation

mattico
Copy link
Contributor

@mattico mattico commented Aug 20, 2016

This builds on top of #43 to add Quickcheck helpers for floating point.

I generate a few different types of floats by constructing them from their component parts, using new functions defined on the Float trait. The Add implementation could be refactored to use these new functions for clarity.

@mattico mattico force-pushed the add_float_quickcheck branch 2 times, most recently from fbb4deb to a6d1ba7 Compare August 20, 2016 22:07
@mattico
Copy link
Contributor Author

mattico commented Aug 20, 2016

Interesting test failure here:
https://travis-ci.org/japaric/rustc-builtins/jobs/153852666#L15056

Slightly different results, possibly a rounding error?

Intriguing that it's the (only?) soft float target which has issues


// Generates values in the full range of the integer type
macro_rules! arbitrary {
($TY:ident : $ty:ident) => {
($id:ident: $ty:ty) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot that I left these changes in the commit. I can remove them if you prefer the current style.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to maintain the status quo for now just to reduce the noise in the diff. I don't have a strong preference for the name of the macro arguments.

@mattico mattico force-pushed the add_float_quickcheck branch 2 times, most recently from 4b6f32b to 8b135b3 Compare August 21, 2016 03:35
@japaric
Copy link
Member

japaric commented Aug 21, 2016

Interesting that only soft float arm target failed. That means that these intrinsics match the output of hardware instructions (the hard float arm targets pass) but don't match the output of libcompiler-rt.a's intrinsics?

@homunkulus
Copy link
Contributor

☔ The latest upstream changes (presumably #67) made this pull request unmergeable. Please resolve the merge conflicts.

@mattico mattico force-pushed the add_float_quickcheck branch from 28e5fe4 to 831074e Compare September 27, 2016 23:50
@mattico
Copy link
Contributor Author

mattico commented Sep 27, 2016

Rebased. I'll rebase again after #76 and #74.

@mattico
Copy link
Contributor Author

mattico commented Sep 27, 2016

I mostly just want to see if this works...
@homunkulus try

@japaric
Copy link
Member

japaric commented Sep 27, 2016

@mattico ah sorry homu is currently configured to only let me "try". Mostly because changing that default configuration is annoying :P.

@homunkulus try

@japaric
Copy link
Member

japaric commented Sep 27, 2016

@homunkulus try

(homu was out of sync :X)

@homunkulus
Copy link
Contributor

⌛ Trying commit 831074e with merge 831074e...

@homunkulus
Copy link
Contributor

💔 Test failed - status-appveyor

@mattico mattico force-pushed the add_float_quickcheck branch 3 times, most recently from 48b9a80 to 0180f60 Compare September 30, 2016 01:33
@mattico
Copy link
Contributor Author

mattico commented Sep 30, 2016

Rebased

@mattico mattico force-pushed the add_float_quickcheck branch 2 times, most recently from 8ba160f to a6c25f8 Compare September 30, 2016 02:53
@mattico
Copy link
Contributor Author

mattico commented Sep 30, 2016

Rebased on #74. Should be mergable now.

@mattico mattico force-pushed the add_float_quickcheck branch from fe11774 to 010d153 Compare September 30, 2016 19:29
@japaric
Copy link
Member

japaric commented Sep 30, 2016

@homunkulus try

@homunkulus
Copy link
Contributor

⌛ Trying commit 010d153 with merge 010d153...

@homunkulus
Copy link
Contributor

☀️ Test successful - status-appveyor, status-travis
State: approved= try=True

@japaric japaric merged commit e34a605 into rust-lang:master Sep 30, 2016
@japaric
Copy link
Member

japaric commented Sep 30, 2016

Awesome @mattico!

@mattico mattico deleted the add_float_quickcheck branch September 30, 2016 21:29
@mattico
Copy link
Contributor Author

mattico commented Sep 30, 2016

@japaric so is the plan to merge this into rust-lang/rust before doing more work on it?

@japaric
Copy link
Member

japaric commented Sep 30, 2016

I'm going to try to land this in rust-lang/rust, yeah. But feel free to keep working on it in the mean time 👍.

japaric pushed a commit that referenced this pull request Oct 1, 2016
This reverts commit e34a605, reversing
changes made to cab88e6.
@japaric japaric mentioned this pull request Oct 1, 2016
@japaric
Copy link
Member

japaric commented Oct 1, 2016

@mattico could you re-send this PR?

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