calculator
                                
                                 calculator copied to clipboard
                                
                                    calculator copied to clipboard
                            
                            
                            
                        Calculation error
1 / 9 * 9 == 0.9999999
It should actually be this
1 / 9 * 9 == 1
can i fix it
It is practically 0.9999999. Because the calculator calculator the 1/9 first, then it multiply the result of 1/9 and 9, then it get 0.9999999999
It is practically 0.9999999. Because the calculator calculator the 1/9 first, then it multiply the result of 1/9 and 9, then it get 0.9999999999
Huh? Also, its widely accepted that this isn't a correct calculation and its not. f(x) = x / 9 * 9 f(f(f(f(f(1))))) != 1
It's gradual depreciation
It is practically 0.9999999. Because the calculator calculator the 1/9 first, then it multiply the result of 1/9 and 9, then it get 0.9999999999
Huh? Also, its widely accepted that this isn't a correct calculation and its not. f(x) = x / 9 * 9 f(f(f(f(f(1))))) != 1
It's gradual depreciation
But, it's divide into two steps, and convert to float, so that it will lose a little bit accuracy among the process.
Its not an int to float conversion its all doubles and stays doubles.