@Override public final Object read(Object[] args) { if (PipeReader.readDecimalExponent(pipe, fieldLoc)==absent32) { return null; } else { return new Double(PipeReader.readDouble(pipe, fieldLoc)); } } };
@Override public final Object read(Object[] args) { if (PipeReader.readDecimalExponent(pipe, fieldLoc)==absent32) { return null; } else { return new Double(PipeReader.readDouble(pipe, fieldLoc)); } } };
@Override public final Object read(Object[] args) { if (PipeReader.readDecimalExponent(pipe, fieldLoc)==absent32) { return null; } else { return new Double(PipeReader.readDouble(pipe, fieldLoc)); } } };
/** * Reads double from specified pipe * @param pipe to be read * @param loc location of double to read * @return data from specified location */ public static double readDouble(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((double)readDecimalMantissa(pipe,loc))*powdi[64 - readDecimalExponent(pipe,loc)]; }
/** * Reads float from specified pipe * @param pipe to be read * @param loc location of float to read * @return data from specified location */ public static float readFloat(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((float)readDecimalMantissa(pipe,loc))*powfi[64 - readDecimalExponent(pipe,loc)]; }
/** * Reads float from specified pipe * @param pipe to be read * @param loc location of float to read * @return data from specified location */ public static float readFloat(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((float)readDecimalMantissa(pipe,loc))*powfi[64 - readDecimalExponent(pipe,loc)]; }
/** * Reads double from specified pipe * @param pipe to be read * @param loc location of double to read * @return data from specified location */ public static double readDouble(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((double)readDecimalMantissa(pipe,loc))*powdi[64 - readDecimalExponent(pipe,loc)]; }
/** * Reads float from specified pipe * @param pipe to be read * @param loc location of float to read * @return data from specified location */ public static float readFloat(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((float)readDecimalMantissa(pipe,loc))*powfi[64 - readDecimalExponent(pipe,loc)]; }
/** * Reads double from specified pipe * @param pipe to be read * @param loc location of double to read * @return data from specified location */ public static double readDouble(Pipe pipe, int loc) { assert((loc&0x1E<<OFF_BITS)==(0x0C<<OFF_BITS)) : "Expected to write some type of decimal but found "+TypeMask.toString((loc>>OFF_BITS)&TokenBuilder.MASK_TYPE); return ((double)readDecimalMantissa(pipe,loc))*powdi[64 - readDecimalExponent(pipe,loc)]; }
break; case 140: //Decimal int exp = PipeReader.readDecimalExponent(fieldsRing, DOUBLE_VALUE_LOC); assertEquals("Test file only uses 2 places of accuracy",2,exp);
int readDecimalExponent = PipeReader.readDecimalExponent(stage.inputRing, MetaMessageDefs.DECIMAL_VALUE_LOC); long readDecimalMantissa = PipeReader.readDecimalMantissa(stage.inputRing, MetaMessageDefs.DECIMAL_VALUE_LOC); int readDecimalExponent = PipeReader.readDecimalExponent(stage.inputRing, MetaMessageDefs.NAMEDDECIMAL_VALUE_LOC); long readDecimalMantissa = PipeReader.readDecimalMantissa(stage.inputRing, MetaMessageDefs.NAMEDDECIMAL_VALUE_LOC);