function grayInverse (g) { // : Int -> Int
    var m = bitwise.bitPrecision(g), inverse = g, j = 1
    while (j < m) {
        inverse = inverse ^ (g >> j)
        j++
    }
    return inverse
}
function grayInverse (g) { 
    var m = bitwise.bitPrecision(g), inverse = g, j = 1
    while (j < m) {
        inverse = inverse ^ (g >> j)
        j++
    }
    return inverse
}
function grayInverse ( g ) { // : Int -> Int var m = bitwise . bitPrecision ( g ) , inverse = g , j = 1 while ( j < m ) { inverse = inverse ^ ( g >> j ) j ++ } return inverse }
returns a non-negative int 'inverse' such that graycode(inverse) = g
returns a non - negative int inverse such that graycode ( inverse ) = g