<commit_before>package number

import "math"

func MinInt(x, y int) int {
    if x < y {
        return x
    }

    return y
}

func MinInt64(x, y int64) int64 {
    if x < y {
        return x
    }

    return y
}

func MinUint64(x, y uint64) uint64 {
    if x < y {
        return x
    }

    return y
}

func MaxInt(x, y int) int {
    if x > y {
        return x
    }

    return y
}

func MaxInt64(x, y int64) int64 {
    if x > y {
        return x
    }

    return y
}

func MaxUint64(x, y uint64) uint64 {
    if x > y {
        return x
    }

    return y
}

func PowInt(x, y int) int {
    result := 1

    for i := 0; i < y; i++ {
        result *= x
    }

    return result
}

func IsTriangleNumber(number uint64) bool {
    root := (-1 + math.Sqrt(8 * float64(number) + 1)) / 2

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}

func IsPentagonaNumber(number uint64) bool {
    root := (1 + math.Sqrt(24 * float64(number) + 1)) / 6

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}

func IsHexagonalNumber(number uint64) bool {
    root := (1 + math.Sqrt(8 * float64(number) + 1)) / 4

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}<commit_msg>Added function to check if a number is an abundant number<commit_after>package number

import (
    "github.com/powell0/projecteuler/utilities/math/factoring"
    "math"
)

func MinInt(x, y int) int {
    if x < y {
        return x
    }

    return y
}

func MinInt64(x, y int64) int64 {
    if x < y {
        return x
    }

    return y
}

func MinUint64(x, y uint64) uint64 {
    if x < y {
        return x
    }

    return y
}

func MaxInt(x, y int) int {
    if x > y {
        return x
    }

    return y
}

func MaxInt64(x, y int64) int64 {
    if x > y {
        return x
    }

    return y
}

func MaxUint64(x, y uint64) uint64 {
    if x > y {
        return x
    }

    return y
}

func PowInt(x, y int) int {
    result := 1

    for i := 0; i < y; i++ {
        result *= x
    }

    return result
}

func IsTriangleNumber(number uint64) bool {
    root := (-1 + math.Sqrt(8 * float64(number) + 1)) / 2

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}

func IsPentagonaNumber(number uint64) bool {
    root := (1 + math.Sqrt(24 * float64(number) + 1)) / 6

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}

func IsHexagonalNumber(number uint64) bool {
    root := (1 + math.Sqrt(8 * float64(number) + 1)) / 4

    return (math.Abs(math.Floor(root + 0.5) - root) < 0.000001)
}

func IsAbundantNumber(number uint64) bool {
    factors := factoring.ComputeFactors(number)

    sum := uint64(0)

    for _, factor := range factors {
        if factor != number {
            sum += factor
        }
    }

    return sum > number
}
{'fraction_non_alphanumeric': 0.12816851124598358, 'fraction_numerical': 0.057836486968939664, 'mean_word_length': 1.9556962025316456, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 10, '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': '5694291', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1060, 'n_words': 307}