This lightly commented program performs a unit test on the Math_Utils Module.
program Unit_Test use Caesar_Math_Utils_Module implicit none integer :: Factors(32), NFactors ! Testing statements. call Prime_Factors ( -1, NFactors, Factors, Verbose=.true.) call Prime_Factors ( 0, NFactors, Factors, Verbose=.true.) call Prime_Factors ( 1, NFactors, Factors, Verbose=.true.) call Prime_Factors ( 1024, NFactors, Factors, Verbose=.true.) call Prime_Factors ( 1095059400, NFactors, Factors, Verbose=.true.) call Prime_Factors ( 1234567890, NFactors, Factors, Verbose=.true.) call Prime_Factors (-1073741824, NFactors, Factors, Verbose=.true.) call Prime_Factors ( HUGE(1), NFactors, Factors, Verbose=.true.) call Prime_Factors ( -HUGE(1), NFactors, Factors, Verbose=.true.) end