<commit_before>augment class Any {
    multi method abs() {
        pir::abs__Nn(self.Num);
    }

    multi method exp() {
        self.Num.exp;
    }

    our Int multi method ceiling() is export {
        pir::box__PN(pir::ceil__IN(self))
    }

    our Str multi method chr() {
        ~(pir::chr__SI(self))
    }

    multi method cis() is export {
        1.unpolar(self)
    }

    our Int multi method floor() is export {
        pir::box__PI(pir::floor__IN(self))
    }

    our Num method rand() {
        pir::box__PN(pir::rand__NN(self))
    }

    multi method roots($n) {
        $.Complex.roots($n);
    }

    our Int multi method round() is export {
#        pir::box__PI(pir::floor__IN(pir::add__NNN(self, 0.5)))
    }

    multi method sqrt() {
        self.Num.sqrt;
    }

    # Used by the :Trig subs and methods in the Int and Num classes.
    our multi method !to-radians($base) {
        given $base {
            when /:i degrees/  { self * (312689/99532)/180.0 }    # Convert from degrees.
            when /:i gradians/ { self * (312689/99532)/200.0 }    # Convert from gradians.
            when /:i radians/  { self }                           # Convert from radians.
            when Num           { self * 2.0 * (312689/99532) }    # Convert from revolutions.
            default            { die "Unable to convert to base: $base" }
        }
    }

    our multi method !from-radians($base) {
        given $base {
            when /:i degrees/  { self * 180/(312689/99532)  }    # Convert to degrees.
            when /:i gradians/ { self * 200/(312689/99532)  }    # Convert to gradians.
            when /:i radians/  { self }                          # Convert to radians.
            when Num           { self /(2 * (312689/99532)) }    # Convert to revolutions.
            default            { die "Unable to convert to base: $base" }
        }
    }

    multi method log() {
        $.Num.log;
    }

    multi method log($base) {
        $.Num.log($base);
    }

    multi method log10() {
        $.Num.log10;
    }<commit_msg>Tweak radians cases of to- and from-radians so that they properly return a Num instead of a Float.<commit_after>augment class Any {
    multi method abs() {
        pir::abs__Nn(self.Num);
    }

    multi method exp() {
        self.Num.exp;
    }

    our Int multi method ceiling() is export {
        pir::box__PN(pir::ceil__IN(self))
    }

    our Str multi method chr() {
        ~(pir::chr__SI(self))
    }

    multi method cis() is export {
        1.unpolar(self)
    }

    our Int multi method floor() is export {
        pir::box__PI(pir::floor__IN(self))
    }

    our Num method rand() {
        pir::box__PN(pir::rand__NN(self))
    }

    multi method roots($n) {
        $.Complex.roots($n);
    }

    our Int multi method round() is export {
#        pir::box__PI(pir::floor__IN(pir::add__NNN(self, 0.5)))
    }

    multi method sqrt() {
        self.Num.sqrt;
    }

    # Used by the :Trig subs and methods in the Int and Num classes.
    our multi method !to-radians($base) {
        given $base {
            when /:i degrees/  { self * (312689/99532)/180.0 }    # Convert from degrees.
            when /:i gradians/ { self * (312689/99532)/200.0 }    # Convert from gradians.
            when /:i radians/  { self + 0 }                       # Convert from radians.
            when Num           { self * 2.0 * (312689/99532) }    # Convert from revolutions.
            default            { die "Unable to convert to base: $base" }
        }
    }

    our multi method !from-radians($base) {
        given $base {
            when /:i degrees/  { self * 180/(312689/99532)  }    # Convert to degrees.
            when /:i gradians/ { self * 200/(312689/99532)  }    # Convert to gradians.
            when /:i radians/  { self + 0 }                      # Convert to radians.
            when Num           { self /(2 * (312689/99532)) }    # Convert to revolutions.
            default            { die "Unable to convert to base: $base" }
        }
    }

    multi method log() {
        $.Num.log;
    }

    multi method log($base) {
        $.Num.log($base);
    }

    multi method log10() {
        $.Num.log10;
    }
{'fraction_non_alphanumeric': 0.12461574840387799, 'fraction_numerical': 0.04303617876566564, 'mean_word_length': 1.5871559633027523, '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': '4252841', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1302, 'n_words': 371}