>>698
x が正の浮動小数の場合は、例えば、
if ( x >= 1.0 && Math.floor(x / Math.pow(10, ((int)Math.log10(x)))) == 1 ) {
 (最上位の桁が1の場合の処理);
}
とすると良い。