public static ArrayList<Double> PrimeNumbersBelow(double limit) throws MathException{
		ArrayList<Double> primes = new ArrayList<Double>(); 
		boolean prime = true;
		double sqRoot;
		
		//Error detected
		if(limit < 1){
			throw new MathException("Invalid input, minamum is 1");
		}
		
		//Logic exception: For single prime, must return here
		if(limit == 1){
			return primes;
		}
		
		primes.add(2.0);
		
		
		for(double potentialPrime = 3; potentialPrime < limit; potentialPrime++){
			prime = true;
			if((potentialPrime % 2) == 0){
				continue;
			}
			
			sqRoot = Math.sqrt(potentialPrime);
			
			for(int primeIndex = 1; primeIndex < primes.size(); primeIndex++){
				
				if(primes.get(primeIndex) > sqRoot){
					break;
				}
				
				if((potentialPrime % primes.get(primeIndex)) == 0){
					prime = false;
					break;
				}
			}
			
			if(prime){
				primes.add(potentialPrime);
			}
			
		}
		
		return primes;
	}