A sample for arithmetical expression evaluation

Discussion in 'Share Your Creations' started by coldraymagic, Jan 21, 2009.

  1. coldraymagic

    coldraymagic New Member

    A sample for arithmetical expression evaluation.(the sample supported function)

    :)
     

    Attached Files:

    • exp.sbp
      File size:
      4.4 KB
      Views:
      119
  2. Filippo

    Filippo Expert Licensed User

    Hi coldraymagic,

    i think the bills are not right. ;)


    Ciao,
    Filippo
     

    Attached Files:

  3. klaus

    klaus Expert Licensed User

    I agree with Filippo, unfortunately your math evaluator doesn't take into account the order of operations Order of operations - Wikipedia, the free encyclopedia !

    In Filippo's examples:
    sqrt(9) + 2 ^ 2 = 3 + 4 = 7 and not 25
    the sqrt operation AND the ^ operation must be executed before the + operation !
    your calculation is equivalent to
    (sqrt(9) + 2) ^ 2 = 25

    Best regards.
     
    Last edited: Jan 22, 2009
  4. Rioven

    Rioven Active Member Licensed User

  5. klaus

    klaus Expert Licensed User

    Hi Rioven,

    Thank's for the 'bug report', I corrected the value in my post.
    It seems that I was more concentated on the principle rather than on the result? But anyway this one must be correct !

    Best regards.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice