Subject | RE: [firebird-support] Dialect1 vs. dialect3 calculations |
---|---|
Author | Kevin Stanton |
Post date | 2005-02-17T15:24:47Z |
This is probably the biggest "gotcha" of the 2 dialects.
Check out this article, it helped me a lot:
www.ibobjects.com/docs/TI_Numerics.rtf
Kevin
_____
From: Nick Upson [mailto:nick@...]
Sent: Thursday, February 17, 2005 5:43 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Dialect1 vs dialect3 calculations
The book says "integer-by-integer division in dialect 3 returns a truncated
integer, whereas in dialect 1 it returns a double precision floating-point
number"
so given ab_hrs is an integer, with value 3
ab_hrs = ab_hrs / 2; dialect 1 = 0.666... , Dialect 3 = 0
what about a mixed calculation, where ab_hrs is a float value 3.0?
How about the other obvious variations?
--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129ncf24e/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705115386:HM/EXP=1108734159/A=2532114/R=2/SIG=12klak31c/*http:/clk.a
tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108647759629618>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110864
7759629618>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2532114/rand=618714499>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
[Non-text portions of this message have been removed]
Check out this article, it helped me a lot:
www.ibobjects.com/docs/TI_Numerics.rtf
Kevin
_____
From: Nick Upson [mailto:nick@...]
Sent: Thursday, February 17, 2005 5:43 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Dialect1 vs dialect3 calculations
The book says "integer-by-integer division in dialect 3 returns a truncated
integer, whereas in dialect 1 it returns a double precision floating-point
number"
so given ab_hrs is an integer, with value 3
ab_hrs = ab_hrs / 2; dialect 1 = 0.666... , Dialect 3 = 0
what about a mixed calculation, where ab_hrs is a float value 3.0?
How about the other obvious variations?
--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129ncf24e/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705115386:HM/EXP=1108734159/A=2532114/R=2/SIG=12klak31c/*http:/clk.a
tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108647759629618>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110864
7759629618>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2532114/rand=618714499>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
[Non-text portions of this message have been removed]