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.option.pricing.tree.DoubleBarrierOptionFunctionProvider.java

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

From source file:gsn.http.rest.AndroidPushDelivery.java

@Override
public int hashCode() {
    int result;/* w  w w.  ja v  a2 s.c o m*/
    long temp;
    result = httpPost != null ? httpPost.getURI().hashCode() : 0;
    temp = notificationId != +0.0d ? Double.doubleToLongBits(notificationId) : 0L;
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.bond.definition.BondInterestIndexedSecurity.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from w w w . ja va2s  . c  o m
    if (!super.equals(obj)) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final BondInterestIndexedSecurity<?, ?> other = (BondInterestIndexedSecurity<?, ?>) obj;
    if (Double.doubleToLongBits(_accruedInterest) != Double.doubleToLongBits(other._accruedInterest)) {
        return false;
    }
    if (_couponPerYear != other._couponPerYear) {
        return false;
    }
    if (Double.doubleToLongBits(_factorToNextCoupon) != Double.doubleToLongBits(other._factorToNextCoupon)) {
        return false;
    }
    if (_settlement == null) {
        if (other._settlement != null) {
            return false;
        }
    } else if (!_settlement.equals(other._settlement)) {
        return false;
    }
    if (_yieldConvention == null) {
        if (other._yieldConvention != null) {
            return false;
        }
    } else if (!_yieldConvention.equals(other._yieldConvention)) {
        return false;
    }
    return true;
}

From source file:io.fouad.jtb.core.beans.InlineQueryResultVenue.java

@Override
public int hashCode() {
    int result = super.hashCode();
    long temp;//from w  w w  .j  a v  a  2s.c om
    temp = Double.doubleToLongBits(latitude);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(longitude);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + (title != null ? title.hashCode() : 0);
    result = 31 * result + (address != null ? address.hashCode() : 0);
    result = 31 * result + (foursquareId != null ? foursquareId.hashCode() : 0);
    result = 31 * result + (inputMessageContent != null ? inputMessageContent.hashCode() : 0);
    result = 31 * result + (thumbUrl != null ? thumbUrl.hashCode() : 0);
    result = 31 * result + (thumbWidth != null ? thumbWidth.hashCode() : 0);
    result = 31 * result + (thumbHeight != null ? thumbHeight.hashCode() : 0);
    return result;
}

From source file:com.opengamma.analytics.financial.model.option.definition.ComplexChooserOptionDefinition.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/* w  w w .ja v  a2 s.c o m*/
    if (!super.equals(obj)) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final ComplexChooserOptionDefinition other = (ComplexChooserOptionDefinition) obj;
    if (Double.doubleToLongBits(_callStrike) != Double.doubleToLongBits(other._callStrike)) {
        return false;
    }
    if (Double.doubleToLongBits(_putStrike) != Double.doubleToLongBits(other._putStrike)) {
        return false;
    }
    return ObjectUtils.equals(_callExpiry, other._callExpiry)
            && ObjectUtils.equals(_putExpiry, other._putExpiry);
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.BondFuture.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(_conversionFactor);
    result = prime * result + Arrays.hashCode(_deliveryBasket);
    long temp;//from w w  w.jav  a 2  s . c  o  m
    temp = Double.doubleToLongBits(_deliveryFirstTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_deliveryLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_noticeFirstTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_noticeLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_tradingLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.model.interestrate.definition.G2ppPiecewiseConstantParameters.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*  w ww . ja  v a  2s.  com*/
    temp = Double.doubleToLongBits(_correlation);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + Arrays.hashCode(_meanReversion);
    result = prime * result + Arrays.hashCode(_volatility);
    result = prime * result + _volatilityTime.hashCode();
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedCompoundedONCompounded.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//  w  w w.  j  a v a  2 s  . co  m
    if (!super.equals(obj)) {
        return false;
    }
    final SwaptionPhysicalFixedCompoundedONCompounded other = (SwaptionPhysicalFixedCompoundedONCompounded) obj;
    if (_isLong != other._isLong) {
        return false;
    }
    if (Double.doubleToLongBits(_settlementTime) != Double.doubleToLongBits(other._settlementTime)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlyingSwap, other._underlyingSwap)) {
        return false;
    }
    return true;
}

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

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + Arrays.hashCode(_fixingPeriodAccrualFactors);
    long temp;//  w  ww .  j  av a2  s  .com
    temp = Double.doubleToLongBits(_fixingPeriodRemainingAccrualFactor);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + Arrays.hashCode(_fixingPeriodTimes);
    result = prime * result + _index.hashCode();
    temp = Double.doubleToLongBits(_rateAccrued);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:etymology.util.EtyMath.java

public static double approxPow(final double a, final double b) {
    final int x = (int) (Double.doubleToLongBits(a) >> 32);
    final int y = (int) (b * (x - 1072632447) + 1072632447);
    return Double.longBitsToDouble(((long) y) << 32);
}