We do not have a complete solution yet:

Problem is that the simplified equation people have proposed under computer
math(floating point error) yields a slightly different graph than the
non-simplified one.

A)
Original equation
x = (double)  x / ( (double) (1 + sysRandomMax / n )) ;

B)
Without casting
x =   x /  (1 + sysRandomMax / n ) ;

C)
Simplified version
x = x / ((1 + sysRandomMax) / n)


A is not equal to B or C due to floating point error.

For this equation:
y (x) = x/ (1+199/2)

we get
y(67) = .995 which when rounded down for integer we get 0

for
y(x) = x*3/(1+199)
y(67) = 1.005 which when rounded down for integer we get 1

Dave



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to