Okay, on Unix I did the program this way:

0001:       NET = 294987.31
0002:       VAT = 51622.78
0003:       TOT = NET + VAT
0004:       print 'Basic: ':NET:' + ':VAT:' = ':TOT
0005:       execute 'sh -c \echo "scale=2;294987.31+51622.78"|bc\'
capturing BC
0006:       BC = BC<1>
0007:       print '/usr/bin/bc: ':BC
0008:       if TOT = 346610.09 then
0009:          print 'Equal'
0010:       end else
0011:          print 'Wide-Zero problem?'
0012:       end
0013:    end

and got this output:
Basic: 294987.31 + 51622.78 = 346610.09
/usr/bin/bc: 346610.09
Wide-Zero problem?

AND as you see, there's no difference in the output yet what appears to
my eye to be TRUE the code sees as FALSE. Something looks fishy, but I
can't see a reason why.

Karl

On Wed, 2004-09-22 at 02:26, Piers Angliss wrote:
> Adrian,
> 
> I'm surprised you haven't seen it (not that I'd wish the subsequent
> reconciliation and explanation on anyone)
> If you're interested here's an example :
> 
> >ED BP TWZ
> 6 lines long.
> 
> ----: P
> 0001: NET = 294987.31
> 0002: VAT = 51622.78
> 0003: TOT = NET + VAT
> 0004: IF TOT EQ 346610.09 THEN PRINT 'Equal'
> 0005: ELSE PRINT 'Wide-zero problem ?'
> 0006: END
> Bottom at line 6.
> ----: Q
> >RUN BP TWZ
> Wide-zero problem ?
> 
> I've seen it 3 times in the last 3 years, this is the simplest example yet.
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Adrian Matthews
> 
> 
> I'm obviously missing something here. Our system processes thousands of
> financial transactions a day with most calculations being done to
> several places.
> 
> We've never had a need to change the Wide0 settings from the default....
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> 
> 
> Goo'day,
> 
> We have *always* (since 1998, anyway, 9.3?? on NT) changed WideZero to
> 0X3eb000000.
> 
> This way we *always* get 1-1=0 ....
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-- 
Karl L. Pearson
Director of IT,
ATS Industrial Supply
Direct: 801-978-4429
Toll-free: 888-972-3182 x29
Fax: 801-972-3888
http://www.atsindustrial.com
[EMAIL PROTECTED]
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to