Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135681
| From | peter <peter.noreply@tin.it> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Range Reduction Using Big Number Arithmetic |
| Date | 2026-09-12 11:04 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <20260912110431.000025b3@tin.it> (permalink) |
| References | (7 earlier) <20260911145656.0000764d@tin.it> <1181h08$34q9g$1@dont-email.me> <20260911232156.00004f2b@tin.it> <20260912004252.00007f04@tin.it> <1182350$3ak8r$1@dont-email.me> |
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
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