def METHOD_NAME(this, args):
    if GetClass(this) != 'Number':
        raise MakeError('TypeError',
                        'Number.prototype.valueOf is not generic')
    if type(this) != float:
        this = this.value
    radix = get_arg(args, 0)
    if is_undefined(radix):
        return to_str_rep(this)
    r = to_int(radix)
    if r == 10:
        return to_str_rep(this)
    if r not in xrange(2, 37) or radix != r:
        raise MakeError(
            'RangeError',
            'Number.prototype.toString() radix argument must be an integer between 2 and 36'
        )
    num = to_int(this)
    if num < 0:
        num = -num
        sign = '-'
    else:
        sign = ''
    res = ''
    while num:
        s = RADIX_SYMBOLS[num % r]
        num = num // r
        res = s + res
    return sign + (res if res else '0')