diff options
| author | Andrew Haley <aph@redhat.com> | 2008-07-01 10:43:47 +0000 |
|---|---|---|
| committer | Andrew Haley <aph@redhat.com> | 2008-07-01 10:43:47 +0000 |
| commit | d05dd55aeda090ca43614ab61ff10cae889af0bf (patch) | |
| tree | d9d25fbd8e6493708e59c41b58a95dea72766522 /java | |
| parent | bb4538cde33643527c2779608df9f71190712b6c (diff) | |
| download | classpath-d05dd55aeda090ca43614ab61ff10cae889af0bf.tar.gz | |
2008-07-01 Andrew Haley <aph@redhat.com>
* java/lang/Long.java: Comment change only.
Diffstat (limited to 'java')
| -rw-r--r-- | java/lang/Long.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/lang/Long.java b/java/lang/Long.java index 685271304..a5ee6c707 100644 --- a/java/lang/Long.java +++ b/java/lang/Long.java @@ -689,8 +689,14 @@ public final class Long extends Number implements Comparable<Long> */ public static int signum(long x) { - // Hacker's Delight, Section 2-7 return (int) ((x >> 63) | (-x >>> 63)); + + // The LHS propagates the sign bit through every bit in the word; + // if X < 0, every bit is set to 1, else 0. if X > 0, the RHS + // negates x and shifts the resulting 1 in the sign bit to the + // LSB, leaving every other bit 0. + + // Hacker's Delight, Section 2-7 } /** |
