bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] 64 bit vs 32 bit: different answers


From: Brian Gough
Subject: Re: [Bug-gsl] 64 bit vs 32 bit: different answers
Date: Mon, 06 Aug 2007 12:19:38 +0100
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)

At Fri, 3 Aug 2007 01:40:58 +0530 (IST),
address@hidden wrote:
> We are building a computational software in C++ using gsl. The application
> is giving different answers for a 32 bit machine and for 64 bit machines.
> We tried with different processors and machines (intel and AMD) and came
> to conclusion that there is discrepancy in gsl. We have attached a small
> g++ program. It gives 2.07388e-317 as output for 64 bit machine and
> 4.86094e-270 as output for 32 bit machine.
> 
> GSL Version: 1.9
> Processor: Intel Dual Core
> Operating System: Ubuntu in all machines (64 bit machine has 64 bit ubuntu
> and 32 bit has 32 bit ubuntu)
> Compiler: g++ (GCC) 4.1.2
> Problem: Different output for 64 bit and 32 bit machines.
> Sample Program attached.

Your example program has several uses of uninitialised memory which
cause the output to be undefined -- for example, the usage of memcpy
is incorrect, and the function f should set the arrays y[] and
yprime[].  The program "valgrind" can be used to avoid problems like
these.

-- 
Brian Gough




reply via email to

[Prev in Thread] Current Thread [Next in Thread]