<commit_before>## $Id$

=head1 NAME

src/builtins/math.pir - Perl6 math functions

=head1 Math::Basic

=head2 Functions

=over 4

=cut

## TODO: figure out what to get working, in order to uncomment the following
## .namespace [ 'Math::Basic' ]


=item abs

 our Num multi Num::abs ( Num $x )
 our Num multi Math::Basic::abs ( Num $x )

Absolute Value.

=cut

.sub 'abs'
    .param num a
    $N0 = abs a
    .return ($N0)
.end


=item floor

 our Int multi Num::floor ( Num $x )

Returns the highest integer not greater than $x.

=cut

.sub 'floor'
    .param num a
    floor a<commit_msg>[rakudo]: Fix abs(Int) to return Int.<commit_after>## $Id$

=head1 NAME

src/builtins/math.pir - Perl6 math functions

=head1 Math::Basic

=head2 Functions

=over 4

=cut

## TODO: figure out what to get working, in order to uncomment the following
## .namespace [ 'Math::Basic' ]


=item abs

 our Num multi Num::abs ( Num $x )
 our Num multi Math::Basic::abs ( Num $x )

Absolute Value.

=cut

.sub 'abs' :multi(_)
    .param num a
    $N0 = abs a
    .return ($N0)
.end

.sub 'abs' :multi('Integer')
    .param pmc a
    $P0 = n_abs a
    .return ($P0)
.end

=item floor

 our Int multi Num::floor ( Num $x )

Returns the highest integer not greater than $x.

=cut

.sub 'floor'
    .param num a
    floor a
{'fraction_non_alphanumeric': 0.12702078521939955, 'fraction_numerical': 0.012317167051578136, 'mean_word_length': 2.903903903903904, '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': '3613830', 'n_tokens_mistral': 490, 'n_tokens_neox': 470, 'n_words': 181}