Strange math behaviour... could someone explain this ?

Lynch, Jonathan bnz2 at cdc.gov
Fri Oct 7 09:13:23 EDT 2005


I get the same thing...

That's gotta be a bug.


-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of jbv
Sent: Friday, October 07, 2005 7:17 AM
To: How to use Revolution
Subject: Strange math behaviour... could someone explain this ?

Hi list,

example 1 :

  put 1.8 into myA
  put trunc(myA * 100) into myA

  in that case, myA=180    which is OK
------------------

example 2 :

  put 34.2 into myA
  put 36 into myT

  if myA > 0 then
    if myA < myT then
      get myA
      put myT - myA into myA
      put it into myT
    else
      put 0 into myA
    end if
  end if

  put trunc(myA * 100) into myA

  in that case, myA=179    ?????????????????????


Best,
JB

_______________________________________________
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