All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.number.LongLib

java.lang.Object
   |
   +----benno.number.LongLib

public class LongLib
extends Object

Constructor Index

 o LongLib()

Method Index

 o floorSqrt(long)
returns the largest integer less than the square root of n.
 o gcd(int, int)
thunks long gcd to int
 o gcd(long, long)
returns gcd of (a,b).

Constructors

 o LongLib
 public LongLib()

Methods

 o 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.

 o gcd
 public static int gcd(int a,
                       int b)
thunks long gcd to int

 o 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