|
From: pito <pi...@vo...> - 2010-08-29 13:07:53
|
Hi, here are some useful constants for Leon's float lib. Precision ~10^-8 or better. Pito ____________________ marker _floatconstants_ \ some float constants 355 s>f 113 s>f f/ fconstant _pi 355 s>f 226 s>f f/ fconstant _pi_half 355 s>f 452 s>f f/ fconstant _pi_quarter 8119 s>f 5741 s>f f/ fconstant _sqrt2 5741 s>f 8119 s>f f/ fconstant _sqrt2half 13755 s>f 7953 s>f f/ fconstant _sqrt3 27379 s>f 8658 s>f f/ fconstant _sqrt10 25946 s>f 9545 s>f f/ fconstant _e 4319 s>f 6231 s>f f/ fconstant _ln2 5225 s>f 4756 s>f f/ fconstant _ln3 12381 s>f 5377 s>f f/ fconstant _ln10 2718 s>f 9029 s>f f/ fconstant _log2 1074 s>f 2251 s>f f/ fconstant _log3 10691 s>f 462 s>f f/ fconstant _e**pi 26120 s>f 1163 s>f f/ fconstant _pi**e 1 s>f 2 s>f f/ fconstant _half 1 s>f 3 s>f f/ fconstant _third 1 s>f 10 s>f f/ fconstant _10th 1 s>f 100 s>f f/ fconstant _100th 1 s>f 100 s>f f/ fconstant _1000th 5 s>f 127 s>f f/ fconstant _mm2inch ______________________________ Ex: > 1000 s>f _mm2inch f* f>s . 39 ok > 10000 s>f _mm2inch f* f>s . 393 ok > 100 s>f fdup f* _pi f* f>s . 31415 ok > |
|
From: pito <pi...@vo...> - 2010-08-29 14:10:04
|
1 bug (_thousand) removed: marker _floatconstants_ \ some float constants 355 s>f 113 s>f f/ fconstant _pi 355 s>f 226 s>f f/ fconstant _pi_half 355 s>f 452 s>f f/ fconstant _pi_quarter 8119 s>f 5741 s>f f/ fconstant _sqrt2 5741 s>f 8119 s>f f/ fconstant _sqrt2half 13755 s>f 7953 s>f f/ fconstant _sqrt3 27379 s>f 8658 s>f f/ fconstant _sqrt10 25946 s>f 9545 s>f f/ fconstant _e 4319 s>f 6231 s>f f/ fconstant _ln2 5225 s>f 4756 s>f f/ fconstant _ln3 12381 s>f 5377 s>f f/ fconstant _ln10 2718 s>f 9029 s>f f/ fconstant _log2 1074 s>f 2251 s>f f/ fconstant _log3 10691 s>f 462 s>f f/ fconstant _e**pi 26120 s>f 1163 s>f f/ fconstant _pi**e 1 s>f 2 s>f f/ fconstant _half 1 s>f 3 s>f f/ fconstant _third 1 s>f 10 s>f f/ fconstant _10th 1 s>f 100 s>f f/ fconstant _100th 1 s>f 1000 s>f f/ fconstant _1000th 5 s>f 127 s>f f/ fconstant _mm2inch Ex1: > _pi _e _ln2 _sqrt2half 10000 s>f _third f* f* f* f* f* f>s . 13951 ok > .s ok Calc: 13951.906691388013 Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "pito" <pi...@vo...> Komu: pi...@vo..., leo...@gm..., amf...@li... Předmět: Some useful Float Constants Datum: 29.8.2010 - 15:07:46 > Hi, here are some useful constants for Leon's > float lib. > Precision ~10^-8 or better. Pito > > ____________________ > > marker _floatconstants_ > > \ some float constants > > 355 s>f 113 s>f f/ fconstant _pi > > 355 s>f 226 s>f f/ fconstant _pi_half > > 355 s>f 452 s>f f/ fconstant _pi_quarter > > 8119 s>f 5741 s>f f/ fconstant _sqrt2 > > 5741 s>f 8119 s>f f/ fconstant _sqrt2half > > 13755 s>f 7953 s>f f/ fconstant _sqrt3 > > 27379 s>f 8658 s>f f/ fconstant _sqrt10 > > 25946 s>f 9545 s>f f/ fconstant _e > > 4319 s>f 6231 s>f f/ fconstant _ln2 > > 5225 s>f 4756 s>f f/ fconstant _ln3 > > 12381 s>f 5377 s>f f/ fconstant _ln10 > > 2718 s>f 9029 s>f f/ fconstant _log2 > > 1074 s>f 2251 s>f f/ fconstant _log3 > > 10691 s>f 462 s>f f/ fconstant _e**pi > > 26120 s>f 1163 s>f f/ fconstant _pi**e > > 1 s>f 2 s>f f/ fconstant _half > > 1 s>f 3 s>f f/ fconstant _third > > 1 s>f 10 s>f f/ fconstant _10th > > 1 s>f 100 s>f f/ fconstant _100th > > 1 s>f 100 s>f f/ fconstant _1000th > > 5 s>f 127 s>f f/ fconstant _mm2inch > > ______________________________ > > Ex: > > 1000 s>f _mm2inch f* f>s . > 39 ok > > 10000 s>f _mm2inch f* f>s . > 393 ok > > 100 s>f fdup f* _pi f* f>s . > 31415 ok > > > |
|
From: Leon N M. <leo...@gm...> - 2010-08-29 17:19:57
|
Is the bug that it returns 13951 but the calculator returns 13951.906691388013? That should be expected because f>s truncates the fractional part -- it doesn't round. -Leon >Sunday 29 August 2010 >From: "pito" <pi...@vo...> >Subject: Re: Some useful Float Constants > 1 bug (_thousand) removed: ... > Ex1: > > _pi _e _ln2 _sqrt2half 10000 s>f _third f* f* f* f* f* f>s . > > 13951 ok > > > .s > > ok > Calc: 13951.906691388013 > Pito |
|
From: pito <pi...@vo...> - 2010-08-29 17:38:37
|
Leon, no it is not about the rounding, the bug was in my source: 1 s>f 100(0)<<<<here]]] s>f f/ fconstant _1000th. Of course, I do not expect decimal places..(:-)). Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "Leon N Maurer" <leo...@gm...> Komu: amf...@li... Předmět: Re: [Amforth-devel] Some useful Float Constants Datum: 29.8.2010 - 19:19:49 > Is the bug that it returns 13951 but the > calculator returns > 13951.906691388013? That should be expected > because f>s truncates the > fractional part -- it doesn't round. > -Leon > > >Sunday 29 August 2010 > >From: "pito" <pi...@vo...> > >Subject: Re: Some useful Float Constants > > 1 bug (_thousand) removed: > > ... > > > Ex1: > > > _pi _e _ln2 _sqrt2half 10000 s>f _third f* f* > > > f* f* f* f>s . > > > > > > 13951 ok > > > > > .s > > > > ok > > Calc: 13951.906691388013 > > Pito > > ------------------------------------------------------------------------------ > > Sell apps to millions through the Intel(R) > Atom(Tm) Developer Program > Be part of this innovative community and reach > millions of netbook users > worldwide. Take advantage of special opportunities > to increase revenue and > speed time-to-market. Join now, and jumpstart your > future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Amforth-devel mailing list > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: pito <pi...@vo...> - 2010-08-30 11:29:39
|
Hi, this is an update for experimenters (till we get input/output of float numbers): ------------------------------------------ marker _floatconstants_ \ some float constants 355 s>f 113 s>f f/ fconstant _pi 355 s>f 226 s>f f/ fconstant _pi_half 355 s>f 452 s>f f/ fconstant _pi_quarter 8119 s>f 5741 s>f f/ fconstant _sqrt2 5741 s>f 8119 s>f f/ fconstant _sqrt2half 13755 s>f 7953 s>f f/ fconstant _sqrt3 27379 s>f 8658 s>f f/ fconstant _sqrt10 25946 s>f 9545 s>f f/ fconstant _e 4319 s>f 6231 s>f f/ fconstant _ln2 5225 s>f 4756 s>f f/ fconstant _ln3 12381 s>f 5377 s>f f/ fconstant _ln10 2718 s>f 9029 s>f f/ fconstant _log2 1074 s>f 2251 s>f f/ fconstant _log3 10691 s>f 462 s>f f/ fconstant _e**pi 26120 s>f 1163 s>f f/ fconstant _pi**e 1 s>f 2 s>f f/ fconstant _half 1 s>f 3 s>f f/ fconstant _third 1 s>f 10 s>f f/ fconstant _10th 1 s>f 100 s>f f/ fconstant _100th 1 s>f 1000 s>f f/ fconstant _1000th 5 s>f 127 s>f f/ fconstant _mm2inch 10 s>f fconstant _10 100 s>f fconstant _100 1000 s>f fconstant _1000 _1000 fconstant _1e3 10000 s>f fconstant _1e4 _1000 1000 s>f f* fconstant _1e6 _1e6 1000 s>f f* fconstant _1e9 _1e9 1000 s>f f* fconstant _1e12 1 s>f 1000 s>f f/ fconstant _1e-3 _1e-3 1000 s>f f/ fconstant _1e-6 _1e-6 1000 s>f f/ fconstant _1e-9 _1e-9 1000 s>f f/ fconstant _1e-12 ____________________ Ex: > _pi _1e-6 _1000 _1000 _1e4 f* f* f* f* f>s . 31415 ok > _pi _1e-6 _1e3 _1e3 _1e4 f* f* f* f* f>s . 31415 ok > Pito |
|
From: pito <pi...@vo...> - 2010-09-03 16:40:39
|
The last update: ----------------------------- marker _floatconstants_ \ some float constants 355 s>f 113 s>f f/ fconstant _pi 355 s>f 226 s>f f/ fconstant _pi_half 355 s>f 452 s>f f/ fconstant _pi_quarter 8119 s>f 5741 s>f f/ fconstant _sqrt2 5741 s>f 8119 s>f f/ fconstant _sqrt2half 13755 s>f 7953 s>f f/ fconstant _sqrt3 27379 s>f 8658 s>f f/ fconstant _sqrt10 25946 s>f 9545 s>f f/ fconstant _e 4319 s>f 6231 s>f f/ fconstant _ln2 5225 s>f 4756 s>f f/ fconstant _ln3 12381 s>f 5377 s>f f/ fconstant _ln10 2718 s>f 9029 s>f f/ fconstant _log2 1074 s>f 2251 s>f f/ fconstant _log3 10691 s>f 462 s>f f/ fconstant _e**pi 26120 s>f 1163 s>f f/ fconstant _pi**e 1 s>f 2 s>f f/ fconstant _half 1 s>f 3 s>f f/ fconstant _third 5 s>f 127 s>f f/ fconstant _mm2inch 10 s>f fconstant _10 100 s>f fconstant _1e2 1000 s>f fconstant _1e3 10000 s>f fconstant _1e4 _1e3 _1e3 f* fconstant _1e6 _1e6 _1e3 f* fconstant _1e9 _1e9 _1e3 f* fconstant _1e12 _1e12 _1e3 f* fconstant _1e15 _1e15 _1e3 f* fconstant _1e18 1 s>f 10 s>f f/ fconstant _1e-1 _1e-1 _1e-1 f* fconstant _1e-2 _1e-2 _1e-1 f* fconstant _1e-3 _1e-3 _1e-1 f* fconstant _1e-4 _1e-3 _1e-3 f* fconstant _1e-6 _1e-6 _1e-3 f* fconstant _1e-9 _1e-9 _1e-3 f* fconstant _1e-12 _1e-12 _1e-3 f* fconstant _1e-15 _1e-15 _1e-3 f* fconstant _1e-18 0 s>f fconstant _0 -1 s>f fconstant _-1 1 s>f fconstant _1 |
|
From: pito <pi...@vo...> - 2010-09-05 09:00:31
|
The most precise version: \ marker _float$constants_ \ some float constants $0fdb $4049 fconstant _pi $04f3 $3fb5 fconstant _sqrt2 $f854 $402d fconstant _e $7217 $3f31 fconstant _ln2 $5d8d $4013 fconstant _ln10 $209a $3e9a fconstant _log2 $0000 $3f00 fconstant _half $aaaa $3eaa fconstant _third 5 s>f 127 s>f f/ fconstant _mm2inch 10 s>f fconstant _10 100 s>f fconstant _1e2 1000 s>f fconstant _1e3 10000 s>f fconstant _1e4 _1e3 _1e3 f* fconstant _1e6 _1e6 _1e3 f* fconstant _1e9 _1e9 _1e3 f* fconstant _1e12 _1e12 _1e3 f* fconstant _1e15 _1e15 _1e3 f* fconstant _1e18 $cccc $3dcc fconstant _1e-1 $d70a $3c23 fconstant _1e-2 $126e $3a83 fconstant _1e-3 $b717 $38d1 fconstant _1e-4 $37bd $3586 fconstant _1e-6 $705f $3089 fconstant _1e-9 $bccc $2b8c fconstant _1e-12 $1d7c $2690 fconstant _1e-15 $92ee $2193 fconstant _1e-18 0 s>f fconstant _0 -1 s>f fconstant _-1 1 s>f fconstant _1 Pito |
|
From: pito <pi...@vo...> - 2010-09-22 11:28:35
|
Hi, an update of useful floating point constants (rounded, single precision). Good for testing of flibs until finput available. \ marker _float$constants_ \ some floating point constants, rounded $0fdb $4049 fconstant _pi $0fdb $c049 fconstant _-pi $04f3 $3fb5 fconstant _sqrt2 $04f3 $bfb5 fconstant _-sqrt2 $f854 $402d fconstant _e $f854 $c02d fconstant _-e $7218 $3f31 fconstant _ln2 $7218 $bf31 fconstant _-ln2 $5d8e $4013 fconstant _ln10 $5d8e $c013 fconstant _-ln10 $209b $3e9a fconstant _log2 $209b $be9a fconstant _-log2 $0000 $3f00 fconstant _half $0000 $bf00 fconstant _-half $aaab $3eaa fconstant _third $aaab $beaa fconstant _-third 5 s>f 127 s>f f/ fconstant _mm2inch 10 s>f fconstant _10 100 s>f fconstant _1e2 1000 s>f fconstant _1e3 10000 s>f fconstant _1e4 _1e3 _1e3 f* fconstant _1e6 _1e6 _1e3 f* fconstant _1e9 _1e9 _1e3 f* fconstant _1e12 _1e12 _1e3 f* fconstant _1e15 _1e15 _1e3 f* fconstant _1e18 $cccd $3dcc fconstant _1e-1 $d70a $3c23 fconstant _1e-2 $126f $3a83 fconstant _1e-3 $b717 $38d1 fconstant _1e-4 $c5ac $3727 fconstant _1e-5 $37bd $3586 fconstant _1e-6 $705f $3089 fconstant _1e-9 $bccc $2b8c fconstant _1e-12 $1d7d $2690 fconstant _1e-15 $92ef $2193 fconstant _1e-18 0 s>f fconstant _0 -1 s>f fconstant _-1 1 s>f fconstant _1 |