You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/05/19 15:13:50 UTC
[22/28] commons-numbers git commit: Method for computing integer
powers.
Method for computing integer powers.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/4336ff73
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/4336ff73
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/4336ff73
Branch: refs/heads/master
Commit: 4336ff7399136cb41516dfe3e5ddacba7cbac6aa
Parents: 6ae5bc3
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Mon Feb 5 01:59:54 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Mon Feb 5 01:59:54 2018 +0100
----------------------------------------------------------------------
.../org/apache/commons/numbers/core/NativeOperators.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/4336ff73/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/NativeOperators.java
----------------------------------------------------------------------
diff --git a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/NativeOperators.java b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/NativeOperators.java
index 11f3001..483dba2 100644
--- a/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/NativeOperators.java
+++ b/commons-numbers-core/src/main/java/org/apache/commons/numbers/core/NativeOperators.java
@@ -48,4 +48,12 @@ public interface NativeOperators<T>
* @return {@code n * this}.
*/
T multiply(int n);
+
+ /**
+ * Repeated multiplication.
+ *
+ * @param n Number of times to multiply {@code this} with itself.
+ * @return {@code this^n}.
+ */
+ T pow(int n);
}