On Tue, Jan 11, 2011 at 11:50:14AM +0100, jdzstz - gmail dot com wrote:
>About all the problems with drand48, explained in:
> * http://www.cygwin.com/ml/cygwin/2010-12/msg00460.html
>
>Christopher Faylor fixed it in 20101229 snapshot:
>http://www.cygwin.com/snapshots/winsup-changelog-20101226-201
About all the problems with drand48, explained in:
* http://www.cygwin.com/ml/cygwin/2010-12/msg00460.html
Christopher Faylor fixed it in 20101229 snapshot:
http://www.cygwin.com/snapshots/winsup-changelog-20101226-20101229
I have realized that the fix does not work as expected, it is used
thr
About drand48() (and erand48) returns only zeros and pthread
application problems, I send this mail to both cygwin and newlib
mailist.
I have compared Cygwin with FreeBSD function implementation:
=> In Cygwin newlib, srand48 and drand48 use "__rand48_seed" and
"__rand48_mult
On Wed, Dec 29, 2010 at 03:47:42AM +0100, Jorge D?az wrote:
>I am working with cygwin environment (Cygwin 1.7.7 + Newlib 1.18)
>where drand48 function returns always zero values.
>
>The problem was reported in 2004 at cygwin mailist:
>1) http://cygwin.com/ml/cygwin/2004-11/msg00488.html
>2)
Thanks Igor, Dave and Teun!
I was missing the call to srand48(0); that "unlocked"
both drand48 and erand48. My code (at least the random
number part) is now working.
In case anyone else is trying to do something similar
a working snippet is below.
Thanks to everybody who took time to help!
Rober
On Fri, Nov 12, 2004 at 07:35:29PM +0100, Teun Burgers wrote:
>meadmaker1066-cyg
>>drand48 and erand48 return only 0.0 no matter how many times I call
>>them.
>
>Indeed. Calling srand48 to set the seed helps, but should not be
>necessary.
From the linux man page:
The srand48(), seed48()
Thanks for the prompt reply!
At 12:55 PM 11/12/2004 -0500, you wrote:
>If you're using C++, why use stdio functions?
The program has some modules from an older C program
and some from a C++ program. I just hadn't converted
all of the code. I left the headers in because in my
finished program I'd
[EMAIL PROTECTED] wrote:
drand48 and erand48 return only 0.0 no matter how many
times I call them.
Indeed. Calling srand48 to set the seed helps, but should
not be necessary.
Teun
#include
#include
int main(int argc, char *argv[])
{
int i;
srand48(0);
for (i = 0; i< 20; i++) {
> -Original Message-
> From: cygwin-owner On Behalf Of meadmaker1066-cyg
> Sent: 12 November 2004 15:42
> drand48 and erand48 return only 0.0 no matter how many
> times I call them. The code works fine on the Linux
> computers at school, and the compiler does not report
> any errors or war
On Fri, 12 Nov 2004, meadmaker1066-cyg wrote:
> drand48 and erand48 return only 0.0 no matter how many
> times I call them. The code works fine on the Linux
> computers at school, and the compiler does not report
> any errors or warnings.
> [anip]
>
> #include
> #include
>
> #include
drand48 and erand48 return only 0.0 no matter how many
times I call them. The code works fine on the Linux
computers at school, and the compiler does not report
any errors or warnings.
The mailinglist archives seem to have cases where
these functions are missing entirely or return errors,
but that
11 matches
Mail list logo