All Packages Class Hierarchy This Package Previous Next Index
Class benno.number.LongLib
java.lang.Object
|
+----benno.number.LongLib
- public class LongLib
- extends Object
-
LongLib()
-
-
floorSqrt(long)
- returns the largest integer less than the square root of n.
-
gcd(int, int)
- thunks long gcd to int
-
gcd(long, long)
- returns gcd of (a,b).
LongLib
public LongLib()
gcd
public static long gcd(long a,
long b)
- returns gcd of (a,b). Originally written for Number Theory
coursework in the 3rd year of QMW.
gcd
public static int gcd(int a,
int b)
- thunks long gcd to int
floorSqrt
public static long floorSqrt(long n)
- returns the largest integer less than the square root of n.
Only works on positive numbers.
All Packages Class Hierarchy This Package Previous Next Index