Opened 16 years ago

Closed 16 years ago

#767 closed Bugs (Rejected)

log normal dist - error in _nsigma equation?

Reported by: nobody Owned by: jmaurer
Milestone: Component: random
Version: None Severity:
Keywords: Cc:

Description

Is there an extra "/_mean" in the equation for 
_nsigma on line 104 of lognormal_distribution.hpp?

i.e. shouldn't it be:
_nsigma = sqrt(log(_sigma*_sigma/_mean+result_type
(1)));

instead of:
_nsigma = sqrt(log
(_sigma*_sigma/_mean/_mean+result_type(1)));

??

Thanks for the great lib,
John Eddy (jpeddy@sandia.gov)

Change History (1)

comment:1 by jmaurer, 16 years ago

Status: assignedclosed
Logged In: YES 
user_id=53943

I believe it's correct as implemented, i.e. divide by the
square of the mean.

Do you have a pointer to some documentation or other
implementation that states otherwise?  If so, please reopen
the bug report and I'll have another look.
Note: See TracTickets for help on using tickets.