Article View: comp.lang.forth
Article #69Re: FCONSTANT specification
From: Krishna Myneni
Date: Mon, 12 Oct 2026 16:08
Date: Mon, 12 Oct 2026 16:08
31 lines
2264 bytes
2264 bytes
On 10/12/26 9:56 AM, marcel hendrix wrote: > On 10/12/2026 4:14 PM, Krishna Myneni wrote: > [..]> 2.0e0 FLOG FCONSTANT _FLOG2 >> [UNDEFINED] FCEIL [IF] >> : FCEIL ( F: r1 -- r2 ) FNEGATE FLOOR FNEGATE ; >> [THEN] >> >> : P_min ( u1 -- u2) S>F _FLOG2 F* FCEIL F>D DROP 1+ ; > > FORTH> xd=pi (xdfe.) 2dup CR TYPE DROP #25 4 + CR TYPE > 3.14159265358979323846264338327950288422e0 > 3.141592653589793238462643383 ok > > So here it is easy to see it is correct. > What if PI had been 3.1415926535897932384626433835121212121212 ? > > FORTH> s" 3.1415926535897932384626433835121212121212e" cr 2dup TYPE > >XD (xdfe.) DROP #25 4 + CR TYPE > 3.1415926535897932384626433835121212121212e > 3.141592653589793238462643383 ok > > Maybe don't ever output more than 25 digits? > What binary precision (number of significand bits) are you using for your xdfloats? -- KM
Technical Details
Message-ID:
<11aj0ma$3oci3$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11aide4$1ibse$1@dont-email.me> <11aijvt$3iobp$1@dont-email.me> <11ainru$3kbfc$1@dont-email.me> <11aipvm$3kbfc$2@dont-email.me> <11aisee$e9sc$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Krishna Myneni <krishna.myneni@ccreweb.org> Newsgroups: comp.lang.forth Subject: Re: FCONSTANT specification Date: Mon, 12 Oct 2026 11:08:41 -0500 Organization: A noiseless patient Spider Lines: 31 Message-ID: <11aj0ma$3oci3$1@dont-email.me> References: <11aide4$1ibse$1@dont-email.me> <11aijvt$3iobp$1@dont-email.me> <11ainru$3kbfc$1@dont-email.me> <11aipvm$3kbfc$2@dont-email.me> <11aisee$e9sc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 12 Oct 2026 16:08:43 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3945027"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/teUxXxRCwpaJnxOzOCaHF"; posting-host="0049bcdfbab9457ae4461d9eec926e65" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:qkEcs6a5YvKVd/Q4MaEP2Uyly9s= sha256:Kpt+PLgCfy+pY6b7Bc0YfK3q2MjPLyFa72aAMi1aXUI= sha1:QBeIyWDJMCaUL6O3iPq/VhDXJn8= sha256:esKlN6z7H5w/K5pDZiRozvpELsSPv4l2TNC4ajOW4P0= Content-Language: en-US In-Reply-To: <11aisee$e9sc$1@dont-email.me>