@@ -116,8 +116,9 @@ protected PComplex specialValue(ComplexConstant[][] table, double real, double i
116
116
}
117
117
118
118
/**
119
- * Creates an instance of ComplexConstant. The name of this factory method is intentionally short to allow
120
- * subclassess compact definition of their tables of special values.
119
+ * Creates an instance of ComplexConstant. The name of this factory method is intentionally
120
+ * short to allow subclassess compact definition of their tables of special values.
121
+ *
121
122
* @param real the real part of the complex constant
122
123
* @param imag the imaginary part of the complex constant
123
124
* @return a new instance of ComplexConstant representing the complex number real + i * imag
@@ -254,8 +255,8 @@ PTuple doD(double value) {
254
255
255
256
@ Specialization
256
257
PTuple doC (PComplex value ) {
257
- //TODO: the implementation of abs(z) should be shared with ComplexBuiltins.AbsNode, but it currently does
258
- //not pass the overflow test
258
+ // TODO: the implementation of abs(z) should be shared with ComplexBuiltins.AbsNode, but
259
+ // it currently does not pass the overflow test
259
260
double r ;
260
261
if (!Double .isFinite (value .getReal ()) || !Double .isFinite (value .getImag ())) {
261
262
if (Double .isInfinite (value .getReal ())) {
@@ -284,6 +285,7 @@ PTuple doGeneral(VirtualFrame frame, Object value, @Cached CoerceToComplexNode c
284
285
@ GenerateNodeFactory
285
286
abstract static class SqrtNode extends CmathComplexUnaryBuiltinNode {
286
287
288
+ // @formatter:off
287
289
@ CompilerDirectives .CompilationFinal (dimensions = 2 )
288
290
private static final ComplexConstant [][] SPECIAL_VALUES = {
289
291
{C (INF , -INF ), C (0.0 , -INF ), C (0.0 , -INF ), C (0.0 , INF ), C (0.0 , INF ), C (INF , INF ), C (NAN , INF )},
@@ -294,6 +296,7 @@ abstract static class SqrtNode extends CmathComplexUnaryBuiltinNode {
294
296
{C (INF , -INF ), C (INF , -0.0 ), C (INF , -0.0 ), C (INF , 0.0 ), C (INF , 0.0 ), C (INF , INF ), C (INF , NAN )},
295
297
{C (INF , -INF ), C (NAN , NAN ), C (NAN , NAN ), C (NAN , NAN ), C (NAN , NAN ), C (INF , INF ), C (NAN , NAN )},
296
298
};
299
+ // @formatter:on
297
300
298
301
@ Override
299
302
PComplex compute (double real , double imag ) {
0 commit comments