Skip to content

Commit 060b4b4

Browse files
committed
Seems isbig_I needs a smaller idea of "big".
Suspect there's a little more to it than this; somewhere, an int must be getting turned into a num before being stringified, or similar. This should bring it out of the range where errors can occur as a result, however. colomon++ for reporting, bug hunting etc. for this.
1 parent f1e62c5 commit 060b4b4

File tree

1 file changed

+3
-2
lines changed
  • src/vm/jvm/runtime/org/perl6/nqp/runtime

1 file changed

+3
-2
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4156,8 +4156,9 @@ public static String base_I(SixModelObject value, long radix, ThreadContext tc)
41564156

41574157
public static long isbig_I(SixModelObject value, ThreadContext tc) {
41584158
/* Check if it needs more bits than a long can offer; note that
4159-
* bitLength excludes sign considerations, thus 63 rather than 64. */
4160-
return getBI(tc, value).bitLength() > 63 ? 1 : 0;
4159+
* bitLength excludes sign considerations, thus 32 rather than
4160+
* 32. */
4161+
return getBI(tc, value).bitLength() > 31 ? 1 : 0;
41614162
}
41624163

41634164
public static SixModelObject fromnum_I(double num, SixModelObject type, ThreadContext tc) {

0 commit comments

Comments
 (0)