Re: speed up calculation suggestions



<rleavitt@xxxxxxxxxxxxxxxx> wrote:

Just to make sure I understand... a text based file has, for example,
a real number expressed as a seriers of ascii characters that then
need to be converted into a floating point real number.

Yes.

The
unformatted file means that the number is stored as what?? The actual
bytes that the Fortran uses to represent the number interally?

Yes, exactly. In fact, that will be the "floating point" bit that you
mention above. That terminology refers to the general form that real
numbers are almost always stored in internally.

I do not even know how to read or write such things, but I assume could
find out.

Pretty much any programming language can write data like that because
the representation will be determined by the CPU. This isn't really a
Fortran matter. Essentialy all languages wil use and can read/write the
same internal formats - the ones that the CPU supports. (It is possible
for a compiler to use a different internal format, and it even happens
in some arcane situations - but that is rare enough that I can say with
confidence that you won't need to worry about it).

In C, for example, thsi is commonly known as "binary I/O". (I think that
term misleading, but that's the one usually used; the term often spills
over into Fortran in informal use.)

Fortran compilers do tend to add a small amount of Fortran-specific
stuff at the beginning and end of each "record", but there are ways to
deal with that. No point in going into that level of detail yet, though.

Just because of the kind of business you are in, I perhaps should
mention that the exact details of floating point formats do vary from
one class of CPU to another. Thus, if you write unformatted data with
one kind of machine and read it with another, there can be "issues".
However, the large majority of machines today use the same format. That
basically includes all machines based on Intel CPUS (or competitors like
AMD). So it is a pretty large class. Most other current CPUs also use
the same format (sometimes with one minor distinction of byte order).
THis includes, for example, most Unix workstations.

One difference of note is IBM mainframes (and their competition). Most
posters here have probably never even seen such a machine. But corporate
accounting is one place where they do have a significant presence. I'm
not getting the impression that you are working with machines of that
class, but I thought the caveat worth mentioning.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: Is it time to legitimise REAL*8 etc?
    ... why the Fortran 90 Standard introduced the kind selection functions, ... to programmers who still use this notation that they really ought to use ... machines as we can. ... but Gaussian cost something like US$2000. ...
    (comp.lang.fortran)
  • Re: Model and CPU
    ... Is there a list of CPU types associated with model? ... While there is not a direct command to determine processor speed in AIX V4, ... Note on some machines the ... Each 2 way processor resides on one CPU card. ...
    (comp.unix.aix)
  • Re: Fortran is eating my brain
    ... Last few years of my life i have learned many languages (otherthan ... Nowadays i use perl python tcl etc for creating traslating and parsers ... first one writes the output file using fortran units wither in UNFMTD ... Once upon a time formatted data was only available if you used a FORMAT but then a variety of ways for having the system use some format, of its convenience, arrived. ...
    (comp.lang.fortran)
  • Re: Why DAT failed (was: CD Quality)
    ... It turned out to be a popular professional format, ... I got a great story on DAT's failure from a high-ranking Sony exec, ... or so (when DAT started to ship), they realized to their horror that, because ... first machines to sell for maybe $500 or so, but the U.S. dollar plunged so ...
    (rec.audio.pro)
  • Re: how can i disble irq15 through C/assembly programming.
    ... Well, these machines do not run Windows, do they? ... This condition is enforced by the CPU itself, ... interrupts as a whole, but the OP wants to disable interrupts only for ... disable interrupts on CPU Y..... ...
    (microsoft.public.win32.programmer.kernel)