Example usage for java.lang Double doubleToLongBits

List of usage examples for java.lang Double doubleToLongBits

Introduction

In this page you can find the example usage for java.lang Double doubleToLongBits.

Prototype

@HotSpotIntrinsicCandidate
public static long doubleToLongBits(double value) 

Source Link

Document

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

Usage

From source file:com.opengamma.analytics.financial.model.volatility.curve.FXVannaVolgaVolatilityCurveDataBundle.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*  w w  w .jav a 2s.c o m*/
    temp = Double.doubleToLongBits(_atm);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_delta);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _maturity.hashCode();
    temp = Double.doubleToLongBits(_riskReversal);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_vegaWeightedButterfly);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:de.codesourcery.geoip.Coordinate.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*from   www .ja  v  a2s .  c  o m*/
    temp = Double.doubleToLongBits(latitudeInDeg);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(longitudeInDeg);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.model.interestrate.curve.ForwardCurveYieldImplied.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + _costOfCarryCurve.hashCode();
    result = prime * result + _riskFreeCurve.hashCode();
    long temp;//from w ww  .j  a v a 2 s.  c  o m
    temp = Double.doubleToLongBits(_spot);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.var.EmpiricalDistributionVaRParameters.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*w w  w  .j  av a  2 s  .co  m*/
    temp = Double.doubleToLongBits(_horizon);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_periods);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_quantile);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.simpleinstruments.derivative.SimpleFuture.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _currency.hashCode();
    long temp;//from   ww w  .j a v a 2s.  com
    temp = Double.doubleToLongBits(_expiry);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_referencePrice);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_settlement);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_unitAmount);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFloating.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    long temp;//from w  w  w . ja va 2  s  .c o  m
    temp = Double.doubleToLongBits(_fixingTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.teradata.benchto.driver.service.Measurement.java

@Override
public int hashCode() {
    int result;/*ww w  .  j av a 2 s .c o  m*/
    long temp;
    result = name.hashCode();
    result = 31 * result + unit.hashCode();
    temp = Double.doubleToLongBits(value);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.simpleinstruments.pricing.SimpleFutureDataBundle.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from w ww .ja v  a2  s  .  c o m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final SimpleFutureDataBundle other = (SimpleFutureDataBundle) obj;
    if (Double.doubleToLongBits(_costOfCarry) != Double.doubleToLongBits(other._costOfCarry)) {
        return false;
    }
    if (Double.doubleToLongBits(_spot) != Double.doubleToLongBits(other._spot)) {
        return false;
    }
    if (!ObjectUtils.equals(_yieldCurve, other._yieldCurve)) {
        return false;
    }
    return true;
}

From source file:de.uniwue.info2.numerics.prec.DoublePrecisionFloat.java

@Override
protected String floatValueToBinaryString(String value) {
    double d = Double.parseDouble(value);
    String binary;//w  ww.j a va 2  s .com
    if (d == 0) {
        binary = StringUtils.repeat("0", 64);
    } else {
        binary = Long.toBinaryString(Double.doubleToLongBits(d));
    }
    return binary;
}

From source file:com.bigml.histogram.Gap.java

@Override
public int hashCode() {
    int hash = 7;
    hash = 23 * hash//  ww w. j a  v  a2  s.  c om
            + (int) (Double.doubleToLongBits(this._weight) ^ (Double.doubleToLongBits(this._weight) >>> 32));
    hash = 23 * hash + (this._startBin != null ? this._startBin.hashCode() : 0);
    return hash;
}