virtual-labs-archive / data-structures-iiith

This repository contains sources to Data Structures Lab IIITH.
https://cse01-iiith.vlabs.ac.in/
Other
1 stars 73 forks source link

expression-evaluation_Simulation #170

Open yoogottamk opened 5 years ago

yoogottamk commented 5 years ago

Defect description

Does not round off values, which leads to inaccurate floating point representation

Steps to reproduce

Just load the page, then try to calculate 0.1 + 0.2 and see the magic.

Expected result

0.3

since 0.1 + 0.2 = 0.3.

Suggested fix

To round off the values to the maximum number of decimal places given by the user to minimize such errors

Screenshot

stack_calc_fails_again_and_im_not_keeping_count_anymore