D 2018-08-06T23:17:21.782 J assignee nobody J closer nobody J cmimetype text/plain J comment ::math::stats::proportional_weighted_shares\s--\r\n\s\s\s\s\s\s\s\s#\r\n\s\s\s\s\s\s\s\s#\sReturn\sthe\sproportional_weighted_shares\sfrom\squantity\sby\stwo\sor\smore\sgiven\sratios\r\n\s\s\s\s\s\s\s\s#\r\n\s\s\s\s\s\s\s\s#\sArguments:\r\n\s\s\s\s\s\s\s\s#\s\s\s\squantity\s\s\sfirst\svalue\sis\squantity\r\n\s\s\s\s\s\s\s\s#\s\s\s\sargs\s\s\s\s\s\s\ssecond,\sthird,\s\sand\ssucessive\svalues\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sare\stwo\sor\smore\sgiven\sratios\s(usually\sintegers\sin\shigh\sschool)\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sHowever,\sdecimal\sfractions\sfor\sboth\squantity\sand\sargs\sseem\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sto\sbe\sreasonably\saccurate\sto\sTCL\sprecison.\s\s\s\s\s\r\n\s\s\s\s\s\s\s\s#\sConditions\sand\sanswer\schecks\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sThe\squantity\smust\sbe\slarger\sthan\s0\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sThe\snumber\sof\sargs\smust\sbe\slarger\sthan\s2\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sIf\ssum\sof\sparts\sequals\szero,\sformula\sis\sundefined\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sNumber\sof\sparts\sshould\sbe\sequal\sto\s[\sllength\s$args\s]\s\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sTotal\svalue\sof\sparts\sshould\sbe\sequal\sto\squantity\sentry\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sThe\ssolution\smay\snot\sbe\sunique\sin\sthat\smore\sthan\sone\r\n\s\s\s\s\s\s\s\s#\s\s\s\s\s\s\sset\sof\sshares\smay\shave\sor\sgenerate\sthe\ssame\smultiple\sratios.\s\r\n\s\s\s\s\s\s\s\s#\sResults:\sparts\sof\squantity\sinto\sproportional\sweighted\sshares J foundin 8.6 J is_private 0 J login anonymous J priority 5\sMedium J private_contact 6a35629ae8c91b8189de05be9d12871d9ac9f8f9 J resolution None J severity Cosmetic J status Open J submitter anonymous J subsystem math\s::\sstatistics J title proportional\sweighted\sshares J type Patch K e6b26853885c35d26243793e917107fa6f47206d U anonymous Z 0a2f7f4f355333545803e2fd67164b6d