declare @nr1 decimal(20,19),
@nr2 decimal(20,19)
set @nr1 = EXP(1.0)
set @nr2 = PI();
print @nr1/@nr2
As EXP and PI are "infinite" numbers you should always have enough decimals to print
The result for this query is 0.865255979432265082
For the query :
declare @nr12 decimal(34,25),
@nr22 decimal(34,25)
set @nr12 = EXP(1.0)
set @nr22 = PI();
print @nr12/@nr22
I get the result : 0.865255
So my question is, why is the first query more precise then the second one? As decimal(p,s)
as it is define in msdn tells me that the second query should be more precise.