19 Jul
2005
19 Jul
'05
10:48 p.m.
This is my function to convert a fraction (0<x<1) to binary : f x Št<1 = 0::f t Šotherwise = 1::f (t-1) where t = 2*x I guess there's nothing wrong with that, but when traced, it has something like 0.6*2 - 1 = 0.600001 This error got accumulated and made my f function wrong (will eventually evaluate an infinite 0, no matter what value of x) Please tell me there's some ways to deal with that. Thanks a lot _________________________________________________________________ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/