<commit_before>package com.ekocaman.service;

import org.springframework.stereotype.Service;

import javax.inject.Singleton;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.logging.Level;
import java.util.logging.Logger;


@Service
@Singleton
public class CalculatorServiceImpl implements CalculatorService {
    private static final Logger logger = Logger.getLogger(CalculatorServiceImpl.class.getName());

    public static final int DECIMAL_PRECISION = 2;

    private static final BigDecimal BIG_MAX_DOUBLE = BigDecimal.valueOf(Long.MAX_VALUE);
    private static final BigDecimal BIG_MIN_DOUBLE = BigDecimal.valueOf(Long.MIN_VALUE);

    private static BigDecimal doubleRangeCheck(BigDecimal val) {
        if (val.compareTo(BIG_MAX_DOUBLE) == 1 || val.compareTo(BIG_MIN_DOUBLE) == -1) {
            logger.log(Level.WARNING, "Calculation result overflow");
            throw new ArithmeticException("Double overflow");
        }<commit_msg>Decimal precision updated to 10<commit_after>package com.ekocaman.service;

import org.springframework.stereotype.Service;

import javax.inject.Singleton;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.logging.Level;
import java.util.logging.Logger;


@Service
@Singleton
public class CalculatorServiceImpl implements CalculatorService {
    private static final Logger logger = Logger.getLogger(CalculatorServiceImpl.class.getName());

    public static final int DECIMAL_PRECISION = 10;

    private static final BigDecimal BIG_MAX_DOUBLE = BigDecimal.valueOf(Long.MAX_VALUE);
    private static final BigDecimal BIG_MIN_DOUBLE = BigDecimal.valueOf(Long.MIN_VALUE);

    private static BigDecimal doubleRangeCheck(BigDecimal val) {
        if (val.compareTo(BIG_MAX_DOUBLE) == 1 || val.compareTo(BIG_MIN_DOUBLE) == -1) {
            logger.log(Level.WARNING, "Calculation result overflow");
            throw new ArithmeticException("Double overflow");
        }
{'fraction_non_alphanumeric': 0.08735398679532758, 'fraction_numerical': 0.0045708481462671405, 'mean_word_length': 4.743440233236152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5998988', 'n_tokens_mistral': 570, 'n_tokens_neox': 543, 'n_words': 130}