Subject | Re: [ib-support] Re: IB dumber than a $5 calculator |
---|---|
Author | Mpu Gondrong |
Post date | 2002-05-30T13:54:01Z |
Kamis, 30/05/02 19:19:25, csswa menulis:
c> explicitly CAST every single value/constant or else the result was
c> unpredictable due to rounding errors or whatever internal datatype
c> the core engine was choosing.
I don't really know either, what's wrong with casting in IB / FB.
Sometime ago I used full FB SP in accounting prg, AFAIK there's no
error on it (and I use NO explicit cast). I'm not sure with the other
experience.
I've made a simple test:
CREATE PROCEDURE SP_TEST_2 (PAR SMALLINT)
returns (RES DOUBLE PRECISION)
AS
declare variable D Double precision;
begin
D = Par * 3.14159 + 5.4321 * 0.318;
Res = D * 0.5 + 0.12345 * 4.15678;
end
And I compare the result with 'calc' in Windows, and it's the same.
Maybe it will help if you give a working example i can work on.
Tertanda,
Oguds [36856104]
>> Which version of IB or FB do you use ? Can you please more precisec> My SP worked fine. I was grumbling about the fact that I had to
>> about your problem. I don't really know, whatwent wrong in your SP.
c> explicitly CAST every single value/constant or else the result was
c> unpredictable due to rounding errors or whatever internal datatype
c> the core engine was choosing.
I don't really know either, what's wrong with casting in IB / FB.
Sometime ago I used full FB SP in accounting prg, AFAIK there's no
error on it (and I use NO explicit cast). I'm not sure with the other
experience.
I've made a simple test:
CREATE PROCEDURE SP_TEST_2 (PAR SMALLINT)
returns (RES DOUBLE PRECISION)
AS
declare variable D Double precision;
begin
D = Par * 3.14159 + 5.4321 * 0.318;
Res = D * 0.5 + 0.12345 * 4.15678;
end
And I compare the result with 'calc' in Windows, and it's the same.
Maybe it will help if you give a working example i can work on.
Tertanda,
Oguds [36856104]