summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2008-07-01 10:43:47 +0000
committerAndrew Haley <aph@redhat.com>2008-07-01 10:43:47 +0000
commitd05dd55aeda090ca43614ab61ff10cae889af0bf (patch)
treed9d25fbd8e6493708e59c41b58a95dea72766522 /java
parentbb4538cde33643527c2779608df9f71190712b6c (diff)
downloadclasspath-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.java8
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
}
/**