Subject RE: [firebird-support] Operations
Author Mercea Paul
As I know you have 2 different expression...

((1.00/:RATIO*NETTO_EGYSEGAR) = ((1.00/(:RATIO*NETTO_EGYSEGAR))

CAST((NETTO_EGYSEGAR*1.00/:RATIO) =CAST(((NETTO_EGYSEGAR*1.00)/:RATIO)

Regards,
Paul

>
> Hi All!
>
> I'd like to know why the following two expression give back different
> results:
>
> NETTO_EGYSEGAR_DEVIZA=CAST((1.00/:RATIO*NETTO_EGYSEGAR) AS
> NUMERIC(10,2));
> NETTO_EGYSEGAR_DEVIZA=CAST((NETTO_EGYSEGAR*1.00/:RATIO) AS
> NUMERIC(10,2));
>
> All the variables has the NUMERIC(10,2) type. The RATIO variable has
> the
> value 241.63.
> NETTO_EGYSEGAR has the value 838,10.
>
> In the first case the result is 3.44, in the second 3.47.
>
> TIA:Alex :-)
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>