| 1171 | } |
| 1172 | |
| 1173 | static Category category(Object x){ |
| 1174 | Class xc = x.getClass(); |
| 1175 | |
| 1176 | if(xc == Integer.class) |
| 1177 | return Category.INTEGER; |
| 1178 | else if(xc == Double.class) |
| 1179 | return Category.FLOATING; |
| 1180 | else if(xc == Long.class) |
| 1181 | return Category.INTEGER; |
| 1182 | else if(xc == Float.class) |
| 1183 | return Category.FLOATING; |
| 1184 | else if(xc == BigInt.class) |
| 1185 | return Category.INTEGER; |
| 1186 | else if(xc == Ratio.class) |
| 1187 | return Category.RATIO; |
| 1188 | else if(xc == BigDecimal.class) |
| 1189 | return Category.DECIMAL; |
| 1190 | else |
| 1191 | return Category.INTEGER; |
| 1192 | } |
| 1193 | |
| 1194 | static long bitOpsCast(Object x){ |
| 1195 | Class xc = x.getClass(); |