1#!/usr/bin/env perl 2use strict; 3use warnings; 4 5use Test::More; 6use Math::Prime::Util qw/exp_mangoldt/; 7 8#my $extra = defined $ENV{EXTENDED_TESTING} && $ENV{EXTENDED_TESTING}; 9#my $usexs = Math::Prime::Util::prime_get_config->{'xs'}; 10#my $usegmp= Math::Prime::Util::prime_get_config->{'gmp'}; 11#my $use64 = Math::Prime::Util::prime_get_config->{'maxbits'} > 32; 12#$use64 = 0 if $use64 && 18446744073709550592 == ~0; 13 14my %mangoldt = ( 15-13 => 1, 16 0 => 1, 17 1 => 1, 18 2 => 2, 19 3 => 3, 20 4 => 2, 21 5 => 5, 22 6 => 1, 23 7 => 7, 24 8 => 2, 25 9 => 3, 26 10 => 1, 27 11 => 11, 28 25 => 5, 29 27 => 3, 30 399981 => 1, 31 399982 => 1, 32 399983 => 399983, 33 823543 => 7, 34 83521 => 17, 35 130321 => 19, 36); 37 38plan tests => scalar(keys %mangoldt); 39 40###### Exponential of von Mangoldt 41while (my($n, $em) = each (%mangoldt)) { 42 is( exp_mangoldt(0+$n), $em, "exp_mangoldt($n) == $em" ); 43} 44