Groups | Blog | Home
all groups > sql server (alternate) > november 2005 >

sql server (alternate) : working with large numbers


julry NO[at]SPAM rapidigm-dot-com.no-spam.invalid
11/13/2005 2:10:02 AM
I need to compute factorials, but I hit a limit around 170!. Is ther
anyway to handle numbers larger than the float data type can handle?
Thanks
--CELKO--
11/13/2005 5:47:30 AM
You can try DECIMAL(n), but this is not what SQL ws meant to do. Can
you get Mathematica or Maple or MathLab instead?
1492a2001 NO[at]SPAM terra.es
11/13/2005 9:33:17 AM
With SQL 2005 you can define true new types using .NET. This is a
sample of a good use of the CLR inside SQL Server.
Erland Sommarskog
11/13/2005 3:07:58 PM
--CELKO-- (jcelko212@earthlink.net) writes:
[quoted text, click to view]

decimal is not going to help here. I ran 170! on my pocketcalculator, and it
said something about E306.

But I agree that SQL Server is not really the best place for this
exercise.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
AddThis Social Bookmark Button