.net - Unpexpected Result of Division C# -


i tried doing following:

math.log10(11/10);  

expected answer 0.04139268515822504075019997124302

c# answer 0.0

really strange!! missing in finding log? need help

you should put like

  math.log10(11.0/10.0);  

otherwise 11 / 10 result in 1 (integer division) , logarithm in 0 correspondingly


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -