10 Sep 2026 Test updated, higher accuracy FSIN and FCOS words in kForth-Win32. The decimal outputs from FS. use a high quality, arbitrary precision dtoa() function from dtoa.c, with correct rounding to the value of PRECISION (set by the Forth word SET-PRECISION). If your numbers differ from the tables below in the last one or two digits, in another Forth system using double-precision arithmetic with round-to-nearest mode, the input and output floating point number bit patterns should be compared -- the floating point i/o routines e.g, implementations of >FLOAT and FS. may be responsible for the apparent difference in precision. Arguments x are exactly represented in IEEE 754 binary64 format 17 set-precision I. In this section, the output values from FSIN and FCOS forth words should agree with native fpu FSIN and FCOS instructions over this range of x: 0.0e0 -- 3.0e+04. x FSIN FCOS ------------------------------------------------------------------ 0.0e0 0.0000000000000000e+00 1.0000000000000000e+00 7.62939453125e-06 7.6293945311759854e-06 9.9999999997089617e-01 6.103515625e-05 6.1035156212104390e-05 9.9999999813735485e-01 2.44140625e-04 2.4414062257468080e-04 9.9999997019767772e-01 3.90625e-03 3.9062400659001166e-03 9.9999237061516999e-01 3.125e-02 3.1244913985326080e-02 9.9951175848513640e-01 1.25e-01 1.2467473338522769e-01 9.9219766722932901e-01 x FSIN FCOS -------------------------------------------------------------- 8.1250e-01 7.2600865526071257e-01 6.8768556222050481e-01 near pi/4 1.5750e+00 9.9999116457880310e-01 -4.2036608246882635e-03 near pi/2 2.3750e+00 6.9368503195327180e-01 -7.2027847145669177e-01 near 3pi/4 3.1250e+00 1.6591892229347906e-02 -9.9986234508168659e-01 near pi 3.8750e+00 -6.6940482623773601e-01 -7.4289782514799874e-01 near pi+pi/4 4.7500e+00 -9.9929278897537799e-01 3.7602152887976553e-02 near pi+pi/2 5.5000e+00 -7.0554032557039192e-01 7.0866977429125999e-01 near pi+3pi/4 6.3750e+00 9.1685748490177757e-02 9.9578799125305573e-01 near 2pi 7.0625e+00 7.0279205994072780e-01 7.1139533347096706e-01 near 2pi+pi/4 7.8750e+00 9.9977912227644916e-01 -2.1016818506448383e-02 near 2pi+pi/2 8.6250e+00 7.1720137699574560e-01 -6.9686597336604572e-01 near 2pi+3pi/4 9.3750e+00 4.9757406301078617e-02 -9.9876133311126403e-01 near 3pi 1.0250e+01 -7.3469843040479543e-01 -6.7839385047384526e-01 near 3pi+pi/4 1.1750e+01 -7.2866497582717005e-01 6.8487031838355339e-01 near 3pi+ 1.2625e+01 5.8595802590744185e-02 9.9828178983628990e-01 near 4pi 1.3375e+01 7.2334145789625870e-01 6.9049050340212137e-01 near 4pi+pi/4 1.5000e+01 6.5028784015711683e-01 -7.5968791285882131e-01 near 4pi+3pi/4 3.1250e+01 -1.6516621237357901e-01 9.8626574628249453e-01 near 10pi 6.3625e+01 7.1256470206981837e-01 7.0160640345150149e-01 near 20pi+pi/4 3.9975e+02 -6.9450594346639749e-01 -7.1948696617093000e-01 near 127pi+pi/4 1.0000e+03 8.2687954053200252e-01 5.6237907629070294e-01 1.0000e+04 -3.0561438888825215e-01 -9.5215536825901481e-01 3.0000e+04 -8.0266544186737399e-01 -5.9642953350069217e-01 -------------------------------------------------------------- II. Deviations between higher accuracy FSIN and FCOS forth words and native x87 fpu instructions appear for x >= 50,000 rad. x FSIN FCOS -------------------------------------------------------------- 5.0e+04 -9.9984018908978955e-01 -1.7877255966556333e-02 1.0e+05 3.5748797972016508e-02 -9.9936080743821243e-01 1.0e+06 -3.4999350217129294e-01 9.3675212753314474e-01 1.0e+07 4.2054779319078250e-01 -9.0727038618173961e-01 1.0e+08 9.3163902710972601e-01 -3.6338508935569053e-01 1.0e+09 5.4584344944869956e-01 8.3788718136390239e-01 1.0e+10 -4.8750602508751067e-01 8.7311962267685606e-01 1.0e+11 9.2869366049659197e-01 3.7084779216471114e-01 1.0e+12 -6.1123870237688949e-01 7.9144630185289022e-01 1.0e+13 -2.8888529481752512e-01 9.5736371690083999e-01 1.0e+14 -2.0940830749645231e-01 -9.7782828796853249e-01 1.0e+15 8.5827279317023586e-01 -5.1319373778697031e-01 1.0e+16 7.7968800660697879e-01 -6.2616819813308622e-01 1.0e+17 -4.6453010483537271e-01 -8.8555732829763067e-01 1.0e+18 -9.9296932074040511e-01 1.1837199021871073e-01 1.0e+19 -9.2706316604865036e-01 -3.7490516955071784e-01 1.0e+20 -6.4525128526578079e-01 7.6397040444172826e-01 1.0e+21 -6.6712017707180482e-01 7.4495011198313388e-01 1.0e+22 -8.5220084976718879e-01 5.2321478539513899e-01