# HG changeset patch # User michael # Date 1211668113 0 # Node ID 75aa9d6df9ac836e773294065ae7de3d3f1223e7 # Parent 2df67a1a76b7d6acca0d7e1349ee56cc268c1c3b simplify init_pow2table diff -r 2df67a1a76b7 -r 75aa9d6df9ac cook.c --- a/cook.c Sat May 24 22:23:16 2008 +0000 +++ b/cook.c Sat May 24 22:28:33 2008 +0000 @@ -185,13 +185,9 @@ /* table generator */ static void init_pow2table(COOKContext *q){ int i; - q->rootpow2tab[63] = - q->pow2tab[63] = 1.0; - for (i=1 ; i<64 ; i++){ - q->pow2tab[63+i]=(float)((uint64_t)1<pow2tab[63-i]=1.0/(float)((uint64_t)1<rootpow2tab[63+i]=sqrt((float)((uint64_t)1<rootpow2tab[63-i]=sqrt(1.0/(float)((uint64_t)1< pow2tab[63+i]= pow(2, i); + q->rootpow2tab[63+i]=sqrt(pow(2, i)); } }