FUNCTION FPPROB
*-- Author :    Stephen Burke   05/05/95
      FUNCTION FPPROB(CHISQ,NDF)
C----------------------------------------------------                                                         
C                                                                                                             
C---  Array parray with probabilities                                                                         
C---  for chisq versus number of degrees of freedom                                                           
C---  first bin n    1-1000 is chisq in n/16ths                                                               
C---  first bin n 1001-2000 is chisq in n/8ths                                                                
C---  second bin is NDF 6-12                                                                                  
C                                                                                                             
C----------------------------------------------------                                                         
                                                                        
      COMMON/FPBCOM/PARRAY(1800,50)                                     
                                                                        
C----------------------------------------------------                                                         
                                                                        
      IF(NDF.LT.20)THEN                                                 
         IF(CHISQ.LT.62.5)THEN                                          
           ICHIBN = IFIX(CHISQ*16.0 - 0.5) + 1                          
           FPPROB = PARRAY(ICHIBN,NDF-1)                                
         ELSEIF(CHISQ.LT.162.5)THEN                                     
           ICHIBN = 1000 + IFIX((CHISQ-62.5)*8.0 - 0.5) + 1             
           FPPROB = PARRAY(ICHIBN,NDF-1)                                
         ELSE                                                           
           FPPROB = 0.0                                                 
         ENDIF                                                          
      ELSEIF(NDF.LE.51)THEN                                             
         IF(CHISQ.LT.125.0)THEN                                         
           ICHIBN = IFIX(CHISQ*8.0 - 0.5) + 1                           
           FPPROB = PARRAY(ICHIBN,NDF-1)                                
         ELSEIF(CHISQ.LT.325.0)THEN                                     
           ICHIBN = 1000 + IFIX((CHISQ-125.0)*4.0 - 0.5) + 1            
           FPPROB = PARRAY(ICHIBN,NDF-1)                                
         ELSE                                                           
           FPPROB = 0.0                                                 
         ENDIF                                                          
      ELSE                                                              
         FPPROB = PROB(CHISQ,NDF)                                       
      ENDIF                                                             
                                                                        
      RETURN                                                            
      END                                                               
*