multiplication yield strange results



Hello,

I call the following bit of code repeatedly during the execution of my program:

Bx:= self.n[0].A*self.alpha[0].c + self.n[1].A*self.alpha[1].c + self.n[2].A*self.alpha[2].c;
By:= -self.n[0].A*self.alpha[0].b - self.n[1].A*self.alpha[1].b - self.n[2].A*self.alpha[2].b;
Bsqr:= Bx*Bx + By*By;

At first all goes well but suddenly Bx and By get extremly large (around 1E205) which turn Bsqr to INF.
Typical value before failure:
self.n[0].A -9.39E-7
self.n[1].A -9.45E-7
self.n[2].A -9.45E-7
self.alpha[0].c -30.08
self.alpha[1].c 62.99
self.alpha[2].c -32.90
self.alpha[0].b -30.08
self.alpha[1].b 62.99
self.alpha[2].b -57.07


This does not happen always at the same iteration, so I suspect the problem could be something completely unrelated to this piece of code, like an unitialized pointer.

Using memProof I have got a lot of error related to VirtuallAloc trying to reference an invalid address. Could that be relevent?

Well I am completely lost any help apreciated.


Gilles
.



Relevant Pages

  • Re: .NET micro framework ... end of embedded world???
    ... embedded systems - Wince is a total and utter fiasco considering the ... execution relative to an external or internal event) for a given ... I suspect c# has it's meat-and-potatoes applications where .NET has ... predictability, to my way of thinking, and thus it's suitability for ...
    (comp.arch.embedded)
  • Re: multiplication yield strange results
    ... I call the following bit of code repeatedly during the execution of my ... like an unitialized pointer. ... Using memProof I have got a lot of error related to VirtuallAloc trying to ... even then it could need the complete environment settings ...
    (comp.lang.pascal.delphi.misc)
  • Re: [9fans] Got thread experience?
    ... what you describe -- loci of execution with seperate address ... in unix-like environments. ... i would suspect that csp ...
    (comp.os.plan9)
  • Number of Open Files
    ... Is there a way to find out how many files I have open during the execution ... I suspect I am running into a problem by opening files that ... Michael ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: Number of Open Files
    ... > Is there a way to find out how many files I have open during the execution ... I suspect I am running into a problem by opening files that ... Regards, ... Prev by Date: ...
    (microsoft.public.vc.language)