## Difference with PB3.0a and PB3.0d

### Difference with PB3.0a and PB3.0d

Hi!  What's the diff between PB 3.0a and 3.0d?  Does 3.0d solve alot of
bugs?  Does it bring any of its own bugs along?

Thanks for any info!

PB does not convert decimal numbers to real correctly.
You can do the following PB script to see this:

//---------------------------
decimal a
real b

a = 74247.02
b = a
//---------------------------

messagebox("bug","a = " + string(a) + " b = " + string(b))

This script pops up the message a = 74247.02 b = 7.4247.0234375
That is a <> b. You can also check a and b in the PB-debugger if
you do not trust the messagebox() function, the result is the same
that is a <> b

This bug causes problem e.g. when calculating total coast as shown
in the followning script:

//---------------------------
decimal unitPrice,totalPrice
real units

units = 5
unitPrice = 74247.02

totalPrice = units * unitPrice
//---------------------------

This will give totalPrice = 371,235.125 but 5 * 74247.02 = 371,235.100

Anyone got a solution to this problem?

--

-----------------------------------------------------------------