Class GCDHelper
java.lang.Object
org.apfloat.GCDHelper
Binary recursive GCD algorithm implementation.
- Since:
- 1.6
- Version:
- 1.10.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Apint[]binaryDivide(Apint a, Apint b) private static Apintprivate static ApintelementaryGcd(Apint a, Apint b) static Apintprivate static GCDHelper.HalfGcdTypehalfBinaryGcd(Apint a, Apint b, long k) private static ApintpowerOfTwo(long n) private static ApintrecursiveGcd(Apint a, Apint b) private static long
-
Constructor Details
-
GCDHelper
private GCDHelper()
-
-
Method Details
-
gcd
- Throws:
ApfloatRuntimeException
-
elementaryGcd
- Throws:
ApfloatRuntimeException
-
recursiveGcd
- Throws:
ApfloatRuntimeException
-
halfBinaryGcd
private static GCDHelper.HalfGcdType halfBinaryGcd(Apint a, Apint b, long k) throws ApfloatRuntimeException - Throws:
ApfloatRuntimeException
-
binaryDivide
- Throws:
ApfloatRuntimeException
-
v
- Throws:
ApfloatRuntimeException
-
powerOfTwo
- Throws:
ApfloatRuntimeException
-
cmod
- Throws:
ApfloatRuntimeException
-