<commit_before>package com.ejpm.euler.math.prime;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author edgar.mateus
 */
public class PrimeNumber {

    public static boolean isPrime(final int number){
        if((number != 2 && number % 2 == 0) || number == 1)
            return false;
        
        int divider = number;
        
        do{
            if(number % divider == 0 && divider != number)
                return false;
            divider = divider - 2;
        }while(divider > 1);
        
        return true;
     }
    
    public static int[] primeFactorization(final long number){
        final List<Integer> factors = new ArrayList<>();
        final PrimeSequence sequence = new PrimeSequence();
        <commit_msg>Peformance Improvment on Prime Number Checking<commit_after>package com.ejpm.euler.math.prime;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author edgar.mateus
 */
public class PrimeNumber {

    public static boolean isPrime(final int number){
        if((number != 2 && number % 2 == 0) || number == 1)
            return false;
        
        if(number != 3 && number % 3 == 0)
            return false;
        
        double r = Math.floor(Math.sqrt(number));
        
        int f = 5;
        
        while(f <= r){
            if(number % f == 0)
                return false;
            if(number % (f +2) == 0)
                return false;
            f += 6;
        }
        
        return true;
     }
    
    public static int[] primeFactorization(final long number){
        final List<Integer> factors = new ArrayList<>();
        final PrimeSequence sequence = new PrimeSequence();
        
{'fraction_non_alphanumeric': 0.11143867924528301, 'fraction_numerical': 0.011202830188679245, 'mean_word_length': 1.7370967741935484, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1116128', 'n_tokens_mistral': 486, 'n_tokens_neox': 460, 'n_words': 137}