From: orz on
On Jul 30, 10:14 pm, Gib Bogle <g.bo...(a)auckland.no.spam.ac.nz> wrote:
> orz wrote:
> > Yes.  Sorry.  I was reading backwards from your last post and ended up
> > missing the point.  And getting confused on the sign.
>
> > Anyway, the issue is that Georges code uses a different definition of
> > sign than your implementation of it - his code is actually correct if
> > sign(x) is 1 if x is positive and 0 if x is negative.  Since your sign
> > function returns -1 on negative, using it produces the wrong
> > results.
>
> > side note: The incorrect results produced that way at a appear to have
> > vaguely similar statistical properties as the original C codes output,
> > passing and failing the same tests that the original C code does in my
> > brief tests.
>
> Interesting, who would have guessed that there is a language in which sign(-1) = 0.

I have to correct myself for swapping 0 and 1 *again*. And I'm not
even dyslexic, so far as I know.

His code assumed sign returned 1 on negative, and 0 otherwise, as in a
simple unsigned 31 bit rightshift. The exact opposite of what I
said.
From: robin on
"James Waldby" <no(a)no.no> wrote in message news:i39iqp$sg7$1(a)news.eternal-september.org...
| On Tue, 03 Aug 2010 20:41:15 +1000, robin wrote:
| > "Uno" <merrilljensen> wrote:
| [snip code]
| >> If you were to comment out the PL/I command line that compiled this,
| >> what would it be?
| >
| > ???
|
| Does that mean you don't understand Uno's question,
| or don't know the answer?

It means that the question makes no sense.


From: robin on
"Dann Corbit" <dcorbit(a)connx.com> wrote in message news:MPG.26c1f325a9d5e75f989725(a)news.eternal-september.org...

| It will depend on the operating system.
| Probably JCL along the lines of:
| // EXEC PL1LFCLG,REGION.PL1L=256K

or
PLI <filename>

on the PC for various compilers.


From: Uno on
robin wrote:
> "James Waldby" <no(a)no.no> wrote in message news:i39iqp$sg7$1(a)news.eternal-september.org...
> | On Tue, 03 Aug 2010 20:41:15 +1000, robin wrote:
> | > "Uno" <merrilljensen> wrote:
> | [snip code]
> | >> If you were to comment out the PL/I command line that compiled this,
> | >> what would it be?
> | >
> | > ???
> |
> | Does that mean you don't understand Uno's question,
> | or don't know the answer?
>
> It means that the question makes no sense.
>
>
Does this make sense?

I'll restate the question, and I'm sure you'll get my drift. When I
compile off a command line, I keep the command lines I used as the final
comments in that file. So there might, in fortran, exist

implicit real
pi = 4.0 * atan(1.0)
print *, pi
endprogram

!here it comes, the goocher:

! gfortran pi1.f90 -o out

1) What did you name this pli thing?

2) What command compiled it?

3) How does one comment in pli?

4) How does one acquire a pli facilty on ubuntu?
--
Uno
From: Uno on
orz wrote:
> On Jul 30, 10:14 pm, Gib Bogle <g.bo...(a)auckland.no.spam.ac.nz> wrote:
>> orz wrote:
>>> Yes. Sorry. I was reading backwards from your last post and ended up
>>> missing the point. And getting confused on the sign.
>>> Anyway, the issue is that Georges code uses a different definition of
>>> sign than your implementation of it - his code is actually correct if
>>> sign(x) is 1 if x is positive and 0 if x is negative. Since your sign
>>> function returns -1 on negative, using it produces the wrong
>>> results.
>>> side note: The incorrect results produced that way at a appear to have
>>> vaguely similar statistical properties as the original C codes output,
>>> passing and failing the same tests that the original C code does in my
>>> brief tests.
>> Interesting, who would have guessed that there is a language in which sign(-1) = 0.
>
> I have to correct myself for swapping 0 and 1 *again*. And I'm not
> even dyslexic, so far as I know.
>
> His code assumed sign returned 1 on negative, and 0 otherwise, as in a
> simple unsigned 31 bit rightshift. The exact opposite of what I
> said.

Zero: the other one.

Zero: One-Lite.

Telling left from right is sometimes the hardest thing.
--
Uno
First  |  Prev  |  Next  |  Last
Pages: 4 5 6 7 8 9 10 11 12 13 14 15 16
Prev: solutions book
Next: real kind declaration