separate( Test_Log_Family ) procedure Test_Log( N_Intervals, N_Arguments : in Int_Type ) is Arg, Log_of_Arg : Value_Table; NLog2_Lead, NLog2_Trail : Float_Type; N, N_Loops : Int_Type; N_Left, N_Right, Left, Right, Length : Int_Type; MRE_Base, MRE_Mach, Bad_Arg, Bad_Val : Float_Type; Outcome : Status; begin N_Left := -N_Limit; N_Right := N_Limit; N_Loops := N_Intervals; Length := (N_Right - N_Left +1) / N_Loops; if (Length = 0) then Length := 1; N_Loops := (N_Right - N_Left + 1); end if; Pr_Acc_Test_Title("LOG", "2**N * [1/sqrt(2), sqrt(2)]", N_Loops, N_Arguments, -N_Limit, N_Limit); Pr_Acc_Test_Report_Head("Log"); for Loop_Cnt in -2..N_Loops loop case Loop_Cnt is when -2 => N := 0; when -1 => N := -1; when 0 => N := 1; when others => Left := N_Left + (Loop_Cnt-1)*Length; if (Loop_Cnt = N_Loops) then Right := N_Right; else Right := Left + Length - 1; end if; N := Rand_Int( Left, Right ); end case; Test_Log_Interval( N, N_Arguments, MRE_Base, MRE_Mach, Bad_Arg, Bad_Val, Outcome ); if (Outcome = OK) then Pr_Acc_Test_Report("Log", N, N_Arguments, MRE_Base, MRE_Mach, Bad_Arg, Bad_Val); else Pr_Exception( Bad_Arg ); end if; end loop; return; end Test_Log;