This could be fixed by multiplying the number by 100
so that floating points aren't used at all. (If you
know for sure you will never have more than 2
decimals) I'm assuming these are money amounts.

I once saw a similar problem where a locate on a list
of appartements for 1 would find appartment 1E0 as a
match. (On Universe).


--- Raymond DeGennaro II
<[EMAIL PROTECTED]> wrote:

> At 07:35 -0700 2006/03/29, Kevin King wrote:
> >Wow, Piers, absolutely true.  I just ran on UD6PE
> and it fails exactly
> >as described.
> 
> I sounds like UniBASIC is doing "proper" floating
> point math and the 
> example has hit one ore more values that are tough
> to represent 
> "exactly".
> 
> >If you concatenate a null to the end, then it
> works,
> 
> Because now they're strings.
> 
> >but adding a zero to each side of the IF A = B THEN
> does not change
> >the outcome.
> 
> Back to floating point "in-exactness"
> 
> >I have no explanation, and it does scare me just a
> bit.
> 
> I think folks coming from a C/Pascal background
> aren't too suprised. 
> Back in those days, I regularly re-used a
> "floatequal" macro that 
> just made sure that (a-b) was less than a defined
> tolerance value.  I 
> think that's part of the reason for the popularity
> of "fixed point" 
> notation in the days before FPU's became ubiquitous.
> 
> In Grad School, I had one project that suffered so
> much from floating 
> point round off, that I had to switch to an
> arbitrary precision math 
> library.  All the math was done in Base256, so it
> was easy to just 
> tack on an extra byte to get an extra "digit" of
> precision.  Think 
> School House Rock's "Hey Little Twelve Toes" times
> 21-1/3.
> 
> Ray
> -- 
>
.=================================================================.
> | =-=-=-=-=-=-= Eagle Rock Information Systems Corp
> =-=-=-=-=-=-= |
> | -=-=-=-=-=-=- web and database business solutions
> -=-=-=-=-=-=- |
> |   <http://www.eriscorp.com>       
> <mailto:[EMAIL PROTECTED]>   |
> |Midwest Regional Office: 815-547-0662 (voice) 
> 815-547-0353 (Fax)|
>
.=================================================================.
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit
> http://listserver.u2ug.org/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to