Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
bd8e41a0
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd8e41a0
编写于
10月 21, 2009
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6560935: BigInteger.modPow() throws ArithmeticException for negative exponent
Reviewed-by: alanb
上级
a74affa5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
8 deletion
+10
-8
src/share/classes/java/math/BigInteger.java
src/share/classes/java/math/BigInteger.java
+10
-8
未找到文件。
src/share/classes/java/math/BigInteger.java
浏览文件 @
bd8e41a0
...
...
@@ -478,7 +478,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
/**
* Constructs a randomly generated BigInteger, uniformly distributed over
* the range
{@code 0}
to (2<sup>{@code numBits}</sup> - 1), inclusive.
* the range
0
to (2<sup>{@code numBits}</sup> - 1), inclusive.
* The uniformity of the distribution assumes that a fair source of random
* bits is provided in {@code rnd}. Note that this constructor always
* constructs a non-negative BigInteger.
...
...
@@ -1332,7 +1332,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
*
* @param val value by which this BigInteger is to be divided.
* @return {@code this / val}
* @throws ArithmeticException
{@code val==0}
* @throws ArithmeticException
if {@code val} is zero.
*/
public
BigInteger
divide
(
BigInteger
val
)
{
MutableBigInteger
q
=
new
MutableBigInteger
(),
...
...
@@ -1352,7 +1352,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @return an array of two BigIntegers: the quotient {@code (this / val)}
* is the initial element, and the remainder {@code (this % val)}
* is the final element.
* @throws ArithmeticException
{@code val==0}
* @throws ArithmeticException
if {@code val} is zero.
*/
public
BigInteger
[]
divideAndRemainder
(
BigInteger
val
)
{
BigInteger
[]
result
=
new
BigInteger
[
2
];
...
...
@@ -1371,7 +1371,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @param val value by which this BigInteger is to be divided, and the
* remainder computed.
* @return {@code this % val}
* @throws ArithmeticException
{@code val==0}
* @throws ArithmeticException
if {@code val} is zero.
*/
public
BigInteger
remainder
(
BigInteger
val
)
{
MutableBigInteger
q
=
new
MutableBigInteger
(),
...
...
@@ -1547,7 +1547,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
*
* @param m the modulus.
* @return {@code this mod m}
* @throws ArithmeticException {@code m
<= 0}
* @throws ArithmeticException {@code m
} ≤ 0
* @see #remainder
*/
public
BigInteger
mod
(
BigInteger
m
)
{
...
...
@@ -1566,7 +1566,9 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* @param exponent the exponent.
* @param m the modulus.
* @return <tt>this<sup>exponent</sup> mod m</tt>
* @throws ArithmeticException {@code m <= 0}
* @throws ArithmeticException {@code m} ≤ 0 or the exponent is
* negative and this BigInteger is not <i>relatively
* prime</i> to {@code m}.
* @see #modInverse
*/
public
BigInteger
modPow
(
BigInteger
exponent
,
BigInteger
m
)
{
...
...
@@ -2015,7 +2017,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
*
* @param m the modulus.
* @return {@code this}<sup>-1</sup> {@code mod m}.
* @throws ArithmeticException {@code m
<= 0}
, or this BigInteger
* @throws ArithmeticException {@code m
} ≤ 0
, or this BigInteger
* has no multiplicative inverse mod m (that is, this BigInteger
* is not <i>relatively prime</i> to m).
*/
...
...
@@ -2449,7 +2451,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
/**
* Returns {@code true} if this BigInteger is probably prime,
* {@code false} if it's definitely composite. If
* {@code certainty} is
{@code <= 0}
, {@code true} is
* {@code certainty} is
≤ 0
, {@code true} is
* returned.
*
* @param certainty a measure of the uncertainty that the caller is
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录