comefrom: <awangdev>Fraction to Recurring Decimal_2.java
code: public String fractionToDecimal(int numerator, int denominator) {
          long nume = Math.abs((long)numerator);
          long deno = Math.abs((long)denominator);
          String sign = (numerator < 0) ^ (denominator < 0) ? "-" : "";
          if (deno == 0) {
          	return "";
          } else if (nume == 0) {
          	return "0";
          } else if (nume % deno == 0) {
          	return sign + nume/deno + "";
          }
          
          String rst = sign + nume/deno + ".";
          long end = nume%deno * 10;
  
          HashMap<Integer, Long> map = new HashMap<Integer, Long>();
    		boolean repeat = false;
    		String endRepeat = "";
    		int n = 0;
          while (true){
  			if (end == 0) {
  				break;
  			} else if (map.containsValue(end)) {
  				repeat = true;
  				break;
  			}
          	map.put(n++, end);
          	end = (end % deno) * 10;
          }
  
          for (int i = 0; i < n; i++) {
          	if (repeat && map.get(i) == end) {
          		rst += "(" + map.get(i)/deno;
          		endRepeat = ")";
  				repeat = false;
          	} else {
  				rst += map.get(i)/deno;        		
          	}
          }
  
          return rst + endRepeat;
      }
masked: public String var_0 ( int var_1 , int var_2 ) {
    long var_5 = Math . abs ( ( long ) var_1 ) ;
    long var_6 = Math . abs ( ( long ) var_2 ) ;
    String var_11 = ( var_1 < 0 ) ^ ( var_2 < 0 ) ? "-" : "" ;
    if ( var_6 == 0 ) {
      return "" ;
    }
    else if ( var_5 == 0 ) {
      return "0" ;
    }
    else if ( var_5 % var_6 == 0 ) {
      return var_11 + var_5 / var_6 + "" ;
    }
    String var_14 = var_11 + var_5 / var_6 + "." ;
    long var_16 = var_5 % var_6 * 10 ;
    HashMap < Integer , Long > var_20 = new HashMap < Integer , Long > ( ) ;
    boolean var_27 = false ;
    String var_22 = "" ;
    int var_23 = 0 ;
    while ( true ) {
      if ( var_16 == 0 ) {
        break ;
      }
      else if ( var_20 . containsValue ( var_16 ) ) {
        var_27 = true ;
        break ;
      }
      var_20 . put ( var_23 ++ , var_16 ) ;
      var_16 = ( var_16 % var_6 ) * 10 ;
    }
    for ( int var_26 = 0 ;
    var_26 < var_23 ;
    var_26 ++ ) {
      if ( var_27 && var_20 . get ( var_26 ) == var_16 ) {
        var_14 += "(" + var_20 . get ( var_26 ) / var_6 ;
        var_22 = ")" ;
        var_27 = false ;
      }
      else {
        var_14 += var_20 . get ( var_26 ) / var_6 ;
      }
    }
    return var_14 + var_22 ;
  }
  