At Fri, 3 Aug 2007 01:40:58 +0530 (IST),
[EMAIL PROTECTED] 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


_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to