Baillie-PSW Primality Test การทดสอบนี้ตั้งชื่อตาม Robert Baillie, Carl Pomerance, John Selfridge และ Samuel Wagstaff เป็นการทดสอบที่ทดสอบว่าตัวเลขเป็นจำนวนประกอบหรืออาจเป็นจำนวนเฉพาะ อัลกอริทึม MillerTest() Begin Declare a function MillerTest of Boolean type. Declare MT_dt