id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10110,boost::random::negative_binomial_distribution unnecessary restriction to IntType for parameter k,Maximilian Kleinert ,No-Maintainer,"Hi. In the implementation of boost::random::negative_binomial_distribution there is an unnecessary restriction to IntType for parameter k. A double parameter k will be casted to integer resulting in a different distribution than desired. If one compiles with -Wconversion a warning is given: warning: conversion to ‘int’ from ‘double’ may alter its value [-Wconversion] see attached example_file. This can lead to unwanted realization of a negative binomial distribution for non integer parameters k. Further there are no assertion checks on the parameters in instantiating a boost::random::negative_binomial_distribution object. These assertions are checked during the sampling process via boost::random::gamma_distribution. There (and in general for negative binomial distribution) the parameter k must be strictly greater than zero and not as mentioned in the documentation ""Requires: k >=0"". This can easily be extended by changing IntType to RealType in 5 occurrences regarding the parameter k. Thank you, Max P.S.: I compiled the example file with: g++ -Wconversion -o negbin_test -std=c++11 negbin_test.cpp",Bugs,new,To Be Determined,random,Boost 1.55.0,Problem,,"random, negative binomial distribution",