Re: Floating point issue

2020-04-17 Thread Cousin Stanley
Aakash Jana wrote: > I am calculating couple of ratios and according to the problem > there must be a 6 decimal precision. > > But when I print the result I only get one 0. > > E.g:- 2 / 5 = 0.40 but I am only getting 0.4 You might try using a ' '.format string ratios = { '1/8'

Floating point issue

2020-04-17 Thread Aakash Jana
I am calculating couple of ratios and according to the problem there must be a 6 decimal precision. But when I print the result I only get one 0. E.g:- 2 / 5 = 0.40 but I am only getting 0.4 On Fri, 17 Apr 2020, 4:08 am Muneer Malla Dear All > hope you all are fine and doing good in these cri