Article View: comp.lang.fortran
Article #529Re: OT: PI transferred to integer looks like multiple of 10000
From: vmagnin
Date: Thu, 03 Dec 2026 17:28
Date: Thu, 03 Dec 2026 17:28
26 lines
2160 bytes
2160 bytes
It is just a coincidence. Just add or remove a digit to that pi approximation and the result will be slightly different. 1078530000 is a number like any other. Le 03/12/2026 à 13:53, Woozy Song a écrit : > I was trying out wiping the lower 16 bits of a 32-bit float with this > > PROGRAM REAL2INT > integer*4 i,n,m,k > real*4 r > data m /Z'FFFF'/ > n = NOT(m) > r = 3.14159 > i = transfer(r,k) > k = iand(n,i) > write(6,*) 'int ',m,n,i,k > end PROGRAM REAL2INT > > running it, I got > int 65535 -65536 1078530000 1078525952 > > So PI to 5 decimal places is a multiple of 10,000 as integer. > Weird coincidence or what? > It looked like the least significant digits were wiped, but > no that is variable i before the iand.
Technical Details
Message-ID:
<11es8ss$k4q9$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11eronl$b5g2$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: vmagnin <vincent.magnin@univ-lille.fr> Newsgroups: comp.lang.fortran Subject: Re: OT: PI transferred to integer looks like multiple of 10000 Date: Thu, 3 Dec 2026 18:28:58 +0100 Organization: A noiseless patient Spider Lines: 26 Message-ID: <11es8ss$k4q9$1@dont-email.me> References: <11eronl$b5g2$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 03 Dec 2026 17:29:01 +0000 (UTC) Injection-Info: dont-email.me; logging-data="660297"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tMNynF++DvQMYqgp4EhnZ"; posting-host="0afc43e79ca0cacc91cf91df3166328e" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:MxOgFDeuZBvps29ssBbtEsKXOhY= sha256:xEnoeqlcyI14VwNS4RdDMyQwd6QoCFSvv8hCMuB0roM= sha1:81jkVOLRaIqnwSwY+fHXE00lF5g= sha256:iYI8btPlCmMef2YGFb4ARWspYCkODG9cWr0ahciUtfU= Content-Language: fr In-Reply-To: <11eronl$b5g2$1@dont-email.me>