public final class BitManipulation
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| private static long | magic1magic1 odd bits set constant | 
| private static long | magic2magic2 - even bits set constant | 
| Constructor and Description | 
|---|
| BitManipulation() | 
| Modifier and Type | Method and Description | 
|---|---|
| static long | invLSB(long i)returns i with even bits inverted | 
| static long | invMSB(long i)returns i with odd bits inverted | 
| static long | invswapLSBMSB(long i)returns NOT i with even and odd bit positions interchanged | 
| static void | main(java.lang.String[] pars)the main program for simple test | 
| static double | MODULO(double a,
      double b)simulates behaviour of fortran90 MODULO function | 
| static long | swapLSBMSB(long i)swaps low and high bits in the word i | 
private static long magic1
private static long magic2
public static long swapLSBMSB(long i)
i - integer input wordpublic static long invswapLSBMSB(long i)
i - int input wordpublic static long invLSB(long i)
i - int input wordpublic static long invMSB(long i)
i - int input wordpublic static double MODULO(double a,
            double b)
a - doubleb - doublepublic static void main(java.lang.String[] pars)
pars -