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
> 


------------------------------------------------------------------------------
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
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to