From: Leon N. M. <leo...@gm...> - 2010-08-27 21:32:43
|
Got it. If all you want to test is that f+, f-, f*, and f/ do what they're supposed to do, then make floats from single length integers with "s>f", then do what you want and convert them back to integers with "f>s" (that doesn't round -- it just truncates the part after the decimal point). For now, there's no direct way to display or make non-integers, but you can do it indirectly by dividing or multpilying by powers of 10 (e.g. you can get 0.125 by "125 s>f 1000 s>f f/") -Leon On Friday, August 27, 2010 04:21:35 pm pito wrote: > s>f defined after the first usage....You have to relocate the > Conversion words on the better place within the code(:-)). After the > second upload it has been taken. So now how to test??? I have no > idea... Float, float..P/ > > > ----- PŮVODNÍ ZPRÁVA ----- > Od: "pito" <pi...@vo...> > Komu: amf...@li... > Předmět: [Amforth-devel] Leon's float > Datum: 27.8.2010 - 23:03:31 > > > Hi Leon, > > I've tried to upload to my new 1284p, but getting > > this error: > > > > ..... > > > > > : f/ ( f1 f2 -- f1/f2 ) > > > > okfdup f0= abort" division by zero " > > okfzeroexponent >r ( f1 f2, R: n2 ) > > okfswap fzeroexponent r> - >r fswap ( f1 f2, R: > > n1-n2 ) > > okf0 frot frot ( sum remainder divisor, R: > > exponent ) > > ok[ 1 s>f ] frot frot ( sum toadd remainder > > divisor, R: exponent ) > > ^ > > ?? -13 8 > > > > > 25 0 do > > > > ok > > > > > fover f0= if leave then <<<<<<< here it crashed > > > so reset was > > > > > > > required > > > > Any prerequisite needed? > > 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 > > --------------------------------------------------------------------------- > --- 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 |