Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #135681

Re: Range Reduction Using Big Number Arithmetic

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From peter <peter.noreply@tin.it>
Newsgroups comp.lang.forth
Subject Re: Range Reduction Using Big Number Arithmetic
Date Sat, 12 Sep 2026 11:04:31 +0200
Organization A noiseless patient Spider
Lines 80
Message-ID <20260912110431.000025b3@tin.it> (permalink)
References <115pm90$3cl9h$1@dont-email.me> <1168f21$bnk$1@dont-email.me> <116sa3b$2dpj8$4@dont-email.me> <117cuca$4f48$1@dont-email.me> <117rjv3$14ov3$1@dont-email.me> <20260909184929.0000509e@tin.it> <117vgfk$2eh6r$1@dont-email.me> <20260911145656.0000764d@tin.it> <1181h08$34q9g$1@dont-email.me> <20260911232156.00004f2b@tin.it> <20260912004252.00007f04@tin.it> <1182350$3ak8r$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Injection-Date Sat, 12 Sep 2026 09:04:31 +0000 (UTC)
Injection-Info dont-email.me; logging-data="3707506"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nPy2js+1dZuHAx7HdYGicAdISMwRNnBA="; posting-host="2f9228a32d0c53e74a915372c3319ac9"
Cancel-Lock sha1:1Zx0Cj98AKyA2anEFuSxX3dDFJ0= sha256:zgwIUbsozQjd/df/8l3MhnlssX9CDjcsoGnN15P329Y= sha1:eLfCb11+BknneKYK+vTt7TanZaA= sha256:DWD8jDZQ4cCB8qpM4uAZlI7gQ3QIJDXoBG9boOqzU20=
X-Newsreader Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32)
Xref csiph.com comp.lang.forth:135681

Show key headers only | View raw


On Fri, 11 Sep 2026 18:33:52 -0500
Krishna Myneni <krishna.myneni@ccreweb.org> wrote:

> On 9/11/26 5:42 PM, peter wrote:
> > On Fri, 11 Sep 2026 23:21:56 +0200
> > peter <peter.noreply@tin.it> wrote:
> > 
> ...
> > 
> > I have looked at the file and can not find an obvious error in swaping
> > high and low parts. But I can see also in your example that they are swaped
> > when printed in the .error function.
> > I also tried it on the 32 bit ntf and get
> >                   ulps error
> > Function    Total      0      1      2      3      4      5   6-10    >10   sign
> > facosh       1877    401    431     23     19     15      8     28    952      0
> > facos        1569    255    313     34     14      6      7     25    915      0
> > fasinh       2262    725    766     65     36     27     17     57    569      0
> > fsinh        1655    848    807      0      0      0      0      0      0      0
> > fatanh       1552    778    774      0      0      0      0      0      0      0
> > fatan        1735    869    866      0      0      0      0      0      0      0
> > fcbrt         138     70     68      0      0      0      0      0      0      0
> > fcosh        2026   1018   1008      0      0      0      0      0      0      0
> > fcos         1576    806    770      0      0      0      0      0      0      0
> > fcube         150     76     74      0      0      0      0      0      0      0
> > f1/10**       538    266    272      0      0      0      0      0      0      0
> > f10**        1668    811    857      0      0      0      0      0      0      0
> > fexpm1       7578   3779   3799      0      0      0      0      0      0      0
> > f2**         1145    592    553      0      0      0      0      0      0      0
> > fexp         2268   1150   1118      0      0      0      0      0      0      0
> > flog         1883    997    886      0      0      0      0      0      0      0
> > flnp1        7550   3623   3927      0      0      0      0      0      0      0
> > flg2          929    526    403      0      0      0      0      0      0      0
> > fln          2813   1598   1215      0      0      0      0      0      0      0
> > fsinh        2215   1120   1095      0      0      0      0      0      0      0
> > fsin         1611    790    821      0      0      0      0      0      0      0
> > ftan         1706    816    890      0      0      0      0      0      0      0
> > ftanh        1852    916    936      0      0      0      0      0      0      0
> > frsqr        2202   2169     33      0      0      0      0      0      0      0
> > frsqrt       2360   2318     42      0      0      0      0      0      0      0
> > Total       52858  27317  22724    122     69     48     32    110   2436      0
> >   ok
> > 
> > I had to redefine  f2** and flg2 that are present in ntf but with completly
> > different meaning. the large number of problems in facosh, facos and fasinh
> > are not unexpected. They have very simplistic implementations.
> > Are you using glibc also on the 32 bit Kforth. Is it using the FPU or
> > other algorithms?
> > 
> > I got this for the same line
> >   52545        tanh      $3F28EE5F1F66AC0A. T1
> > ftanh     $3F28EE5F1A5B5193.  T2  \   0x1.8ee5f1f66ac0ap-13
> > 0x1.8ee5f1a5b5193p-13    Got   $3F28EE5F1A5B5193
> > 
> > Wich is strange as they look identical and should not have been signaled
> > I see now that .error tests the ulp variable but it is never set anywhere
> > I will have to fix that
> > 
> 
> Thanks. Yes, kForth-32 uses glibc functions. kForth-Win32 uses the 
> Digital Mars C/C++ math library, except for the sin and cos functions 
> which have been ported from glibc (because the native library functions 
> simply execute the fpu FSIN and FCOS instructions with the argument to 
> the corresponding Forth words).
> 
> The only way the glibc sin and cos functions use the fpu is for standard 
> floating point arithmetic in the specified precision and rounding modes, 
> i.e. they do not execute the fpu FSIN and FCOS instructions. I think 
> this is true for the tan function as well, but I don't know about others.
> 
> --
> Krishna
> 

I installed the latest snapshot of kforth 32bit for windows. I can not
get it to understand double number input. I read in the manual that you 
do not support it. How were you able to work around this?

Peter

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-15 07:32 -0500
  Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-15 07:48 -0500
  Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-20 22:01 -0500
    Re: Range Reduction Using Big Number Arithmetic albert@spenarnc.xs4all.nl - 2026-08-22 19:31 +0200
      Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-31 08:49 -0500
    Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-28 10:39 -0500
      Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-28 10:42 -0500
      Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-03 18:03 -0500
        Re: Range Reduction Using Big Number Arithmetic marcel hendrix <mhx@iae.nl> - 2026-09-04 07:29 +0200
          Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-04 07:45 -0500
            Re: Range Reduction Using Big Number Arithmetic marcel hendrix <mhx@iae.nl> - 2026-09-04 15:29 +0200
              Re: Range Reduction Using Big Number Arithmetic albert@spenarnc.xs4all.nl - 2026-09-05 12:27 +0200
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-05 08:39 -0500
        Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-09 07:37 -0500
          Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-09 18:49 +0200
            Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-09 15:06 -0500
            Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-10 19:03 -0500
              Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-11 14:56 +0200
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-11 09:17 -0500
                Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-11 17:04 +0200
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-11 10:46 -0500
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-11 13:24 -0500
                Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-11 23:21 +0200
                Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-12 00:42 +0200
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-11 18:33 -0500
                Re: Range Reduction Using Big Number Arithmetic peter <peter.noreply@tin.it> - 2026-09-12 11:04 +0200
                Re: Range Reduction Using Big Number Arithmetic Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-09-12 10:33 -0500

csiph-web