Math-Prime-Util icon indicating copy to clipboard operation
Math-Prime-Util copied to clipboard

trial_factor errors (truncation?)

Open hvds opened this issue 3 years ago • 0 comments

Using perl-5.34.0 with MPU-0.73.

% perl -MMath::GMP -MMath::Prime::Util=trial_factor -wle '
  $x = Math::GMP->new(3)**91;
  print for trial_factor($x)
'
1937805869
2724724103
% 

In factor.c I note that trial_factor takes a UV, so I assume this is simply truncating. (And MPUG doesn't appear to have a separate trial_factor function.)

I note also that the docs for trial_factor do not mention the second argument apparently supported in the code, which I had hoped to use.

hvds avatar Apr 19 '22 13:04 hvds