Re: [Boost-bugs] [Boost C++ Libraries] #7779: uniform_on_sphere returns nan in certain (rare) cases

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7779: uniform_on_sphere returns nan in certain (rare) cases
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-14 22:37:32


#7779: uniform_on_sphere returns nan in certain (rare) cases
---------------------------------------------------+------------------------
  Reporter: Robert Gantner <rngantner@…> | Owner: no-maintainer
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: random
   Version: Boost 1.46.1 | Severity: Problem
Resolution: | Keywords: uniform_on_sphere, random
---------------------------------------------------+------------------------

Comment (by steven_watanabe):

 Actually it doesn't matter if sqsum is close to zero. As long as it isn't
 zero, there is no problem. (I suppose if sqsum were denormalized, it
 could be a problem, but normal_distribution doesn't produce denormalized
 numbers. I'm just going to add a test for zero. This shouldn't affect
 the performance in any noticeable way, since generating normal variates
 and dividing is much more expensive than a branch that is almost never
 taken.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7779#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC