```
SELECT bar((greatCircleAngle(65537, 2, number, number) - number) * 65535, 1048576, 1048577, nan)
FROM numbers(1025)

Query id: 1792a79a-e5ae-425d-aaeb-55fbff42ea0e

→ Progress: 1.02 thousand rows, 8.20 KB (10.09 thousand rows/s., 80.73 KB/s.)  99%
Received exception from server (version 20.13.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Too large size (9223372036854776864) passed to allocator. It indicates an error.: while executing 'FUNCTION bar(multiply(minus(greatCircleAngle(65537, 2, number, number), number), 65535) :: 0, 1048576 :: 4, 1048577 :: 5, nan :: 6) -> bar(multiply(minus(greatCircleAngle(65537, 2, number, number), number), 65535), 1048576, 1048577, nan) String : 3'.
```
{
        return 0;
    }
    DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override
    {
        if (arguments.size() != 3 && arguments.size() != 4)
            throw Exception("Function " + getName()
                    + " requires from 3 or 4 parameters: value, min_value, max_value, [max_width_of_bar = 80]. Passed "
                    + toString(arguments.size())
                    + ".",
                ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
        if (!isNativeNumber(arguments[0]) || !isNativeNumber(arguments[1]) || !isNativeNumber(arguments[2])
            || (arguments.size() == 4 && !isNativeNumber(arguments[3])))
            throw Exception("All arguments for function " + getName() + " must be numeric.", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        return std::make_shared<DataTypeString>();
    }
    bool useDefaultImplementationForConstants() const override { return true; }
    ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {1, 2, 3}; }
    ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t ) const override
    {
        Int64 min = extractConstant<Int64>(arguments, 1, "Second"); 
        Int64 max = extractConstant<Int64>(arguments, 2, "Third"); 
        
        Float64 max_width = arguments.size() == 4 ? extractConstant<Float64>(arguments, 3, "Fourth") : 80;
        if (max_width < 1)
            throw Exception("Max_width argument must be >= 1.", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
        if (max_width > 1000)
            throw Exception("Too large max_width.", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
        const auto & src = *arguments[0].column;
        auto res_column = ColumnString::create();