2.9999999999999999 >> .5?


i listened right-shift array .5 instead controlling math.floor(). i solid check the boundary certain suitable replacement, i checked following values got following law google chrome:




2.5 >> .5 == 2;
2.9999 >> .5 == 2;
2.999999999999999 >> .5 == 2; // 15 9s
2.9999999999999999 >> .5 == 3; // 16 9s


after fiddling, i found out top illusory value twin which, right-shifted .5, furnish 2 2.9999999999999997779553950749686919152736663818359374999999 (with 9 repeating) chrome firefox. array 2.9999999999999997779 ie.



my doubt is: highlight array .0000000000000007779553950749686919152736663818359374? it's unequivocally uncanny array unequivocally tender curiosity.



i've perplexing an answer during slightest kind pattern, nonetheless i cruise problem lies fact i unequivocally don't know bitwise operation. i know thought principle, nonetheless changeable bit method .5 doesn't any clarity during me. any assistance appreciated.



for record, uncanny number method changes 2^x. top illusory values following numbers still lop properly:




for 0: 0.9999999999999999444888487687421729788184165954589843749
for 1: 1.9999999999999999888977697537484345957636833190917968749
for 2-3: x+.99999999999999977795539507496869191527366638183593749
for 4-7: x+.9999999999999995559107901499373838305473327636718749
for 8-15: x+.999999999999999111821580299874767661094665527343749
...and forth


Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members