Talk:Compact format: Difference between revisions
(Created page with 'I find the usage of this Fortran-related format " -2(26F3.0)~" a bit puzzling... Found this through a Google-search: It is related to Fortran format specification: <pre> Fw.d wh...') |
No edit summary |
||
Line 29: | Line 29: | ||
/Lars-Ake | /Lars-Ake | ||
Here is probably an answer to my question, an example with "F4.0". See http://www.esf.edu/for/bevilacqua/for496/softwareresources.pdf | |||
As I understand it the example "2802" using "F4.0" should be understood as the ring width value 2.802 | |||
Also meaning that we cannot store ring widths >= 10 in Compact format. | |||
--[[User:Lars-Ake|Lars-Ake]] 15:17, 2 January 2010 (UTC) |
Revision as of 16:17, 2 January 2010
I find the usage of this Fortran-related format " -2(26F3.0)~" a bit puzzling...
Found this through a Google-search: It is related to Fortran format specification:
Fw.d where w is the width of the variable and d is the number of decimal places to the right of the (implied) decimal point. For example, F4.0 would read a four digit number with no implied decimal places. (When there are no implied decimal places, as in the case of F4.0, the format description can be simplified to F4 alone.) If, however, the data are written with an implied decimal, the user can specify a decimal point to the left of the last d digits. Thus F4.2 would read `6743' as `67.43' while F4.1 would read `6743' as `674.3'. Any decimal actually coded in the data overrides the format specification.
With the format 26(F3.0) of the compact format specification and a 78 characters long data line like this
280234187226177190170135184166128151159175216189174178154159163189145186264165
I had expected that the first value "280" should be decoded as the integer value 280. With the specification F3.1 I had expected the value to be decoded as 28.0 and with F3.2 as 2.80
Now we have "F3.0". To make "280" into a reasonable ring width value I have to divide it with 100.
Then if we have the format specification F4.0 how should then the string "2802" be understood as a ring width value? As 2.802 or as 28.02 If the correct version is 2.802, then it is correct to state that values >= 10 cannot be written in Compact format.
Is there a program to test that can write Compact format with different format specifications but using the same data so we can be sure about how the Compact format works?
/Lars-Ake
Here is probably an answer to my question, an example with "F4.0". See http://www.esf.edu/for/bevilacqua/for496/softwareresources.pdf
As I understand it the example "2802" using "F4.0" should be understood as the ring width value 2.802
Also meaning that we cannot store ring widths >= 10 in Compact format. --Lars-Ake 15:17, 2 January 2010 (UTC)