2018-12-03 03:17:06 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionMathConstFloat64.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2020-09-07 18:00:37 +00:00
|
|
|
namespace
|
|
|
|
{
|
2018-12-03 03:17:06 +00:00
|
|
|
|
|
|
|
struct PiImpl
|
|
|
|
{
|
|
|
|
static constexpr auto name = "pi";
|
|
|
|
static constexpr double value = 3.1415926535897932384626433832795028841971693;
|
|
|
|
};
|
|
|
|
|
|
|
|
using FunctionPi = FunctionMathConstFloat64<PiImpl>;
|
|
|
|
|
2020-09-07 18:00:37 +00:00
|
|
|
}
|
|
|
|
|
2018-12-03 03:17:06 +00:00
|
|
|
void registerFunctionPi(FunctionFactory & factory)
|
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionPi>(FunctionFactory::CaseInsensitive);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|