| 1 | #include <Functions/FunctionFactory.h> |
|---|---|
| 2 | #include <Functions/FunctionMathConstFloat64.h> |
| 3 | |
| 4 | namespace DB |
| 5 | { |
| 6 | |
| 7 | struct PiImpl |
| 8 | { |
| 9 | static constexpr auto name = "pi"; |
| 10 | static constexpr double value = 3.1415926535897932384626433832795028841971693; |
| 11 | }; |
| 12 | |
| 13 | using FunctionPi = FunctionMathConstFloat64<PiImpl>; |
| 14 | |
| 15 | void registerFunctionPi(FunctionFactory & factory) |
| 16 | { |
| 17 | factory.registerFunction<FunctionPi>(FunctionFactory::CaseInsensitive); |
| 18 | } |
| 19 | |
| 20 | } |
| 21 |