Article View: comp.lang.fortran
Article #528OT: PI transferred to integer looks like multiple of 10000
From: Woozy Song
Date: Thu, 03 Dec 2026 12:53
Date: Thu, 03 Dec 2026 12:53
21 lines
1951 bytes
1951 bytes
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:
<11eronl$b5g2$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!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-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!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: Woozy Song <suzyw0ng@outlook.com> Newsgroups: comp.lang.fortran Subject: OT: PI transferred to integer looks like multiple of 10000 Date: Thu, 3 Dec 2026 20:53:06 +0800 Organization: A noiseless patient Spider Lines: 21 Message-ID: <11eronl$b5g2$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 03 Dec 2026 12:53:10 +0000 (UTC) Injection-Info: dont-email.me; logging-data="366082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Rb2cyelRk0JrY+Ltw/NCW1EtMgN/bDC4="; posting-host="f48f21326af565c8d8050f468bed3fe2" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:qdInyy0+TFTMoNhupXdJLtfuo58= sha256:Jtp6HcBDKFKPU/4vLYD+KPsff2W6cWahBzHMqruQnME= sha1:pCTwyt/YmeXwvqEbbk3dUYvojwY= sha256:cSzft6aBmHSra2edJ2X/g3EmivwnqrpoxqbZ4G59PB4= X-Mozilla-News-Host: news://news.eternal-september.org:119