Skip to content

Conversation

@nicoonoclaste
Copy link
Collaborator

Based off #62
Thanks to @astronouth7303 for writing the initial version of the test.

@pathunstrom If you confirm that the issue uncovered by Hypothesis is a bug, I can add commits fixing it to this branch.

@nicoonoclaste nicoonoclaste force-pushed the hypothesis/rotation branch 2 times, most recently from d4c8b15 to c738df3 Compare October 13, 2018 03:59
@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 @pathunstrom Actually, Hypothesis finds some annoying numerical instabilities even without the rounding (due to the way we compute rotate and angle).
Would it be reasonable to provide a more stable implementation in this PR, i.e. add tests that expose the problem (already done) then fix it?

@AstraLuma
Copy link
Member

I would say create a separate PR for it. If you discover more bugs, this PR could become large.

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 So, ship as-is and send another PR to fix the bug exposed by the test?

@AstraLuma
Copy link
Member

In the other order, yes.

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 Weird, but OK.

@nicoonoclaste
Copy link
Collaborator Author

#67 contains the first 2 commits, which fix the bug exposed by Hypothesis.

@nicoonoclaste
Copy link
Collaborator Author

nicoonoclaste commented Oct 17, 2018

Had to pull in #69: 5c6c1a9 wasn't a correct test of linearity -- it didn't test multiplication by a scalar -- and the corrected test had overflow issues with large scalars and large vectors.

@AstraLuma
Copy link
Member

The blocker for this right now is that I've found a clear failure of the linearity test.

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 I rebased and cleaned up the history a bit (the resulting diff is equivalent, though).

Also, I noticed that the comment on the example you provide says “Rotation must not be an multiple of 90deg”, while you set angle=45.

@AstraLuma
Copy link
Member

Yes, in order to trigger the test case, the angle must not be axis-aligned (0, 90, 180, 270, etc). So the demo data uses 45deg as the sample.

I listed out the rules of how to trigger the bug, as best as I could discover them.

@nicoonoclaste
Copy link
Collaborator Author

Oh, yes, I'm very good at reading and missed the “not” there. Sorry

`rel_to` (“relative to”) specifies additional values that `rel_tol` (relative
tolerance) should be applied against.
@nicoonoclaste
Copy link
Collaborator Author

Finally fixed <3

@AstraLuma
Copy link
Member

Sweet! Is there anything else that needs to happen?

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 Not for this branch? Tests pass :D

@AstraLuma AstraLuma merged commit f08c4e6 into ppb:master Dec 9, 2018
@nicoonoclaste nicoonoclaste deleted the hypothesis/rotation branch December 9, 2018 09:39
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.

2 participants