  lib$wait and floating point FLTINV error? 
 The Question is:
 
A floating point exception is generated from the code below at location
noted   from what I gather from exceptions summary, bit 1 is set which means
Invalid operation is done.  I could not see what is wrong.
 
I had encountered a similar problem in the past, in which case a CRTL pathch
was required, because there was a problem in the implicit type castings.
Is this the case here?  as far as I know the system has the latest patches
applied.   Their OVMS versio
n is 7.1-1H2
 
 
HELP!...
 
%SYSTEM-F-HPARITH, high performance arithmetic trap, Imask=00000000,
Fmask=00000400, summary=02, PC=FFFFFFFF8046A004, PS=0000001B
-SYSTEM-F-FLTINV, floating invalid operation, PC=FFFFFFFF8046A004,
PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
  image    module    routine             line      rel PC           abs PC
 
                                            0 FFFFFFFF8046A004
FFFFFFFF8046A004
 CIMIO_D3_DIOP  CIOPERFSYNC  perform_timesync
                                        19609 00000000000000EC
00000000000452FC
 CIMIO_D3_DIOP  CIOGETDATA  getdatapcm  21781 0000000000000E58
000000000003DBA8
 CIMIO_D3_DIOP  DEVICE  Devupdate_device_list
                                        21749 00000000000004CC
000000000003C2BC
 CIMIO_D3_DIOP  DEVICE  device_get      21932 0000000000000D84
000000000003CB74
 CIMIO_D3_DIOP  CIMIO_DEVICE  cimio_device_get
                                        21019 00000000000027CC
000000000003B56C
 CIMIO_D3_DIOP  CIMIO_SERVER  cimio_server_get
                                        19984 0000000000001C68
0000000000035E08
 CIMIO_D3_DIOP  CIMIO_D3_DIOP  main     19469 000000000000121C
000000000003121C
 CIMIO_D3_DIOP  CIMIO_D3_DIOP  __main       0 00000000000000AC
00000000000300AC
                                            0 FFFFFFFF83D9D0F8
FFFFFFFF83D9D0F8
 
 
 
****************Source******************
 
#define D3_WAIT_RESOLUTION    0.1    /* seconds */
 
void perform_timesync( char net, char unit )
 
    int dtime;
    int ccount;
    float waittime=0;
 
    dtime = (int) d3config-&gt;delaytime[net][unit];
    ccount = (int) d3config-&gt;callcount[net][unit];
    if ( dtime )
    {
       ccount--;
       if ( ccount &lt;= 0 )
       {
        /*
         * Delay for delaytime 10th of a second
         */
        waittime = (float) dtime * D3_WAIT_RESOLUTION;  &lt;&lt;&lt;problem here
        lib$wait( &amp;waittime );
        ccount = d3config-&gt;groupsize[net][unit];
       }
       d3config-&gt;callcount[net][unit] = ccount;
    }
}            /* perform_timesync */
 
 
*****************************
 
all the values received by the function, ie, net, unit  are valid values,
d3config is a pointer to a valid structure, and it gets the delaytime as a
valid interger value which we tried values from 10 to 1000.   If delaytime
is set to 0 it does not go into the location where wait is happeing and
everything work out fine.
 
Whats the deal...
 
Thanks a bunch,
 
Ertugrul Akmese
 
 
 The Answer is:
 
  By default, lib$wait requires a VAX F_floating point number, while the
  native floating point format of most OpenVMS Alpha compilers is IEEE.
  The OpenVMS Wizard would recommend looking at the use of the (optional)
  float-type argument that is available on the lib$wait call, or (somewhat
  less desirably) switching the module to build using f_floating numbers.
 
