Home
last modified time | relevance | path

Searched refs:sign (Results 1 – 25 of 29) sorted by relevance

12

/libcore/luni/src/main/java/java/math/
DBigInteger.java63 transient int sign; field in BigInteger
101 BigInteger(int sign, long value) { in BigInteger() argument
103 bigInt.putULongInt(value, (sign < 0)); in BigInteger()
115 BigInteger(int sign, int numberLength, int[] digits) { in BigInteger() argument
116 setJavaRepresentation(sign, numberLength, digits); in BigInteger()
134 int sign = 1; in BigInteger() local
142 setJavaRepresentation(sign, numberLength, digits); in BigInteger()
322 bigInt.putLittleEndianInts(digits, (sign < 0)); in getBigInt()
333 private void setJavaRepresentation(int sign, int numberLength, int[] digits) { in setJavaRepresentation() argument
340 sign = 0; in setJavaRepresentation()
[all …]
DBitLevel.java43 if (val.sign == 0) { in bitLength()
49 if (val.sign < 0) { in bitLength()
66 if (val.sign == 0) { in bitCount()
71 if (val.sign > 0) { in bitCount()
132 return new BigInteger(source.sign, resLen, resDigits); in shiftLeftOneBit()
141 return ((source.sign < 0) ? BigInteger.MINUS_ONE : BigInteger.ZERO); in shiftRight()
148 if (source.sign < 0) { in shiftRight()
166 return new BigInteger(source.sign, resLength, resDigits); in shiftRight()
215 int resSign = (val.sign == 0) ? 1 : val.sign; in flipBit()
225 if (val.sign < 0) { in flipBit()
DConversion.java55 int sign = val.sign; in bigInteger2String() local
59 if (sign == 0) { in bigInteger2String()
65 if (sign < 0) { in bigInteger2String()
76 int resLengthInChars = (int) (val.abs().bitLength() / bitsForRadixDigit + ((sign < 0) ? 1 in bigInteger2String()
124 if (sign == -1) { in bigInteger2String()
139 int sign = val.sign; in toDecimalScaledString() local
146 if (sign == 0) { in toDecimalScaledString()
238 boolean negNumber = (sign < 0); in toDecimalScaledString()
427 return ((val.sign > 0) ? Double.POSITIVE_INFINITY in bigInteger2Double()
442 return ((val.sign > 0) ? Double.POSITIVE_INFINITY in bigInteger2Double()
[all …]
DLogical.java40 if (val.sign == 0) { in not()
49 if (val.sign > 0) { in not()
61 return new BigInteger(-val.sign, i + 1, resDigits); in not()
73 resDigits[i] = val.digits[i] + val.sign; in not()
78 return new BigInteger(-val.sign, i, resDigits); in not()
83 if (that.sign == 0 || val.sign == 0) { in and()
93 if (val.sign > 0) { in and()
94 if (that.sign > 0) { in and()
100 if (that.sign > 0) { in and()
219 if (that.sign == 0 ) { in andNot()
[all …]
DNativeBN.java67 public static native int sign(long a); in sign() method in NativeBN
DBigDecimal.java1083 int sign = scaledDividend.signum() * scaledDivisor.signum(); in divideBigIntegers() local
1091 sign * (5 + compRem), roundingMode); in divideBigIntegers()
1097 sign * (5 + compRem), roundingMode); in divideBigIntegers()
1113 int sign = Long.signum( scaledDividend ) * Long.signum( scaledDivisor ); in dividePrimitiveLongs() local
1120 sign * (5 + compRem), in dividePrimitiveLongs()
2530 int sign = signum(); in doubleValue() local
2539 if ((powerOfTwo < -1074) || (sign == 0)) { in doubleValue()
2541 return (sign * 0.0d); in doubleValue()
2544 return (sign * Double.POSITIVE_INFINITY); in doubleValue()
2604 return (sign * Double.POSITIVE_INFINITY); in doubleValue()
[all …]
DBigInt.java206 int sign() { in sign() method in BigInt
207 return NativeBN.sign(this.bignum); in sign()
/libcore/luni/src/main/java/java/lang/
DStrictMath.java927 public static double copySign(double magnitude, double sign) { in copySign() argument
934 long signBits = Double.doubleToRawLongBits((sign != sign) ? 1.0 : sign); in copySign()
944 public static float copySign(float magnitude, float sign) { in copySign() argument
951 int signBits = Float.floatToRawIntBits((sign != sign) ? 1.0f : sign); in copySign()
1018 long sign = bits & Double.SIGN_MASK; in scalb() local
1060 return Double.longBitsToDouble(result | sign); in scalb()
1072 int sign = bits & Float.SIGN_MASK; in scalb() local
1112 return Float.intBitsToFloat(result | sign); in scalb()
DMath.java1008 public static double copySign(double magnitude, double sign) { in copySign() argument
1010 long signBits = Double.doubleToRawLongBits(sign); in copySign()
1021 public static float copySign(float magnitude, float sign) { in copySign() argument
1023 int signBits = Float.floatToRawIntBits(sign); in copySign()
1154 long sign = bits & Double.SIGN_MASK; in scalb() local
1195 return Double.longBitsToDouble(result | sign); in scalb()
1207 int sign = bits & Float.SIGN_MASK; in scalb() local
1246 return Float.intBitsToFloat(result | sign); in scalb()
DHexStringParser.java67 private long sign; field in HexStringParser
118 sign <<= (MANTISSA_WIDTH + EXPONENT_WIDTH); in parse()
120 return sign | exponent | mantissa; in parse()
127 this.sign = signStr.equals("-") ? 1 : 0; in parseHexSign()
/libcore/luni/src/main/java/java/util/
DTimeZone.java232 char sign = '+'; in createGmtOffsetString() local
234 sign = '-'; in createGmtOffsetString()
241 builder.append(sign); in createGmtOffsetString()
402 char sign = id.charAt(3); in getCustomTimeZone() local
404 if (sign == '-') { in getCustomTimeZone()
408 String cleanId = String.format("GMT%c%02d:%02d", sign, hour, minute); in getCustomTimeZone()
DDate.java384 char sign = 0; in parse() local
423 if (sign == '+' || sign == '-') { in parse()
427 minutesOffset = sign == '-' ? -Integer in parse()
434 zoneOffset = sign == '-' ? -digit : digit; in parse()
435 sign = 0; in parse()
520 sign = next; in parse()
523 sign = 0; in parse()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSignatureTest.java213 s.sign(); in testSign()
221 s.sign(); in testSign()
227 s.sign(); in testSign()
239 s.sign(outbuf, 0, outbuf.length); in testSignbyteintint()
247 s.sign(outbuf, 0, outbuf.length); in testSignbyteintint()
253 assertEquals(s.getBufferLength(), s.sign(outbuf, 0, outbuf.length)); in testSignbyteintint()
259 s.sign(outbuf, outbuf.length, 0); in testSignbyteintint()
267 s.sign(outbuf, outbuf.length, 3); in testSignbyteintint()
DSignature2Test.java343 sig.sign(); in test_sign()
448 byte[] signature = sig.sign(); in test_verify$B()
462 byte[] signature = sig.sign(); in test_verify$BII()
/libcore/luni/src/test/java/libcore/java/security/
DSignatureTest.java305 byte[] signature = sig.sign(); in test_Signature()
996 byte[] signature = sig.sign(); in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
1090 byte[] signature = sig.sign(); in testSign_SHA1withRSA_Key_Success()
1114 byte[] signature = sig.sign(); in testSign_SHA224withRSA_Key_Success()
1138 byte[] signature = sig.sign(); in testSign_SHA256withRSA_Key_Success()
1161 byte[] signature = sig.sign(); in testSign_SHA384withRSA_Key_Success()
1184 byte[] signature = sig.sign(); in testSign_SHA512withRSA_Key_Success()
1207 byte[] signature = sig.sign(); in testSign_MD5withRSA_Key_Success()
1230 byte[] signature = sig.sign(); in testSign_NONEwithRSA_Key_Success()
1271 sig.sign(); in testSign_NONEwithRSA_Key_DataTooLarge_Failure()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConvertTest.java572 int sign = 1; in testIntValuePositive3() local
574 int aNumber = new BigInteger(sign, aBytes).intValue(); in testIntValuePositive3()
584 int sign = -1; in testIntValueNegative1() local
586 int aNumber = new BigInteger(sign, aBytes).intValue(); in testIntValueNegative1()
607 int sign = -1; in testIntValueNegative3() local
609 int aNumber = new BigInteger(sign, aBytes).intValue(); in testIntValueNegative3()
DBigDecimalTest.java730 BigDecimal sign = new BigDecimal(123E-104); in test_signum() local
731 assertTrue("123E-104 is not positive in signum()", sign.signum() == 1); in test_signum()
732 sign = new BigDecimal("-1234.3959"); in test_signum()
734 sign.signum() == -1); in test_signum()
735 sign = new BigDecimal(000D); in test_signum()
736 assertTrue("000D is not zero in signum()", sign.signum() == 0); in test_signum()
/libcore/benchmarks/src/benchmarks/regression/
DSignatureBenchmark.java86 this.signature = signer.sign(); in setUp()
106 signer.sign(); in timeSign()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DStrictMathTest.java199 final double sign = COPYSIGN_DD_CASES[j]; in test_copySign_DD() local
201 .copySign(magnitude, sign)); in test_copySign_DD()
203 if (sign > 0 || Double.valueOf(+0.0).equals(sign) in test_copySign_DD()
204 || Double.valueOf(0.0).equals(sign)) { in test_copySign_DD()
209 if (sign < 0 || Double.valueOf(-0.0).equals(sign)) { in test_copySign_DD()
264 final float sign = COPYSIGN_FF_CASES[j]; in test_copySign_FF() local
266 .copySign(magnitude, sign)); in test_copySign_FF()
267 if (sign > 0 || Float.valueOf(+0.0f).equals(sign) in test_copySign_FF()
268 || Float.valueOf(0.0f).equals(sign)) { in test_copySign_FF()
273 if (sign < 0 || Float.valueOf(-0.0f).equals(sign)) { in test_copySign_FF()
DMathTest.java183 final double sign = COPYSIGN_DD_CASES[j]; in test_copySign_DD() local
185 magnitude, sign)); in test_copySign_DD()
187 if (sign > 0 || Double.valueOf(+0.0).equals(sign) in test_copySign_DD()
188 || Double.valueOf(0.0).equals(sign)) { in test_copySign_DD()
193 if (sign < 0 || Double.valueOf(-0.0).equals(sign)) { in test_copySign_DD()
255 final float sign = COPYSIGN_FF_CASES[j]; in test_copySign_FF() local
257 magnitude, sign)); in test_copySign_FF()
258 if (sign > 0 || Float.valueOf(+0.0f).equals(sign) in test_copySign_FF()
259 || Float.valueOf(0.0f).equals(sign)) { in test_copySign_FF()
264 if (sign < 0 || Float.valueOf(-0.0f).equals(sign)) { in test_copySign_FF()
/libcore/support/src/test/java/tests/security/
DSignatureHelper.java65 signed = signature.sign(); in test()
DAlgorithmParameterSignatureHelper.java90 signed = signature.sign(); in test()
/libcore/luni/src/test/java/libcore/java/util/
DTimeZoneTest.java277 char sign = '+'; in formatGmtString() local
279 sign = '-'; in formatGmtString()
282 return String.format("GMT%c%02d:%02d", sign, offset / 60, offset % 60); in formatGmtString()
/libcore/luni/src/main/java/java/security/
DSignedObject.java89 signature = signingEngine.sign(); in SignedObject()
DSignature.java364 public final byte[] sign() throws SignatureException { in sign() method in Signature
393 public final int sign(byte[] outbuf, int offset, int len) in sign() method in Signature

12