November 18, 2018 at 11:45 pm
Comments posted to this topic are about the item Recursive CTE calculations
November 19, 2018 at 6:33 am
It is a limitation of the REAL data type for PI.
I changed that to FLOAT(26), bumped it to the MAXRECURSION of 32767
Pi comes out 3.14156335418855
You'd have to have real time on your hands to do that manually.
November 19, 2018 at 8:29 am
warnerk - Monday, November 19, 2018 6:33 AMIt is a limitation of the REAL data type for PI.
I changed that to FLOAT(26), bumped it to the MAXRECURSION of 32767
Pi comes out 3.14156335418855You'd have to have real time on your hands to do that manually.
An easier, faster and more accurate way to get pi in SQL Server is:SELECT PI()
Which returns 3.14159265358979
November 19, 2018 at 10:47 am
I thought this was a nice little piece of work particularly including Euler's formula as an added application of recursive cte's.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply