Skip to content

Commit cc32e9d

Browse files
committed
Comment on Integer#** fallback for complex
1 parent 3ef1b38 commit cc32e9d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/truffleruby/core/numeric/IntegerNodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,6 +1757,7 @@ public Object pow(DynamicObject a, long b,
17571757
public Object pow(DynamicObject a, double b) {
17581758
double doublePow = powBigIntegerDouble(Layouts.BIGNUM.getValue(a), b);
17591759
if (Double.isNaN(doublePow)) {
1760+
// Instead of returning NaN, run the fallback code which can create a complex result
17601761
return FAILURE;
17611762
} else {
17621763
return doublePow;

0 commit comments

Comments
 (0)