[GRASS-dev] r.random still broken on Mac
William Kyngesburye
woklist at kyngchaos.com
Mon Oct 2 03:39:31 EDT 2006
On Sep 30, 2006, at 2:46 AM, Glynn Clements wrote:
>
> William Kyngesburye wrote:
>
>> I just did a quick test - removed __APPLE__ from r.random, so it uses
>> the extern lrand48. I now get a random distribution.
>
> So it's the fake lrand48() that's causing problems?
>
> Doh.
>
...
> Can you try this instead:
>
> #define lrand48() (((long) rand() ^ ((long) rand() << 16)) &
> 0x7FFFFFFF)
>
That works.
So, was there some other reason to use the fake lrand48() on OS X,
since the real one seems to work?
-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/
"Mon Dieu! but they are all alike. Cheating, murdering, lying,
fighting, and all for things that the beasts of the jungle would not
deign to possess - money to purchase the effeminate pleasures of
weaklings. And yet withal bound down by silly customs that make them
slaves to their unhappy lot while firm in the belief that they be the
lords of creation enjoying the only real pleasures of existence....
- the wisdom of Tarzan
-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/
All generalizations are dangerous, even this one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20061002/eac1a8cc/attachment.html
More information about the grass-dev
mailing list