Subject | Firebird Roundoff Error |
---|---|
Author | niegil_firebirddev |
Post date | 2007-01-22T14:05:05Z |
Hi All,
We are having a conversion Project from Paradox to firebird . Now i
have a query in paradox like below
1) select ((2536.68/30)*2.5) as RND from TestTable
The value that paradox returns for the field RND is 211.39
2) Now when this same query is run in firebird
select ((2536.68/30)*2.5) as RND from TestTable.Then value that i
get is 211.375
i tried the same query changing it as select ((2536.68/30)*2.5)
as RND from TestTable got the same value.
Now when i change the query as
select 2536.68*2.5/30 as RND from TestTable or select
((2536.68*2.5)/30) as RND from TestTable,
i get the same value that paradox returns (211.39)
Can anyone suggest the exact reason for the same .Where as both
the way calculation should be same (As calculatior returns)
Thanks in advance
Regards
Niegil J THomas
We are having a conversion Project from Paradox to firebird . Now i
have a query in paradox like below
1) select ((2536.68/30)*2.5) as RND from TestTable
The value that paradox returns for the field RND is 211.39
2) Now when this same query is run in firebird
select ((2536.68/30)*2.5) as RND from TestTable.Then value that i
get is 211.375
i tried the same query changing it as select ((2536.68/30)*2.5)
as RND from TestTable got the same value.
Now when i change the query as
select 2536.68*2.5/30 as RND from TestTable or select
((2536.68*2.5)/30) as RND from TestTable,
i get the same value that paradox returns (211.39)
Can anyone suggest the exact reason for the same .Where as both
the way calculation should be same (As calculatior returns)
Thanks in advance
Regards
Niegil J THomas