HongJunChea / payroll-system

MIT License
1 stars 0 forks source link

print_float prints rubbish output when the fractional part is a 0.5x #6

Open Poleric opened 1 month ago

Poleric commented 1 month ago

print_float procedure produce extra rubbish output digits when accepting floating points with 0.5x for its fractional part, producing result like 0.6528 and 5.6522.

Reproduction

adding two number that result in a 0.5x, like 1.23 + 2.34 and calling print_float