Math issue, isn't it?
Bob Sneidar
bobs at twft.com
Fri May 8 17:49:44 EDT 2009
Yes, but my point was if someone was creating an Accounting
application, he would have to know to wrap all of his equations in
value(), otherwise he could not do any logical comparisons on equated
values. While your approach works, I think that the better approach is
for this issue to be addressed in a future update. If there is no
present way to prevent 283.67 - 150 - 133.67 from equaling
0.00000000000002842 other than wrapping it in a conversion function,
then that needs to be addressed. I failed 6th grade math and even I
know that is wrong! :-)
Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM
On May 8, 2009, at 2:11 PM, Scott Rossi wrote:
> Recently, Bob Sneidar wrote:
>
>> Then the question becomes, should the IDE be doing math on the real
>> number or the displayed number? I vote for the displayed number
>> because that means I can have some kind of control over the outcome.
>> Clearly if some calculation that comes up with a number cannot be
>> compared to a literal for equal/not equal, then all accounting is out
>> the window. This cannot be an intended behavior!!?!
>
> As others have said, the issue arises due to the decimal values -- if
> integers are used, the comparison works "correctly" (and I'd prefer
> not to
> argue over what is "correct"). I don't know if this is an acceptable
> solution but when I use the value function, I get the expected result:
>
> put value(283.67 - 150 - 133.67) = 0
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list