Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Writing flo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 12 Topic 3956 of 4136
Post > Topic >>

Re: Writing floating point values to file

by Bruce McFarling <agila61@[EMAIL PROTECTED] > Mar 23, 2008 at 07:04 AM

On Mar 23, 7:26 am, Albert van der Horst <alb...@[EMAIL PROTECTED]
>
wrote:
> Binary floating point representation are never "implementation neutral".
> You may be lucky, e.g. if both sides use IEEE f.p.

If DF! and SF! exist, and its a Forth-94 system, then that uses IEEE
f.p. ... if it does not have IEEE f.p., it does not present DF! SF!
and friends.

For a flat matrix, byte order, IEEE 32 or 64, row size, column size,
and rows of columns or columns of rows would be the information that
would have to be in the accompanying .DSC file, and IMHO, none of that
would ever be worthwhile encoding, even for a micro-controller.

If it was me, I'd write a CSV file with a description in the first
line, as a single-item line, followed by a header consisting of a
series of descriptive labels and their value for things like #rows and
#columns, a first row consisting of labels, then a blank line, then
the data. That loads quickly into a spreadsheet where the information
to work with it is available up top and all the descriptive meta data
is up top and clearly distinct from the data.

That'd be using the REPRESENT from the FLOATS wordset, targeted to a
buffer with ," at its head, and then the pictured numeric output for
the power, and the concluding " punctuation. A quote-delimited label
to start the line, and you have a good floating point array to CSV
routine.

Restrict the labels to Latin-1, and its even automatically UTF-8
Unicode.
 




 12 Posts in Topic:
Writing floating point values to file
Larry Webber <thecoots  2008-03-22 23:57:53 
Re: Writing floating point values to file
Bruce McFarling <agila  2008-03-22 19:28:34 
Re: Writing floating point values to file
Bruce McFarling <agila  2008-03-22 21:32:34 
Re: Writing floating point values to file
Bruce McFarling <agila  2008-03-23 07:04:56 
Re: Writing floating point values to file
Ian Osgood <iano@[EMAI  2008-03-23 09:23:24 
Re: Writing floating point values to file
Bruce McFarling <agila  2008-03-23 13:25:36 
Re: Writing floating point values to file
Larry Webber <thecoots  2008-03-23 04:08:07 
Re: Writing floating point values to file
mhx@[EMAIL PROTECTED] (M  2008-03-23 06:50:50 
Re: Writing floating point values to file
Albert van der Horst <  2008-03-23 11:26:22 
Re: Writing floating point values to file
anton@[EMAIL PROTECTED]   2008-03-23 13:34:46 
Re: Writing floating point values to file
anton@[EMAIL PROTECTED]   2008-03-23 13:24:26 
Re: Writing floating point values to file
Larry Webber <thecoots  2008-03-23 23:48:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 5:51:11 CDT 2008.