public static NumberWrapper sqrtComputation(NumberWrapper x) {
    { double floatresult = Stella.NULL_FLOAT;
      int integerresult = Stella.NULL_INTEGER;

      { Surrogate testValue000 = Stella_Object.safePrimaryType(x);

        if (Surrogate.subtypeOfIntegerP(testValue000)) {
          { IntegerWrapper x000 = ((IntegerWrapper)(x));

            floatresult = Math.sqrt((((double)(x000.wrapperValue))));
            integerresult = ((int)(floatresult));
            if (floatresult == ((double)(integerresult))) {
              return (IntegerWrapper.wrapInteger(integerresult));
            }
            else {
              return (FloatWrapper.wrapFloat(floatresult));
            }
          }
        }
        else if (Surrogate.subtypeOfFloatP(testValue000)) {
          { FloatWrapper x000 = ((FloatWrapper)(x));

            floatresult = Math.sqrt((x000.wrapperValue));
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
      return (FloatWrapper.wrapFloat(floatresult));
    }
  }