flashforth-devel Mailing List for FlashForth: for PIC and Atmega (Page 23)
Brought to you by:
oh2aun
You can subscribe to this list here.
2011 |
Jan
|
Feb
(22) |
Mar
(3) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
|
Aug
(6) |
Sep
|
Oct
(20) |
Nov
(9) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(4) |
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(14) |
Nov
(1) |
Dec
|
2013 |
Jan
(4) |
Feb
(5) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(29) |
Jul
(7) |
Aug
|
Sep
(20) |
Oct
(9) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
|
Feb
(23) |
Mar
(113) |
Apr
(25) |
May
(31) |
Jun
(9) |
Jul
(47) |
Aug
(15) |
Sep
(1) |
Oct
(4) |
Nov
(8) |
Dec
(3) |
2015 |
Jan
(21) |
Feb
(1) |
Mar
(18) |
Apr
(16) |
May
(100) |
Jun
(33) |
Jul
|
Aug
(10) |
Sep
(8) |
Oct
(7) |
Nov
(5) |
Dec
|
2016 |
Jan
(12) |
Feb
(9) |
Mar
|
Apr
(7) |
May
(5) |
Jun
(9) |
Jul
(1) |
Aug
(2) |
Sep
(17) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
(12) |
Mar
(9) |
Apr
(3) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
|
Nov
|
Dec
(10) |
2018 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
(4) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(21) |
Oct
(3) |
Nov
|
Dec
|
2019 |
Jan
(5) |
Feb
(4) |
Mar
|
Apr
|
May
(3) |
Jun
(11) |
Jul
(4) |
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(9) |
Dec
(7) |
2020 |
Jan
(2) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(8) |
Apr
(40) |
May
(12) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(10) |
Dec
(4) |
2022 |
Jan
(29) |
Feb
(7) |
Mar
(10) |
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2023 |
Jan
(8) |
Feb
|
Mar
(5) |
Apr
(9) |
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(9) |
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: om1zz <om...@vo...> - 2015-05-18 13:04:05
|
Peter, Mikael, thanks for the info! I've tried the python ff-shell under XP with no luck (it throws some errors). There is a small editor/loader called Forfiter, I used to use in past. You can set cr/nl delay to, for example, 1000ms, and any upcoming 'ok' will bypass that delay then. The Forfiter works fine with amforth, but with FF there is an issue - the FF does not return 'ok' after each line when it receives lines (amforth does). So with single liners it works nice (it receives 'ok' and goes immediately to the next line), but with comments and words defs over many lines it simply waits 1000ms at each line until the final 'ok' arrives. Would it be possible to print 'ok' after each line received in FF?? I. |
From: Mikael N. <mik...@fl...> - 2015-05-18 12:21:32
|
I am using the ff-shell.py from the ff distribution. It is the only program I found to work reliably with USB-to-Serial converters. Use the #send filepath/filename command to send a file to ff reliably without any delays. The #send command waits for a newline from the PIC before sending the next line. In addition I have XON/XOFF configured. I have not tried it under windows but I think it should be possible to run Python programs in Windows. The Python pyserial lib is required. Another option that usually works with any terminal program is to use CTS/RTS HW flow control. You have to wire a pin for the CTS signal to USB-Serial converter for this. The problem with most converters is that they do not support XON/XOFF well because they have so large buffers that the XOFF is not transfered until it is too late. BR Mike |
From: Peter J. <pe...@me...> - 2015-05-18 11:08:52
|
When building the Tcl/Tk version of ff-shell, I found that I needed a 1ms pause between characters, else I would occasionally experience buffer over-runs on a PIC24. Both the Python and Tcl versions of ff-shell wait for the microcontroller to return a carriage-return before sending subsequent lines when sending a file. It's more certain than an end-of line delay that you mention below (and it's quicker, mostly). Could you try ff-shell.tcl to see if it behaves well? Regards, Peter J. On 18/05/15 20:35, om1zz wrote: > The issue below has been with copy/paste into the terminal window. > When uploading the file with Send File I get after ~13 lines: > ok<#,ram> > -fpmath |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||... > I. > > >> Hi, I've been using Teraterm and Ca-42 dongle under XP. >> I set TX, RX buffer to 511, and RX OFF FILL to 128. >> dspic33fj at 40MHz Fcy, latest FF. >> >> Running 115k2, 8N1, Xon/Xoff is set in the serial settings. >> When uploading a code (ie float.txt) it uploads ~520 lines fines and then >> >> abs 1- emitnzeros \ print n-steps - 1 leading zeros 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 >> >> Is there any experience how to set the stuff such it works withou a need for character and line delays (which when set to 1ms and 100ms works fine), plz? >> 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 |
From: om1zz <om...@vo...> - 2015-05-18 10:35:24
|
The issue below has been with copy/paste into the terminal window. When uploading the file with Send File I get after ~13 lines: ok<#,ram> -fpmath |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||... I. >Hi, I've been using Teraterm and Ca-42 dongle under XP. >I set TX, RX buffer to 511, and RX OFF FILL to 128. >dspic33fj at 40MHz Fcy, latest FF. > >Running 115k2, 8N1, Xon/Xoff is set in the serial settings. >When uploading a code (ie float.txt) it uploads ~520 lines fines and then > > abs 1- emitnzeros \ print n-steps - 1 leading zeros 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > >Is there any experience how to set the stuff such it works withou a need for character and line delays (which when set to 1ms and 100ms works fine), plz? >I. > |
From: om1zz <om...@vo...> - 2015-05-18 10:23:44
|
Hi, I've been using Teraterm and Ca-42 dongle under XP. I set TX, RX buffer to 511, and RX OFF FILL to 128. dspic33fj at 40MHz Fcy, latest FF. Running 115k2, 8N1, Xon/Xoff is set in the serial settings. When uploading a code (ie float.txt) it uploads ~520 lines fines and then abs 1- emitnzeros \ print n-steps - 1 leading zeros 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Is there any experience how to set the stuff such it works withou a need for character and line delays (which when set to 1ms and 100ms works fine), plz? I. |
From: Mikael N. <mik...@fl...> - 2015-05-17 13:17:45
|
Thanks. I will add it to the distribution. BR Mike On 17.05.2015 14:23, Pablo M. Muñoz wrote: > Hello, > > I found that pick is no longer in core.txt. I suppose that the cause is > that stack implementations change between proccesors, so now we need a > different pick for each one. > > Just my humble contribution: > > \ xu ... x0 u -- xu ... x0 xu > : pick 2* sp@ + @ ; > > Tested with FF5.0 on an ATmega328p. > > 73, Pablo - EA4FUK > |
From: Pablo M. M. <ea...@ho...> - 2015-05-17 11:23:13
|
Hello, I found that pick is no longer in core.txt. I suppose that the cause is that stack implementations change between proccesors, so now we need a different pick for each one. Just my humble contribution: \ xu ... x0 u -- xu ... x0 xu : pick 2* sp@ + @ ; Tested with FF5.0 on an ATmega328p. 73, Pablo - EA4FUK |
From: om1zz <om...@vo...> - 2015-05-16 11:27:03
|
Part II. This is a short intro how the single precision (32bit) floating point numbers work in the lib: We need to process some data coming from ADC, 9DOF, I2C sensors with our FF system, of course :) To process integers you may use the s>f and d>f words for conversion to float. For example, with "precison" set to 7 (6decimal places) for printing with fs. : 16bit signed integers: 100 s>f fs. 1.000000E2 ok<#,ram> -100 s>f fs. -1.000000E2 ok<#,ram> 30001 s>f fs. 3.000100E4 ok<#,ram> -30001 s>f fs. -3.000100E4 ok<#,ram> 32bit signed integers: 12000000. d>f fs. 1.200000E7 ok<#,ram> -12000000. d>f fs. -1.200000E7 ok<#,ram> 12345678. d>f fs. 1.234568E7 ok<#,ram> 10000000. d>f 10000000. d>f f* fs. 1.000000E14 ok<#,ram> -1000000. d>f 1. d>f f+ fs. -9.999990E5 ok<#,ram> Happy floating! I. |
From: om1zz <om...@vo...> - 2015-05-16 10:48:47
|
This is a short intro how the single precision (32bit) floating point numbers work in the lib: For example 3.141592653589793 converts into IEEE-754 single precision (32bit) floating point as: 0x40490FDA as not rounded, or 0x40490FDB as rounded. That converts back to decimal format as: 0x40490FDA = 3.1415925 not rounded 0x40490FDB = 3.1415927 rounded. So 32bit FP works with 7 decimal digits after the decimal point, 8 digits of mantissa (significand) in total are max what the IEEE-754 processes. For an input the library can process 1 dec place of mantissa more (as the mantissa still fits into signed long int during processing the decimal string), therefore you may enter f# 3.14159265e ( 314.159.265 fits ) and it will round properly into the binary FP format stored. Entering additional digits of mantissa may not fit into signed long int (used during processing of the string) so it throws an overrun. When printing with fs. (and the "precision" set to 7 - the number of ALL digits of mantissa to be printed out) you get f# 3.14159265e fs. 3.141593E0 ok When you want enter FP constants directly, you have to convert the decimal number into IEEE-754 single precision binary format and use (for example) as follows: $0fda $4049 fconstant fpi $0fda $c049 fconstant f-pi $0fda $3fc9 fconstant fpi/2 $0fda $bfc9 fconstant f-pi/2 Mind the sequence - lower word first, then the higher word. Or you may calculate directly with floats in hexa $0fda $3fc9 $0fda $bfc9 f* ( fpi/2 * f-pi/2 ) f# 3.14159265e $0fda $3fc9 f/ ( fpi / fpi/2 ) Happy floating, I. |
From: om1zz <om...@vo...> - 2015-05-15 22:14:18
|
We have problems with large numbers and alike results, it seems. This test which worked with amforth crashes fs. : \ large positive and negative $ffff $ff7f fs. ." shall be -3.402823466e+38 " cr $ffff $7f7f fs. ." shall be 3.402823466e+38 " cr Moreover all tests where the result is undefined, and usualy returned above numbers (with my amforth asm float lib), returns now 0xffff 0x7fff from xc16 float, for example: f-1.0 flog ok<#,ram> 65535 32767 fpi/2 fasin ok<#,ram> 65535 32767 fpi/2 facos ok<#,ram> 65535 32767 what crashes fs. as well. So we must rethink how to print these states. i. |
From: om1zz <om...@vo...> - 2015-05-15 21:12:01
|
Not a critical bug, rather a feature :) f# 0.0000000000000000158e fs. 1.580000E-17 ok<#,ram> f# 9.999999999e0 fs. overflow float? f# 3.141592653589793e0 fs. overflow float? More than 7 digits to enter does not improve single precision, but maybe it could be handled somehow.. Nice to have requirement :) PS: plz remove .s from f# :) i. ______________________________________________________________ > Od: Mikael Nordman <mik...@fl...> > Komu: <fla...@li...> > Datum: 15.05.2015 19:17 > Předmět: Re: [Flashforth-devel] Floating point math for FF 5.x > >Fixed. > >On 15.05.2015 18:28, om1zz wrote: >> It compiles fine under MPLABX.. >> >> The parse test I've send you passes ok, it seems, but I've found a small bug: >> ok<#,ram> >> f# -1000000000.0e10 fs. ďAS FlashForth PIC24 15.05.2015 >> > >------------------------------------------------------------------------------ >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 > |
From: om1zz <om...@vo...> - 2015-05-15 19:22:22
|
Could you set the printer precision to 7 (line 480) plz? So we can see potential issues better. Also mchp uses 6dec places in the xc16 guide, thus we can compare the values. PS: here in float.txt the precision is the number of digits to be printed in total, while xc16 uses it for number of digits after decimal point. I. |
From: om1zz <om...@vo...> - 2015-05-15 18:35:32
|
Thanks!, :) I. ______________________________________________________________ > Od: Mikael Nordman <mik...@fl...> > Komu: <fla...@li...> > Datum: 15.05.2015 20:26 > Předmět: Re: [Flashforth-devel] Free memory size > >#send forth/free.txt >.free >Flash:29607 bytes >Ram:14151 bytes ok<#,ram> > >------------------------------------------------------------------------------ >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 > |
From: Mikael N. <mik...@fl...> - 2015-05-15 18:26:52
|
#send forth/free.txt .free Flash:29607 bytes Ram:14151 bytes ok<#,ram> |
From: om1zz <om...@vo...> - 2015-05-15 18:08:38
|
How we can see the volume of free ram and flash plz? I. |
From: Mikael N. <mik...@fl...> - 2015-05-15 17:16:23
|
Fixed. On 15.05.2015 18:28, om1zz wrote: > It compiles fine under MPLABX.. > > The parse test I've send you passes ok, it seems, but I've found a small bug: > ok<#,ram> > f# -1000000000.0e10 fs. ďAS FlashForth PIC24 15.05.2015 > |
From: om1zz <om...@vo...> - 2015-05-15 17:02:54
|
For educational purposes :) \ Library - SIN COS TAN \ for FlashForth 5.x \ IgorM 25-9-2010 and 5/2015 \ v 3.0. \ based on 4tH library by J.L. Bezemer -fsincostan marker -fsincostan \ the original Bezemer's taylor does not work here \ as it needs a separate floating point stack!! : >taylor fdup f* fover ; \ setup for Taylor series : _taylor fover f* frot fover ; : +taylor f/ f+ frot frot ; \ add Taylor iteration : -taylor f/ f- frot frot ; \ subtract Taylor iteration \ put x in RADIANS within 2pi range : >range $0fdb $4049 fdup f+ ( x pi2 ) fover fover f/ ( x pi2 x/pi2 ) floor fover f* ( x pi2 mod ) frot fswap f- ( pi2 mod ) $0fdb $4049 fover ( pi2 mod pi mod ) f< if fswap f- else fnip then ; : _fsin fdup >taylor ( x x2 x ) _taylor $0000 $40c0 -taylor ( x-3 x2 x3 ) _taylor $0000 $42f0 +taylor ( x+5 x2 x5 ) _taylor $8000 $459d -taylor ( x-7 x2 x7 ) _taylor $3000 $48b1 +taylor ( x+9 x2 x9 ) _taylor $4540 $4c18 -taylor ( x-11 x2 x11 ) _taylor $9466 $4fb9 +taylor ( x+13 x2 x13 ) _taylor $3bbc $5398 -taylor ( x-15 x2 x15 ) _taylor $bf77 $57a1 +taylor ( x+17 x2 x17 ) _taylor $15ca $5bd8 -taylor ( x-19 x2 x19 ) fdrop fdrop ; ( x-19 ) \ calculate fsin : fsinf ( RAD -- sinus ) fdup f0< >r fabs >range fdup $0fdb $4049 f> if $0fdb $4049 f- 1 >r else 0 >r then fdup $0fdb $3fc9 f> if $0fdb $4049 fswap f- then _fsin r> if fnegate then r> if fnegate then ; \ calculate fcos : fcosf ( RAD -- cosinus ) $0fdb $3fc9 f+ fsinf ; \ calculate ftan : ftanf ( RAD -- tangens ) fdup fsinf fswap fcosf fdup f0= if abort else f/ then ; f# 0.5e fsin fs. 4.79426E-1 ok<#,ram> f# 0.5e fsinf fs. 4.79426E-1 ok<#,ram> f# 0.5e fcos fs. 8.77583E-1 ok<#,ram> f# 0.5e fcosf fs. 8.77583E-1 ok<#,ram> f# 0.5e ftan fs. 5.46303E-1 ok<#,ram> f# 0.5e ftanf fs. 5.46303E-1 ok<#,ram> |
From: Mikael N. <mik...@fl...> - 2015-05-15 16:43:22
|
Floats need always the trailing 'e'. I thank that is the forth custom. BR |
From: om1zz <om...@vo...> - 2015-05-15 16:36:58
|
\ TRIGONOMETRIC FUNCTIONS TEST - 9 degree test \ Based on "9 DEGREE" calculator test \ asin(acos(atan(tan(cos(sin(9.0)))))) == 9.0 \ other results at: \ http://www.rskey.org/~mwsebastian/miscprj/results.htm \ IgorM 2015 -trig9 marker -trig9 : Pi f# 3.14159265e ; : d2r Pi f# 180e f/ ; : r2d f# 180e Pi f/ ; : TRIG9 d2r f* fsin d2r f* fcos d2r f* ftan fatan r2d f* facos r2d f* fasin r2d f* ; \ 9.0 degree must return 9.0 degree \ not with single precision, however :) f# 9.0e TRIG9 fs. f# 9.0e TRIG9 fs. 8.88809E0 ok<#,ram> |
From: om1zz <om...@vo...> - 2015-05-15 16:12:09
|
f# 180 fs. float? f# 180. fs. float? f# 180.0 fs. float? f# 180e fs. 1.80000E2 ok<#,ram> 180 is the integer in FF 180. is the long integer in FF 180.0 - this has to be recognised as float, not sure how it is handled today in the lib.. i. |
From: om1zz <om...@vo...> - 2015-05-15 15:28:34
|
It compiles fine under MPLABX.. The parse test I've send you passes ok, it seems, but I've found a small bug: ok<#,ram> f# -1000000.0e10 fs. -1.00000E16 ok<#,ram> f# -10000000.0e10 fs. -1.00000E17 ok<#,ram> f# -100000000.0e10 fs. -1.00000E18 ok<#,ram> f# -1000000000.0e10 fs. ďAS FlashForth PIC24 15.05.2015 i. ______________________________________________________________ > Od: Mikael Nordman <mik...@fl...> > Komu: <fla...@li...> > Datum: 15.05.2015 17:16 > Předmět: Re: [Flashforth-devel] Floating point math for FF 5.x > >You need to add the library directory to the linker path. > >I did that on my mplabx/xc16 setup to make it work. > >I dont use old MPLAB anymore. > >It could also be that your lib files have different symbol names than >the XC16 libraries. > > >------------------------------------------------------------------------------ >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 > |
From: Mikael N. <mik...@fl...> - 2015-05-15 15:15:22
|
You need to add the library directory to the linker path. I did that on my mplabx/xc16 setup to make it work. I dont use old MPLAB anymore. It could also be that your lib files have different symbol names than the XC16 libraries. |
From: om1zz <om...@vo...> - 2015-05-15 14:33:24
|
Trying to compile for pic33 the latest trunk under MPLAB (not X) and getting linker errors - undefined reference to all those mchp floating point stuff like "___addsf3" etc. So we are missing something.. |
From: om1zz <om...@vo...> - 2015-05-15 09:50:17
|
A test for your floats parsing experiments: \ FLOATS PARSING TEST \ IgorM 2012-15 \ TEST START f# 0e0 fs. f# -0e0 fs. f# -0e-0 fs. f# -0e-0 fs. f# +0e-0 fs. f# +0e+0 fs. f# 0.0e0 fs. f# -0.0e0 fs. f# -0.0e-0 fs. f# -0.0e-0 fs. f# +0.0e-0 fs. f# +0.0e+0 fs. f# 1e0 fs. f# -1e0 fs. f# -1e-0 fs. f# -1e-0 fs. f# +1e-0 fs. f# +1e+0 fs. f# 1.0e0 fs. f# -1.0e0 fs. f# -1.0e-0 fs. f# -1.0e-0 fs. f# +1.0e-0 fs. f# +1.0e+0 fs. f# 1.0e09 fs. f# -1.0e09 fs. f# -1.0e-09 fs. f# -1.0e-09 fs. f# +1.0e-09 fs. f# +1.0e+09 fs. f# 9e0 fs. f# -9e0 fs. f# 9e-0 fs. f# -9e+0 fs. f# 9e09 fs. f# -9e09 fs. f# 9e-09 fs. f# -9e+09 fs. f# +9e+0 fs. f# -9e+0 fs. f# +9e-0 fs. f# +9e+0 fs. f# +9e+09 fs. f# -9e+09 fs. f# +9e-09 fs. f# +9e+09 fs. f# +9.e+0 fs. f# -9.e+0 fs. f# +9.e-0 fs. f# +9.e+0 fs. f# +9.9e0 fs. f# -9.9e0 fs. f# +9.9e0 fs. f# +9.9e0 fs. f# +9.9e+0 fs. f# -9.9e+0 fs. f# +9.9e-0 fs. f# +9.9e+0 fs. f# +9.9e+09 fs. f# -9.9e+09 fs. f# +9.9e-09 fs. f# +9.9e+09 fs. f# 0.000000e0 fs. f# 0.000000e-0 fs. f# -0.000000e0 fs. f# -0.000000e-0 fs. f# +0.000000e+0 fs. f# +0.000000e-0 fs. f# -0.000000e+0 fs. f# -0.000000e-0 fs. f# 9.000000e0 fs. f# 9.000000e-0 fs. f# -9.000000e0 fs. f# -9.000000e-0 fs. f# +9.000000e+0 fs. f# +9.000000e-0 fs. f# -9.000000e+0 fs. f# -9.000000e-0 fs. f# 9.000000e09 fs. f# 9.000000e-09 fs. f# -9.000000e09 fs. f# -9.000000e-09 fs. f# +9.000000e+09 fs. f# +9.000000e-09 fs. f# -9.000000e+09 fs. f# -9.000000e-09 fs. f# 9.999000e0 fs. f# -9.999000e0 fs. f# 9.999000e9 fs. f# -9.999000e9 fs. f# 9.999000e+0 fs. f# -9.999000e+0 fs. f# 9.999000e-0 fs. f# -9.999000e-0 fs. f# 9.999000e+00 fs. f# -9.999000e+00 fs. f# 9.999000e-00 fs. f# -9.999000e-00 fs. f# 9.999999e+30 fs. f# -9.999999e+30 fs. f# 9.999999e-30 fs. f# -9.999999e-30 fs. f# 999999.9e+30 fs. f# -999999.9e+30 fs. f# 999999.9e-30 fs. f# -999999.9e-30 fs. f# 999999.9e30 fs. f# -999999.9e30 fs. f# 999999.9e-30 fs. f# -999999.9e-30 fs. f# +999999.9e30 fs. f# +999999.9e-30 fs. f# 0.000000e0 fs. f# 000000.0e-0 fs. f# 000000.0e+0 fs. f# +000000.0e-0 fs. f# +000000.0e+0 fs. f# -000000.0e-0 fs. f# -000000.0e+0 fs. f# 000000.1e-0 fs. f# 000000.1e+0 fs. f# +000000.1e-0 fs. f# +000000.1e+0 fs. f# -000000.1e-0 fs. f# -000000.1e+0 fs. f# 000000.1e-01 fs. f# 000000.1e+01 fs. f# +000000.1e-01 fs. f# +000000.1e+01 fs. f# -000000.1e-01 fs. f# -000000.1e+01 fs. f# 0.000099e+31 fs. f# -0.000099e+31 fs. f# 0.000099e-31 fs. f# -0.000099e-31 fs. f# 1.000077e+24 fs. f# -1.000077e+24 fs. f# 1.000077e-24 fs. f# -1.000077e-24 fs. f# 1.234567e0 fs. f# -1.234567e0 fs. f# 1.234567e-0 fs. f# -1.234567e-0 fs. f# 1.234567e+0 fs. f# -1.234567e+0 fs. f# 1.234567e-00 fs. f# -1.234567e+00 fs. f# 1.234567e30 fs. f# -1.234567e30 fs. f# 1.234567e+30 fs. f# -1.234567e+30 fs. f# 1.234567e-30 fs. f# -1.234567e-30 fs. f# 9.999999e+30 fs. f# -9.999999e+30 fs. f# 9.999999e-30 fs. f# -9.999999e-30 fs. f# +9.999999e+30 fs. f# -9.999999e+30 fs. f# +9.999999e-30 fs. f# -9.999999e-30 fs. f# +9.999999e30 fs. f# -9999999e30 fs. \ END OF TEST |
From: Mikael N. <mik...@fl...> - 2015-05-14 21:32:43
|
A first version that can parse and print floating point is available in git. Tested on dspic33fj128gp802. The CFloat.c file s not needed. FF calls the Microchip FP lib routines directly without any C layer. It is based on Leon Maurers FP work for Amforth. And on Igor Mokos adaptations. Just send the float.txt With ff-shell.py it looks like this: cd ff sudo shell/ff-shell.py -p /dev/ttyACM0 --xonxoff -s 38400 #send pic24/forth/float.txt ok<#,ram> f# 3.14e-9 f. 0.00000000314000 ok<#,ram> f# 3.14e-9 fs. 3.14000E-9 ok<#,ram> f# 3.14e-8 fs. 3.14000E-8 ok<#,ram> Excerpt from WORDS below: facos fasin fatan flog10 flog fexp fsqrt ftan fcos fsin fpow f/ f* f- f+ f# string>float extract fs. fe. f. f.no-space round2prc precision emitnzeros fprintdigits femitdigit emitdigit tkcofsign smlrpow10 f10^n fround fmod1 ceil floor f~ fprep4div fmin fmax f<= f>= f> f< f2* f2/ f= fabs negateiftrue fnegateifneg fnegate f0< f0= f>s f>d s>f d>f faddtoexponent f>sigexp sigexp>f fshifttoexp flshiftn flshift frshiftn frshift fmksgnd fsetsign fsetexponent fsignificand fsign fexponent frawexponent dsplit dnegateifneg d10* >= f0.5 f10 f1 f0 fliteral fvariable fconstant f! f@ fnover nfover fnswap nfswap ftuck fnip frot fswap fover fdup fdrop d>s 0> -fpmath |