Opened 7 years ago
Closed 7 years ago
#11454 closed Bugs (fixed)
uniform_on_sphere.cpp incorrect for 1D vectors
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | random |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: | mmoll@… |
Description
On OSX 10.10 with Boost 1.58, the boost::uniform_on_sphere distribution returns incorrect 1D "vectors" that have a magnitude that is not equal to 1. I believe that the bug exists from 1.56 onwards.
Attached is a minimum working example that demonstrates the bug.
Attachments (2)
Change History (7)
by , 7 years ago
Attachment: | mwe_osx.cpp added |
---|
follow-up: 2 comment:1 by , 7 years ago
I believe the error is a missing break statement in the 1D case of the switch.
I've got a patch ready to test, but I don't have direct access to the affected machine. I will follow up with the results when the test is run.
comment:4 by , 7 years ago
I added a pull request on github: https://github.com/boostorg/random/pull/21
comment:5 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
minimum working example of bug