🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #119

Re: FCONSTANT specification

#119
From: marcel hendrix
Date: Sat, 17 Oct 2026 17:44
34 lines
2617 bytes
On 10/16/2026 9:55 PM, marcel hendrix wrote:
[..]

> But why want QD, QX or QD when the mpfr gives arbitrary precision on its 
> own? The charm of QD is that is very small and simple, while MPFR is a 
> beast. It could be that it is much faster than QD/QX and QD though. 
> Maybe some tests could be done first.
As MPFR and MPC again work in iForth (inside XOPG), I did the testing.

LET sin(PI/16): GVAL x

#100000 value #iters
: TEST1  CR TIMER-RESET  #iters 0 ?do  LET sin(x):            LOOP 
.ELAPSED ;

: TEST2  CR TIMER-RESET  #iters 0 ?do  xd=pi/16 xdsin xddrop  LOOP 
.ELAPSED ;

: BENCH #100000 TO #iters
	TEST1
	TEST2 ;

FORTH> BENCH
0.826 seconds elapsed.
0.095 seconds elapsed. ok

The mpfr library is about 8 times faster than the XD-FP Forth library 
based on the ideas of Julian V. Noble, Seppo Linnainmaa, and David H. 
Bailey. As my mpfr .so is from 2012, I guess it will be even more 
dramatic with a modern binary. Still, a few xd-fp words might find a
permanent place in the iForth kernel.

-marcel
Technical Details
Message-ID: <11b0c63$200l3$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-mail
References: <11aide4$1ibse$1@dont-email.me> <2026Oct12.203631@mips.complang.tuwien.ac.at> <11am4ae$fte4$1@dont-email.me> <nnd$6e3248f1$0599409a@3ae3c368d79558dd> <2026Oct14.102517@mips.complang.tuwien.ac.at> <6ad02ef0$1@news.ausics.net> <11as7ct$2voh4$1@dont-email.me> <11atg9c$1t6lk$1@dont-email.me> <11athqh$3e3iv$1@dont-email.me> <11atves$k2t8$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: marcel hendrix <mhx@iae.nl>
Newsgroups: comp.lang.forth
Subject: Re: FCONSTANT specification
Date: Sat, 17 Oct 2026 19:44:34 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <11b0c63$200l3$1@dont-email.me>
References: <11aide4$1ibse$1@dont-email.me>
 <2026Oct12.203631@mips.complang.tuwien.ac.at> <11am4ae$fte4$1@dont-email.me>
 <nnd$6e3248f1$0599409a@3ae3c368d79558dd>
 <2026Oct14.102517@mips.complang.tuwien.ac.at> <6ad02ef0$1@news.ausics.net>
 <11as7ct$2voh4$1@dont-email.me> <11atg9c$1t6lk$1@dont-email.me>
 <11athqh$3e3iv$1@dont-email.me> <11atves$k2t8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 17 Oct 2026 17:44:36 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2097827"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+DFQ/2ABhSpdyHjlGQs6x77fwQAlJ/XKU="; posting-host="c962b627b92e275e7c438de4179e4c7c"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CJOZQlE1pSQge0BtcsDqUMThHcY= sha256:VHGIj8ucNRnhyf4pA/7MLISFsU2AJEj9hBCBBT1BWXk=
	sha1:A59GtyzLp0mN/4P1HNqPDwvXmx0= sha256:kwCUqrOTadCPvvdn6mDrJijAaPxU4qPxvUWDdJOp1vw=
Content-Language: en-US
In-Reply-To: <11atves$k2t8$1@dont-email.me>