Diff of /floatingpoint/README.txt [r7] .. [r8]  Maximize  Restore

  Switch to side-by-side view

--- a/floatingpoint/README.txt
+++ b/floatingpoint/README.txt
@@ -1,29 +1,42 @@
-amforth-float -- a partially complete floating point wordset for amforth
+amforth-float -- a partly complete floating point wordset for AmForth,
+available at <http://amforth.sourceforge.net>. The basic floating point
+wordset is almost complete. The extension wordset is mostly incomplete. See
+the check list below.
 
-amforth.sourceforge.net
+This is a personal project -- I am not involved with the development of
+AmForth. However, this library has been included in amforth since version 4.2
+(along with some related libraries like assembly versions of some of the words).
 
-This is just a personal project -- I am not involved with the development of
-amforth. However, this library has been included in amforth since version 4.2
-(along with some related libraries like assemly versions of some of the words).
+To use this library as is, you need to include some words when assembling
+AmForth. Add the following to 'dict_appl.inc':
 
-The code requires 'd=', which doesn't seem to be compiled automatically. So
-either add it to 'dict_appl.inc' or uncomment the code in 'float.fth'.
-
-Having the word 'marker' isn't strictly needed, but it can be useful. If you
-want it, add
-
-.include "words/set-current.asm"
-.include "words/set-order.asm"
-
-to 'dict_appl.inc' when assembling amforth. Then upload 'lib/ans94/marker.frt'.
-
-Finially, if you want the recognizer to work (the code is at the end of
-'float.fth'; it allows you to enter floats just like normal numbers), add
-
+; needed for place-rec
 .include "words/n_to_r.asm"
 .include "words/n_r_from.asm"
 
-to 'dict_appl_core.inc'. Then upload 'lib/ans94/postpone.frt'.
+; for maker
+.include "dict_wl.inc"
+
+; needed for recognizer
+.include "words/get-recognizer.asm"
+.include "words/set-recognizer.asm"
+
+; other files for amforth-float
+.include "words/d-equal.asm"
+.include "words/2r_from.asm"
+.include "words/2to_r.asm"
+
+If you really want to avoid doing this, amforth-float can be modified to work
+while still retaining much of its functionality; see previous versions of the
+readme.
+
+Once AmForth is installed on the microcontroller, upload
+
+lib/ans94/core/postpone.frt
+lib/ans94/core-ext/marker.frt
+float.fth
+
+in that order.
 
 This floating point implementation is inspired by the IEEE 754-2008 binary32
 format -- your standard single precision float. I adapted their format to fit
@@ -33,11 +46,12 @@
 bits for the significant. See the basics at:
 http://en.wikipedia.org/wiki/Single_precision_floating-point_format
 
-These floats are stored on the data stack -- not on their own seperate stack.
+These floats are stored on the data stack -- not on their own separate stack.
 
 ANS94 Floating-point words check list
 Words with 'yes' next to them have been implemented. 
-see http://lars.nocrew.org/dpans/dpans12.htm
+see <http://lars.nocrew.org/dpans/dpans12.htm>
+or <http://galileo.phys.virginia.edu/classes/551.jvn.fall01/dpans12.htm>
 
 Floating-Point words:
 
@@ -82,7 +96,7 @@
 DFLOAT+
 DFLOATS
 F**
-F.
+F. yes
 FABS yes
 FACOS
 FACOSH
@@ -94,7 +108,7 @@
 FATANH
 FCOS
 FCOSH
-FE.
+FE. yes
 FEXP
 FEXPM1
 FLN
@@ -107,9 +121,9 @@
 FSQRT
 FTAN
 FTANH
-F~
-PRECISION
-SET-PRECISION 
+F~ yes
+PRECISION yes
+SET-PRECISION yes
 SF! 
 SF@
 SFALIGN
@@ -117,19 +131,50 @@
 SFLOAT+
 SFLOATS
 
-Other words in the library:
-FNIP ( f1 f2 -- f2 )
-FTUCK ( f1 f2 -- f2 f1 f2 )
-NFSWAP ( f n -- n f )
-FNSWAP ( n f -- f n )
-NFOVER ( f n -- f n f )
-FNOVER ( n f -- n f n )
+Other words in the library that you may find useful but aren't part of the standard:
+-stack manipulation words:
+  FNIP ( f1 f2 -- f2 )
+  FTUCK ( f1 f2 -- f2 f1 f2 )
+  NFSWAP ( f n -- n f )
+  FNSWAP ( n f -- f n )
+  NFOVER ( f n -- f n f )
+  FNOVER ( n f -- n f n )
+    (Note that The way to remember the FN/NF words is that FN/NF shows the top two items on the stack after executing the word. E.g. for FNSWAP, after execution the stack will be F N.)
+-float comparison words:
+  F= ( f1 f2 -- flag )
+  F< ( f1 f2 -- flag )
+  F> ( f1 f2 -- flag )
+  F>= ( f1 f2 -- flag )
+  F<= ( f1 f2 -- flag )
+-float constants:
+  F0 ( -- f-0 ) returns a float equal to zero
+  F1 ( -- f-1 )
+  F10 ( -- f-10 )
+-float operators:
+  F10^N  ( n -- f-10^n )
+  CEIL ( f -- f ) returns the ceiling of f
+-float <-> single conversion:
+  S>F ( n -- f )
+  F>S ( f -- n )
+-float display:
+  FSD. ( f -- ) prints the float in scientific notation using the dragon2 algorithm, which automatically decides how many digits to print
+  FEE. ( f -- n) prints out the mantissa in engineering notation but leaves the exponent on the stack
+  SI. ( n -- ) prints the SI prefixes for the exponent on the stack
+    Note: these last two can be used together to print out numbers with SI prefixes for example:
+      > 555.66e5 fee. si.
+      55.57M ok
+-double words
+  D0= ( d -- flag )
+  D= ( d1 d2 -- flag )
+  D0< ( d -- flag )
+  D10* ( d -- d*10 )
+-other:
+  FALSE ( -- n-0 )
+  >= ( n1 n2 -- flag ) the flag is true if n1 >= n2 and false otherwise
 
-The way to remember the FN/NF words is that FN/NF shows the top two items on
-the stack after executing the word. E.g. for FNSWAP, after execution the stack
-will be F N.
+There are many words in the library that are helper words and you'll probably have no use for.
 
-All the files that make up this library are copyright 2011 by Leon Maurer.
+All the files that make up this library are copyright 2013 by Leon Maurer.
 
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
@@ -143,4 +188,4 @@
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks