Re: [firebird-support] Linked Table and double precision
On 2019-10-30 11:58, 'Check_Mail' check_m...@satron.de [firebird-support] wrote: > Hello, > > I use Microsoft Access as frontend, firebird 3 superserver as backand. > Now, there a many linked tables in access over firebird odbc, some of > the colums are in double precision format. > > Now, I don't know why, in a Report I calculate the VAT, in my case: > > 279.578,50 * 0,19 > > If I calculate it wit a calculator, I get 53.119,915 > > The frontend calculates me 53.119,143 and in result, the final sum is > wrong. 915 should 92, but 914 will be 91. If your frontend calculator gives you 53.119,143 then you are probably having a propagated compound calculation error caused by the use of double precision (or possibly early rounding). In any case, you shouldn't use double precision for monetary values. Double precision is imprecise by its nature. Use a NUMERIC or DECIMAL instead, and if you use dialect 1, switch to dialect 3, because in dialect 1NUMERIC/DECIMAL with a precision over 9 are effectively double precision). Mark
Re: [firebird-support] Linked Table and double precision
30.10.2019 11:58, 'Check_Mail' check_m...@satron.de [firebird-support] wrote: > in a Report I calculate the VAT For VAT rounding you must follow your local tax laws and do not rely on computer rounding functions. -- WBR, SD. ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
[firebird-support] Linked Table and double precision
Hello, I use Microsoft Access as frontend, firebird 3 superserver as backand. Now, there a many linked tables in access over firebird odbc, some of the colums are in double precision format. Now, I don't know why, in a Report I calculate the VAT, in my case: 279.578,50 * 0,19 If I calculate it wit a calculator, I get 53.119,915 The frontend calculates me 53.119,143 and in result, the final sum is wrong. 915 should 92, but 914 will be 91. Thanks for your Help. Regards Olaf