This, at least for me, is the behavior of bizzare Visual Studio 2010 ever. I'm working on a MVC3 project, I copied a line of code from another project (VS2010 also, MVC1, if that matters), which looks like this:
target_height = height * 1.1
when I insert it into the MVC3 project, it expands to
target_height = height * 1.1000000000000001
Now, if I type 1.2, this is normal, nothing happens, but if I type 1.12, it expands to 1.1200000000000001.
Both target_height and height are integers. Why does one Visual Studio display 1.1 and the other extends it to 1.1000000000000001?
What's happening???
, autocomplete "" . http://accessmvp.com/Strive4Peace/VBA/VBA_L1_02_Crystal.pdf, VB ", ". int * double, , int * int ( ), 1.1 1.12 (epsilon = 1.11e-16).
, - , , , VB.NET MVCx, , .
1.1 11/10, round [(2 ^ 53 * 11)/10]/(2 ^ 53), 11/10. 53 , , , , - 1 3/16 " 30,1625 , 1/64 , 30,1625 +/- 0,399675 , , 30,2 +/- 0,4 .
, Visual Studio , 1.1, 1.1000000000000001. , 1.1 . , 1.1, . , , , "". , 1.1 11/10 ( 11), (1.1-1.0) (1/10) ( 10 ).
1.1 and 1.12 should not have an exact binary representation.
see this: https://stackoverflow.com/questions/634206/what-every-programmer-should-know-about
Source: https://habr.com/ru/post/1795454/More articles:Solr backlight - replaceError with Android plugin NetBeans - androidHow to highlight search results using Apache SOLR with PHP code - phpAny implementation of Asn1 in Delphi - delphiPassing get parameter from javascript to php destroys formatting - javascriptСбой генерации RDoc с помощью Directory.ext/rdoc уже существует - ruby-on-railsUse default float in Java (Eclipse) - javaWhere are SQL Server user credentials stored? - sql-serverKernel binding with MonoTouch - c #Environment variables for dll are different than exe - c ++All Articles