* [9fans] fun question
@ 2009-01-22 20:53 ron minnich
2009-01-22 21:40 ` erik quanstrom
2009-01-22 22:01 ` Russ Cox
0 siblings, 2 replies; 8+ messages in thread
From: ron minnich @ 2009-01-22 20:53 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I ask this every time I hit this piece of code, I think. But what the heck:
if(seed <- 0)
seed = seed + m_31;
what's wrong with this code?
ron
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] fun question
2009-01-22 20:53 [9fans] fun question ron minnich
@ 2009-01-22 21:40 ` erik quanstrom
2009-01-22 22:01 ` Russ Cox
1 sibling, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2009-01-22 21:40 UTC (permalink / raw)
To: 9fans
On Thu Jan 22 15:55:09 EST 2009, rminnich@gmail.com wrote:
> I ask this every time I hit this piece of code, I think. But what the heck:
>
> if(seed <- 0)
> seed = seed + m_31;
>
> what's wrong with this code?
supposing the code does what it is supposed
to on some machines, i would guess that this
could be a problem for sign-magnitude or one's-comp.
machines, since 0 and -0 are different. if that's
the case, one would guess that the object is to clear
sign bit and -0 is the failure case.
then again, that's a very wild guess and one
would assume that sign = -sign would be
better.
-0 is a strange construction and the spacing
is misleading. it's interesting that atoi(2) and
the differ on "- 0".
- erik
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] fun question
2009-01-22 20:53 [9fans] fun question ron minnich
2009-01-22 21:40 ` erik quanstrom
@ 2009-01-22 22:01 ` Russ Cox
2009-01-22 22:12 ` Pietro Gagliardi
1 sibling, 1 reply; 8+ messages in thread
From: Russ Cox @ 2009-01-22 22:01 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Thu, Jan 22, 2009 at 12:53 PM, ron minnich <rminnich@gmail.com> wrote:
> I ask this every time I hit this piece of code, I think. But what the heck:
>
> if(seed <- 0)
> seed = seed + m_31;
>
> what's wrong with this code?
<- is a unary operator.
russ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] fun question
2009-01-22 22:01 ` Russ Cox
@ 2009-01-22 22:12 ` Pietro Gagliardi
2009-01-22 22:54 ` Russ Cox
0 siblings, 1 reply; 8+ messages in thread
From: Pietro Gagliardi @ 2009-01-22 22:12 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jan 22, 2009, at 5:01 PM, Russ Cox wrote:
> <- is a unary operator.
okay, what does it do? (unless you meant -> in C++)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkl47zYACgkQuv7AVNQDs+wr7ACgi7QtQv4m4TweJlyzLFSHUs41
ZCYAnR6CqXQp69/g99pUkI0W789SRxXF
=s97M
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-01-23 0:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 20:53 [9fans] fun question ron minnich
2009-01-22 21:40 ` erik quanstrom
2009-01-22 22:01 ` Russ Cox
2009-01-22 22:12 ` Pietro Gagliardi
2009-01-22 22:54 ` Russ Cox
2009-01-22 23:01 ` erik quanstrom
2009-01-22 23:17 ` ron minnich
2009-01-23 0:46 ` Pietro Gagliardi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).