Closed jtwhite79 closed 5 years ago
Perhaps changing the edit descriptor to include at least 3 digits on the exponent might be the easiest fix? (Ew.dE3)
@h2osteff - would that format accommodate a three-digit signed exponent (essentially 4 digits devoted to the exponent) and also report the E
? I'm almost entirely ignorant of fortran and some prelim googling didn't answer this question...
My understanding is that it forces at least 3 digits to be used in the exponent. The "E" and the sign "+/-" are not counted as part of those 3, so you need to leave enough width for them (w). e.g. the number 1234*10^(123) with and edit descriptor E11.4E3 would print: .1234E+123
Hello, thanks @h2osteff for the suggestion. @JDub, we'll try to get back to you with a response next week.
This issue was resolved with a format change. As suggested above, G15.7 was replaced by G15.7E3. see commit bdf0c5a.
Thanks guys! Great code you got here!
hey guys - I just ran into a situation where this number was reported for a sw concen:
0.5771964-104
(missing thee
since the exponent is 3 digits and negative). I realize this is allowed in Fortran (barf!) but modern languages (haha) do not like this. Also, for single precision, this would be an underflow. Would it be ok to cast down really small numbers (< e-38) to zero prior to writing to the sft ascii output file? I can probably make this change and submit a pull request but was just checking if this was acceptable.