mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8199258: BigInteger.bitLength() should explicitly specify behavior when the value is zero
Reviewed-by: lancea, rriggs
This commit is contained in:
parent
f52ea8839e
commit
ae966db198
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -3556,8 +3556,8 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
|
|||
* Returns the number of bits in the minimal two's-complement
|
||||
* representation of this BigInteger, <em>excluding</em> a sign bit.
|
||||
* For positive BigIntegers, this is equivalent to the number of bits in
|
||||
* the ordinary binary representation. (Computes
|
||||
* {@code (ceil(log2(this < 0 ? -this : this+1)))}.)
|
||||
* the ordinary binary representation. For zero this method returns
|
||||
* {@code 0}. (Computes {@code (ceil(log2(this < 0 ? -this : this+1)))}.)
|
||||
*
|
||||
* @return number of bits in the minimal two's-complement
|
||||
* representation of this BigInteger, <em>excluding</em> a sign bit.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue