Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

PB V10.5 bug in expotentiation calculation(^)

2 posts in General Discussion (Chinese) Last posting was on 2007-07-07 12:21:34.0Z
Echo Xiang Posted on 2007-07-03 13:59:02.0Z
From: "Echo Xiang" <xiangeyy@bea.com>
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: PB V10.5 bug in expotentiation calculation(^)
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 219.133.9.72
X-Original-NNTP-Posting-Host: 219.133.9.72
Message-ID: <468a5626@forums-1-dub>
Date: 3 Jul 2007 06:59:02 -0700
X-Trace: forums-1-dub 1183471142 219.133.9.72 (3 Jul 2007 06:59:02 -0700)
X-Original-Trace: 3 Jul 2007 06:59:02 -0700, 219.133.9.72
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:259
Article PK: 104286

Dear all,

Is there any one who have noticed that the expotentiation calculation (^) in
pb script would come out with wrong result in some cases.
Example:
decimal ld_temp
ld_temp = (1 + 0.00449094232106445) ^ (-210)

PB v10.5 give out the result as:
ld_temp = 0.335668204750438524179808211999 ---> wrong value.

While in PB v6.0,it give out the value as:
ld_temp = 0.390242668145599904 ---> correct value.

We can see that in PB v10.5,the result is wrong. We can check the formula
with other language or in a calculator.

Now it would cause error in our application.
Wish you would give us any solution to solve the problem in expotentiation
calculation.

Thanks a lot.

Echo


Echo Xiang Posted on 2007-07-07 12:21:34.0Z
Sender: 4b67.468a56d1.1804289383@sybase.com
From: Echo Xiang
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: Re: PB V10.5 bug in expotentiation calculation(^)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <468f854e.3e00.1681692777@sybase.com>
References: <468a5626@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Jul 2007 05:21:34 -0700
X-Trace: forums-1-dub 1183810894 10.22.241.41 (7 Jul 2007 05:21:34 -0700)
X-Original-Trace: 7 Jul 2007 05:21:34 -0700, 10.22.241.41
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:263
Article PK: 104291

&#26408;&#26377;&#20154;&#22238;&#31572;&#65311;sybase&#20844;
&#21496;&#30340;&#20154;&#38590;&#36947;&#20174;&#26469;&#19981;
&#26469;&#35299;&#31572;&#38382;&#39064;&#21527;&#65311;

> Dear all,
>
> Is there any one who have noticed that the expotentiation
> calculation (^) in pb script would come out with wrong
> result in some cases. Example:
> decimal ld_temp
> ld_temp = (1 + 0.00449094232106445) ^ (-210)
>
> PB v10.5 give out the result as:
> ld_temp = 0.335668204750438524179808211999 ---> wrong
> value.
>
> While in PB v6.0,it give out the value as:
> ld_temp = 0.390242668145599904 ---> correct value.
>
> We can see that in PB v10.5,the result is wrong. We can
> check the formula with other language or in a calculator.
>
> Now it would cause error in our application.
> Wish you would give us any solution to solve the problem
> in expotentiation calculation.
>
> Thanks a lot.
>
> Echo
>
>