From: Harold Stevens on
In <hfq11u$ioq$1(a)naig.caltech.edu> glen herrmannsfeldt:

[Snip...]

> an architecture exists even if no implementations of it still exist

FWIW...

I appreciate the extensive historical as well as technical expertise and
experience in clf.

FWIW (Sequel)...

It's looking like "frank" might be a "robin" sockpuppet. JMO; YMMV...

--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
I toss GoogleGroup (http://twovoyagers.com/improve-usenet.org/).
From: Frank on
On Thu, 10 Dec 2009 05:08:59 -0600, Harold Stevens wrote:

> In <hfq11u$ioq$1(a)naig.caltech.edu> glen herrmannsfeldt:
>
> [Snip...]
>
>> an architecture exists even if no implementations of it still exist
>
> FWIW...
>
> I appreciate the extensive historical as well as technical expertise and
> experience in clf.
>
> FWIW (Sequel)...
>
> It's looking like "frank" might be a "robin" sockpuppet. JMO; YMMV...

Do you ever post code?

You're not even good as the self-annointed ng policeman.

You see if I were betting on someone being a sockpuppet, it would be you,
and I would think your better half is one that contributes to building
understanding in fortran.
--
frank
"
From: steve on
On Dec 7, 3:16 am, Dan Nagle <danna...(a)verizon.net> wrote:
> Hello,
>
> On 2009-12-07 03:13:50 -0500, Frank <fr...(a)example.invalid> said:
>
> >   Do C and Fortran have the same bit
> > model for a float/default real?
>
> Hardware encodes floating point.
>
> A program written in either C or Fortran,
> running on particular hardware, will use the supported
> encoding (or it will execute very slowly).
>
> The languages do not have encodings.
> The languages tell you how to access the facilities
> of IEEE 754, if available.
>
> The languages may tell you the effects of operations,
> but not how the operations are done.
>

The above is of course true, but there is a different
answer if one interprets Frank's 'same bit model' to
mean the model numbers as encoded in Sec. 13. The answer
then becomes a little more complicated. The model number
for REAL in Fortran and for float in C are the same for normal
numbers. C, however, includes exceptional values as well
as subnormal numbers (although n1336.pdf calls these unnormalized
numbers). See

5.2.4.2.2 Characteristics of floating types <float.h>

in n1336.pdf.

--
steve

From: steve on
On Dec 7, 12:13 am, Frank <fr...(a)example.invalid> wrote:
> On Fri, 4 Dec 2009 17:16:19 -0500, Dan Nagle wrote:
> > Hello,
>
> > On 2009-12-04 15:23:47 -0500, frank <fr...(a)example.invalid> said:
>
> > <snip bits from a logical>
>
> >> Does that look right?
>
> > It's either right or wrong, depending.
>
> > Logicals have two values, true and false.
> > These may be encoded at the processor's whim.
>
> > I have seen zero v nonzero, positive v negative,
> > even v odd, and probably something else I can't recall.
>
> > Others have, no doubt, seen other encodings.
>
> > That way are dragons.
>
> This shakes my faith a little bit.  Do C and Fortran have the same bit
> model for a float/default real?
>

Well, I've read this entire thread, and once again I'm confused
by what you're trying to accomplish.

laptop:kargl[224] cat a.c b.f90
#include <stdio.h>

void
cfcn_(float *x)
{
union a {
int i;
float x;
} u;

u.x = *x;

printf("%d %x %f %a\n", u.i, u.i, u.x, u.x);
}

program a
external cfcn
real x
integer i
x = 3.141526
call cfcn(x)
i = transfer(x,i)
print '(I0,1X,Z8,1X,F8.6)', i, i, x
end program a

laptop:kargl[225] cc -c a.c
laptop:kargl[226] gfc4x -o z b.f90 a.o
laptop:kargl[227] ./z
1078529731 40490ec3 3.141526 0x1.921d86p+1
1078529731 40490EC3 3.141526

Note, Fortran appears to lack an edit desciptor that
corresponds to C %a.

--
steve
From: robin on
"glen herrmannsfeldt" <gah(a)ugcs.caltech.edu> wrote in message news:hfpnfi$gue$1(a)naig.caltech.edu...
| robin <robin_v(a)bigpond.com> wrote:
|
| > The mantissa sign could be anywhere, but it usually is at the left,
| > in order that a simple hardware instruction can inspect it
| > (in point of fact, typically the same hardware or microcode that inspects
| > the sign of an integer).
|
| And of course it isn't for VAX...

We wern't talking specifically about VAX. In any case, that's why I said "usually",
because some machines have the bits in reverse order, with the most-significant
bit towards the right-hand end, and the sign at the right -- for both integers
and reals.