[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C_FLOAT New user question
From: |
Keith Hopper |
Subject: |
Re: C_FLOAT New user question |
Date: |
Tue, 10 Oct 2000 18:53:12 +1300 |
User-agent: |
Pluto/2.02b (RISC-OS/4.02) POPstar/2.02 |
In article <address@hidden>,
Norbert Nemec <address@hidden> wrote:
> AFAIK, Sather tries to be IEEE... correct concerning floats. Strange
> that the conversion does not work.
> On Mon, Oct 02, 2000 at 05:07:16PM +0000, Dave Simons wrote:
> > loop
> > USING_SATHER::show_float(#(number));
> > USING_C::show_float(#(number));
> > number := number + 0.2;
> > until!(number > 3.0);
> > end;
> > end;
> > end;
> >
> > class USING_SATHER is
> > show_float(sather_number:C_FLOAT) is
> > #OUT+"Number according to Sather: "+sather_number.flt+"\n";
> > end;
> > end;
> >
> > external C class USING_C is
> > show_float(c_number:C_FLOAT);
> > end;
Have you thought of a big/little endian problem. This is one of the things
which we discovered in the compiler - it is the order in which the two
32-bit bit-patterns get stuffed onto the stack - but then its only
approximate arithmetic after all!!
kh
--
City Desk
Waikato University
[PGP key available if desired]