hash5.c
Go to the documentation of this file.
00001 /* Oct.16, 1990.                                                     */
00002 /* 123456.789 was changed to 12345.6789 because hash is too sensible */
00003 
00004 #include "arith.h"
00005 
00006 hash5(w)
00007 VECTOR w;
00008 {
00009     REAL x,d[MAXRANK];
00010     int i,hash;
00011 
00012     for(i=0; i<MAXRANK; i++){
00013         d[i]= (w[i]+1)*1.5;
00014     }
00015 
00016     x = d[0]*1.23+d[1]*3.21+d[2]*2.35+d[3]*16.35+d[4]*23.57+d[5]*15.63;
00017     hash= (int)(12345.6789 * x) % HASHNO;
00018     return(hash);
00019 }
00020 


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Mar 9 2017 04:57:49