1. Tamas Polgar
  2. PowerBuilder
  3. Tuesday, 16 January 2024 10:12 AM UTC

Hi

 

Have the following problem in PB 2022. (PB 2022 R2 Build 2819)

messagebox("384.22 - double('384,22')", 384.22 - double('384,22'))

Result: 5,6843418860808E-14

 

With 384.23 it's ok:

messagebox("384.23 - double('384,23')", 384.23 - double('384,23'))

Result: 0

 

In PB 2019 it works fine. (PB 2019 R3 Build 2728)

 

Any idea?

 

Thanks

Tamas

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 16 January 2024 10:34 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

messagebox("384.22 - double('384,22')", 384.22 - double('384,22'))

I get -38037.78

messagebox("384.23 - double('384,23')", 384.23 - double('384,23'))

I get -38038.77

Have you set any different regional settings?

Happiness Always
BKR Sivaprakash

 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 16 January 2024 12:35 PM UTC
If I'm not mistaken, there was some kind of bug reported with doubles and decimal separators
  1. Helpful
  1. Andreas Mykonios
  2. Tuesday, 16 January 2024 12:43 PM UTC
  1. Helpful 2
  1. Andreas Mykonios
  2. Tuesday, 16 January 2024 12:47 PM UTC
In that support case, a support fix was provided for PB 2022 2819. Personally I prefer using the release including the fix, which is 2828.

Andreas.
  1. Helpful
There are no comments made yet.
Tamas Polgar Accepted Answer Pending Moderation
  1. Thursday, 18 January 2024 13:50 PM UTC
  2. PowerBuilder
  3. # 2

Migrating to PB 2022 R3 build 3289 solved the problem.

Correct result for both the values.

 

Thanks

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 18 January 2024 17:30 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.