|Subject||Re: [firebird-support] It´s a bug or whatever?|
One more question, It´s a firebird way or it´s a math general consensus?
I try a lot of programs, and only firebird return wrong value.
2015-10-29 16:30 GMT-02:00 setysvar setysvar@... [firebird-support] <firstname.lastname@example.org>:
No, I don't think this is a bug. If you doDen 29.10.2015 19:22, skrev hamacker sirhamacker@... [firebird-support]:
When I try:select (2183.48/(1-(37.25/100))) as valor from rdb$database
As result Firebird: 3465,8412But other databases(MSSQL) and spreadshets(Excel and Calc) the correct result is 3479,6494023904
If I change (37.25/100) to 0.3725 as follow:select (2183.48/(1-0.3725)) as valor from rdb$database
Then Result is correct 3479,6494023904
I would like to understand why thisor if it´s a new bug to post.
select 37.25/100 as valor from rdb$database
the result is 0.37, not 0.3725. To fix your original problem (well, it will be rounded to 4 digits after the decimal point, just add zeroes (or cast):
select (2183.48/(1-(37.2500/100))) as valor from rdb$database