Opened 7 years ago

Closed 7 years ago

#11495 closed Bugs (fixed)

Miller-Rabin primality test returns false for 2

Reported by: Tobias Polzer <tobias.polzer@…> Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

#include <boost/multiprecision/miller_rabin.hpp>
#include <iostream>

int main() {
        std::cout << boost::multiprecision::miller_rabin_test(2,25) << '\n';
}

prints 0.

Change History (3)

comment:1 by Tobias Polzer <tobias.polzer@…>, 7 years ago

Summary: Miller-Rabin primality test return false for 2Miller-Rabin primality test returns false for 2

comment:3 by John Maddock, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.