I find the float in PB perhaps errors!
for example, truncate(2.37,2)=2.37. In PowerBuilder, the data 2.37 is stored as 2.369999885559082, so I get the result is 2.36; round(0.35,2)=0.35. But In PowerBuilder, the data 0.35 is stored as 0.3449999988079071, so I get the result is 0.34. However I can use the state truncate(round(2.37,3),2)=2.37 to get the right result, but I can't get the right result round(0.35,2)=0.35.It is only one example.
I think dealing with the problem by the way isn't good, and I can't solve them.
In any other computer language , programmer don't meet with the problem. I think these problems should be dealed with the PowerBuilder.
If you can help me , let me know. thank you very much!
for example, truncate(2.37,2)=2.37. In PowerBuilder, the data 2.37 is stored as 2.369999885559082, so I get the result is 2.36; round(0.35,2)=0.35. But In PowerBuilder, the data 0.35 is stored as 0.3449999988079071, so I get the result is 0.34. However I can use the state truncate(round(2.37,3),2)=2.37 to get the right result, but I can't get the right result round(0.35,2)=0.35.It is only one example.
I think dealing with the problem by the way isn't good, and I can't solve them.
In any other computer language , programmer don't meet with the problem. I think these problems should be dealed with the PowerBuilder.
If you can help me , let me know. thank you very much!