<commit_before>@function power($base, $exponent) {
  $result: 1;

  @if $exponent >= 0 {
    @for $i from 1 through $exponent {
      $result: $result * $base;
    }
  } @else {
    @for $i from $exponent to 0 {
      $result: $result / $base;
    }
  }

  @return $result;
}

@include describe("Math Power") {
  @include it("should expect positive values to be calculated correctly") {
    @include should( expect( power( 10, 2) ), to( equal(  100 )));
    @include should( expect( power(  2, 2) ), to( equal(    4 )));
    @include should( expect( power(0.5, 2) ), to( equal( 0.25 )));
  }

  @include it("should expect negative values to be calculated correctly") {
    @include should( expect( power( 10, -2) ), to( equal( 0.01 )));
    @include should( expect( power(  2, -2) ), to( equal( 0.25 )));
    @include should( expect( power(0.5, -2) ), to( equal(    4 )));<commit_msg>add minimal doc to math<commit_after>/*  
##`power($base, $exponent)`

*/
@function power($base, $exponent) {
  $result: 1;

  @if $exponent >= 0 {
    @for $i from 1 through $exponent {
      $result: $result * $base;
    }
  } @else {
    @for $i from $exponent to 0 {
      $result: $result / $base;
    }
  }

  @return $result;
}

@include describe("Math Power") {
  @include it("should expect positive values to be calculated correctly") {
    @include should( expect( power( 10, 2) ), to( equal(  100 )));
    @include should( expect( power(  2, 2) ), to( equal(    4 )));
    @include should( expect( power(0.5, 2) ), to( equal( 0.25 )));
  }

  @include it("should expect negative values to be calculated correctly") {
    @include should( expect( power( 10, -2) ), to( equal( 0.01 )));
    @include should( expect( power(  2, -2) ), to( equal( 0.25 )));
    @include should( expect( power(0.5, -2) ), to( equal(    4 )));
{'fraction_non_alphanumeric': 0.18236914600550963, 'fraction_numerical': 0.03746556473829201, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5731893', 'n_tokens_mistral': 672, 'n_tokens_neox': 628, 'n_words': 211}