This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Need help!


balaji.srinivasan.1 wrote:
> 
> Hello,
> I had two questions.Please do reply if you have the reply to any one of
> them.Both pertain to gcc on RedHat Linux 6.0
> 1)Though sizeof(long double) gives 12 and sizeof(double) gives 8 the
> precision seems to be exactly the same!!!(around 1e-18).After 18 decimal
> places the calculation goes awry.It works fine on say, Solaris
That's because of the intel fpu, in fact all the arithemtics are done in
the 
FPU using the same register st0 st1 ... so the precision is the same but
the
compiler discard bits when he store back numbers from the fpu to memory.
and
when you have a well optimized code the compiler try to minismise
fpu->mem
transfer using as much as possible st register. So it is hard to enforce
usage of "real" double even using temp variable, you may try volatile
or gcc -O0.
(note i may be wrong)

> 
> 2)Does anybody know of any sparse matrix routines that can be compiled on
> and run on gcc on Linux

dunno but you may check http://www.che.wisc.edu/octave/ wich is a GNU
clone
of matlab 

> 
> Thanks in advance,
> Balaji

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]