Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jnthn committed Jun 22, 2013
1 parent f1e62c5 commit 060b4b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
Expand Up @@ -4156,8 +4156,9 @@ public static String base_I(SixModelObject value, long radix, ThreadContext tc)

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

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

0 comments on commit 060b4b4

Please sign in to comment.