Re: Input format and NaNs
- From: "robin" <robin_v@xxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 02:21:16 GMT
Herman D. Knoble wrote in message ...
>First, I'd recommend trying to talk to the folks where this data
>(and program?) originated, and find out if they knew that some
>of the output file were NaN's and whether that makes sense with
>the program(s) being used to process this data. Assuming that
>NaN is "valid" output data...
>
>If what you're saying is that the actual characters, "NaN" appear in
>an ASCII input file, and you want them to take on a NaN value,
>then you may be able to use a text editor to change that
>three character string to a real value that would not normally occurr
>in the input. For example if 777 or -99 would not occur, you could
>change "NaN" to "777" or to "-99", and then after the data
>was input change these special values to a NaN. For example, if these are
>single precision reals set them to XXX where XXX has been initialized to
>a NaN like B'1111111100000100000000000000000'
If the executable doesn't handle NaNs, there's no point in doing that.
Using an editor, the NaN can be replaced by any valid value,
such as 10**(-30) or 0 or whatever is appropriate.
Or you can read in the whole line in your fortran program and
re-process it to handle the NaNs, again, in whatever
way you want.
>In this very crude way you'd end up some data values being NaN as
>they were on the previous platform - which may or may not make
>sense to the original algorithm.
.
- References:
- Input format and NaNs
- From: Bruce Bowler
- Re: Input format and NaNs
- From: Herman D . Knoble
- Input format and NaNs
- Prev by Date: Re: Open Watcom Fortran compiler help needed
- Next by Date: Re: How to detect NULL input?
- Previous by thread: Re: Input format and NaNs
- Next by thread: RE: Input format and NaNs
- Index(es):