------- Comment #8 from furue at hawaii dot edu 2008-01-31 06:16 ------- Subject: Re: illegal E format descriptor produces wrong output
| > I may be missing something, but "-d < k <= 0" doesn't hold | > when d = 0 and k = 0. Notice the inequality "<". So, when k = 0, | > how should we read the part we quote? | | Notice the "=". -d < k <= 0 goes to -(d=0) < (k=0) <= 0 --> -0 < 0 <= 0. | Zero is certainly less than or equal to zero. But, what about "-0 < 0"? Do you mean that this inequality holds? Do you mean to say minus integer zero is smaller than plus integer zero? | > I like that. But, for the sake of curiosity, how does the Fortran | > standard describe the process that leads to *******? I mean, suppose | > E8.0 is legal, but still can we emit *******? | | The *** are emitted when the result can't fit into the requested field. | Off the top of my head, the easiest example is E8.1E1 for x = 1e25. | The exponent field is too small, or I2 and i = 100. Yes, but do you claim that "the result can't fit into the requested field" for write(*, '(E8.0)') 1e5 supposing that E8.0 be legal? As you suggested, one "correct" output is "0.E+06", which would certainly "fit" in eight columns. Then why reject an output of "0.E+06" and replace it with "********" ? What I'm getting at is that *if* E8.0 be legal and if you plan to emit "********" for 1e5, you need a reason for that decision. Ryo -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35036