AnsweredAssumed Answered

VRf - double

Question asked by VRFuser on Feb 8, 1996
long FAR CDECL Zkouska(double FAR *data)
{
double *pom;

  *pom=20.;

if((*data) > (double)(*pom))  // GPF !
  { return((long)10);}
else
  { return((long)1);}

}

b) Returning the constant value independent on the result   
   of function:  

long FAR CDECL Zkouska(double FAR *data)
{
{
  *data = (double) ((*data)+1.);  
}
  { return((long)0);}
}
  // returns *data=4419.3424 e249, for subtraction -4419...



long FAR CDECL Zkouska(double FAR *data)
{
   double pom;

pom=*data;
pom /=2;    
*data=pom; 
{return ((long)0);}
}

// returns multiples of 4419.. acording to the *data value assigned
in VEE  


On the other side this function works properly:


long FAR CDECL Zkouska(double FAR *data)
{
  *data=(double)(1/(*data)); 
  return((long) 0);
}


    The demonstrated examples prove there is something wrong in
treatment of double in HP VEE. Please send me, if you  want and you
can, your experience with the treatment of double in HP VEE 3.x
and the recomendation how to overcome above described problems.
Have you ever encountered with something like this ?
My email address is:
valter@feld.cvut.cz


   Thank you very much for your recomendations and experience !
  
       Best regards
      
           Ondrej Valter
          

PS: I use HP VEE in the frame of my diploma work
    at the Czech Technical University in Prague.
  


Outcomes