- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a small routine that I am using to generate parameters for a table that is going into another piece of code. Some of the numbers are more than 10**100 (or less than 10**-100) which creates an odd output. I am using D25.16 and getting something like0.21501611+101 which does not have the D in it.
Is there a way to specify the D format so that it will put the D in, even when the order of magnitude has more than two digits?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have had problems where if the text in the file contains E format that the input parser reads into an E temp (real(4)) eventhough you may be reading into a double (real(8)) float. When this happens precision is lost.
The poster wanted the output text file to contain D for use later when file is re-read.
I suppose as a hack one could write to an internal file (character string) and then replace E with D.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The behavior mattsdad described (D or E omitted when exponent is greater than 99) is in the VF reference manual and prescribed as such in the Fortran Standard (10.6.1.2.2, "E and D editing"). Thus, nothing to worry about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page