Package java.math

Examples of java.math.BigInteger.floatValue()


            // float, 16-bytes left of decimal, 16 right
            // I don't get how apple does this, so I'm just reading
            // the integer part
            raf.read (buffy, 0, 2);
            longConverter = new BigInteger (buffy);
            float mediaRate = longConverter.floatValue();
            raf.read (buffy, 0, 2);
            // make an Edit object
            Edit edit = new Edit (trackDuration, mediaTime, mediaRate);
            edits[i] = edit;
        }
View Full Code Here


    harness.check(b1.equals(b2));
    harness.check(b1.byteValue() == b2.byteValue());
    harness.check(b1.shortValue() == b2.shortValue());
    harness.check(b1.intValue() == b2.intValue());
    harness.check(b1.longValue() == b2.longValue())// see bug parade 4823171
    harness.check(b1.floatValue() == b2.floatValue());
    harness.check(b1.doubleValue() == b2.doubleValue());
  }
 
}
View Full Code Here

     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.floatValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
     
      return this.thisRow.getNativeFloat(columnIndex);

    default:
View Full Code Here

     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.floatValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
      byte[] bits = (byte[]) this.thisRow[columnIndex];

      int asInt = (bits[0] & 0xff) | ((bits[1] & 0xff) << 8)
          | ((bits[2] & 0xff) << 16) | ((bits[3] & 0xff) << 24);
View Full Code Here

                    // The integer portion is in 2's Compliment
                    byte[] tempByte = {sensorData[6]};
                    BigInteger bigTemp = new BigInteger(tempByte);
                    // The decimal portion is NOT in 2's Compliment
                    int tempDecimal = 0x000000ff & (int) sensorData[7];
                    TEMPERATURE_CELSIUS = (float) (bigTemp.floatValue() + (tempDecimal >> 4) / 16.0);
                    TEMPERATURE_KELVIN = (float) (TEMPERATURE_CELSIUS - 273.15);
                    TEMPERATURE_FAHRENHEIT = (float) (TEMPERATURE_CELSIUS * (9.0 / 5.0) + 32.0);
                }
            }
        };
View Full Code Here

     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.floatValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
     
      return this.thisRow.getNativeFloat(columnIndex);

    default:
View Full Code Here

        } else {
            maxTextField.setText("");
        }
        if (min != null && max != null) {
            BigInteger range = max.subtract(min);
            rangeTextField.setText(Float.toString(range.floatValue()));
        } else {
            rangeTextField.setText("");
        }
    }
   
View Full Code Here

               
                expressionParser.addVariable(idName, expandFieldValue(fieldDefinition.getIndex(), bits));               
            }
        }
       
        expressionParser.addVariable("x", raw.floatValue());
        expressionParser.addVariable("fieldWidth", fd.getWidth());
        expressionParser.addVariable("maxValue", EncodingUtil.getMaxValue(fd.getWidth()).floatValue());
        expressionParser.parseExpression(expression);
       
        
View Full Code Here

     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.floatValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
     
      return this.thisRow.getNativeFloat(columnIndex);

    default:
View Full Code Here

     
      BigInteger asBigInt = convertLongToUlong(valueAsLong);
     
      // TODO: Check for overflow
     
      return asBigInt.floatValue();
    case MysqlDefs.FIELD_TYPE_FLOAT:
     
      return this.thisRow.getNativeFloat(columnIndex);

    default:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.