[Insight-developers] problem with vnl_sample

Bill Hoffman bill.hoffman at kitware.com
Mon Nov 13 09:22:17 EST 2000


I will make sure this is fixed.  Thanks for the bug report.


At 02:46 PM 11/10/00 -0800, Lydia Ng wrote:
>Hi,
>
>I was hoping to use the vnl_sample_uniform()
>function to generate random numbers.
>But, in VC++ it always return 0.
>
>The problem is in lines 18-20 of vnl/vnl_sample.cxx
>
>   static unsigned long seed = 12345;
>   seed = (seed*16807)%2147483647L;
>   double u = seed/2147483711;
>
>In the last line, seed needs to be cast to a double.
>
>Who looks after the vnl stuff?
>Can someone fix this in the repository for me?
>
>Thanks,
>Lydia
>
>
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers 





More information about the Insight-developers mailing list