haskell-numerics / hmatrix

Linear algebra and numerical computation
381 stars 104 forks source link

fix windows link error, issue #154 #155

Closed maxc01 closed 9 years ago

maxc01 commented 9 years ago

nrand48 doesn't exist in windows, instead we can use rand_s, which is more secure than rand

albertoruiz commented 9 years ago

Thanks for your help! I am not happy about the different random number generators available in each system.

maxc01 commented 9 years ago

Yes, me too, condition compiling is ugly. A complete random number library may be a little too fat for this simple purpose. I think a very small random number library is sufficient, a comprehensive random library is not necessary. A not too bad idea is to encapsulate existing code to unclutter the hmatrix code base. Different system has different mechanism to generate number number, I think generating random number has to be a system specific task unfortunately.