Unbias a random generator: Difference between revisions

m
output formatting of ada version tweaked
(Ada version added)
m (output formatting of ada version tweaked)
Line 55:
end loop;
Ada.Text_IO.Put(Integer'Image(I));
FIO.Put(100.0 * Float(Counter_B) / Float(Number_Of_Samples), 45, 2, 0);
FIO.Put(100.0 * Float(Counter_U) / Float(Number_Of_Samples), 5, 2, 0);
Ada.Text_IO.New_Line;
Line 61:
end Bias_Unbias;</lang>
Output:<pre> I Biased% UnBiased%
3 32.87 49.80
4 24.49 50.22
5 19.73 50.05
6 16.75 50.19
</pre>
 
Anonymous user