Re: [Flashforth-devel] Floating point math for FF 5.x
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2015-05-11 20:41:52
|
I loaded your float number conversion routines just to check out the FP binary format. I noticed that you can skip DO..LOOP in favour of FOR NEXT and it even simplifies the code since 0 FOR NEXT just skips the loop completely. So for example: : flshiftn ( d-significand n-exponent n-times -- d n ) ?dup 0> if 0 do flshift loop then ; becomes: : flshiftn ( d-significand n-exponent n-times -- d n ) for flshift next ; All the loops in the FP code simply loop a fixed amount of times, which nicely suits the FOR NEXT. Anyway, I started to port Leons >float routine to FlashForth. Have you seen any other >float routines than Leons, that could be checked out ? BR Mike On 10.05.2015 21:02, om1zz wrote: > ..and what we need is a recogniser for floats.. It is already done for Amforth, so maybe it would be doable with FF too. > Currently you can convert integers to floats or define float constants via their IEEE values in hex (see the demos). > Would be great to be able to enter the floats directly, however :) > I. > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |