User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: Debugger say "-1.#IND" what does that mean?

  1. #11
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Debugger say "-1.#IND" what does that mean?

    Well, knowing my routines, -4^0.5 is evaluated as (-4)^0.5. So i do not know why it gives such a result...

  2. #12
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugger say "-1.#IND" what does that mean?

    Whilist it is true that in most languages, unary minus has very high precedence, in most usual languages ^ does not mean power. However, in cases when it does mean power, it does usually have higher precedence. In addition, when power is implimented as another symbol (** in Pascal springs to mind) it is usually higher than unary subtract.

    Therefore, I think most people would expect:
    -4^0.5 to be -(4^0.5) = -2

    Of course, you can do what you like and these rules are only for convenience, but I'd say how it works now is correct.

  3. #13
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugger say "-1.#IND" what does that mean?

    In c++, unary minus is evaluated before nearly every other operator, but it doesn't have a pow operator.

    Excel apparently does the unary minus before powers.

    Wikipedia claims that powers should be done first.

    I've just tested MMF2 and it does do (-4) pow 2, so I don't know where the claim it did any different came from. The counter displays it as "-1." (numbers form), but the debugger shows the full -1.#IND.
    EDIT: In fact even in the case of '0 - value("counter") pow 0.5' (MMF has no negate operator, have to put "0 - ") it does the subtract first, which probably IS wrong. No that's wrong, my counter had a value of -4. MMF handles it correctly

  4. #14
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugger say "-1.#IND" what does that mean?

    "Excel apparently does the unary minus before powers." -- Just tested and you are right. That is very very odd. Perhaps it is the best behavour for MMF then if Excel does it.

    Still, I do think that evalaulating power is quite an established tradition. For instance, you would always write (-2)^2 instead of -2^2.

    "In c++, unary minus is evaluated before nearly every other operator, but it doesn't have a pow operator." - Yeah it is true that it is very high on the precedence table.

  5. #15
    No Products Registered

    Join Date
    Jun 2007
    Location
    Croatia
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Debugger say "-1.#IND" what does that mean?

    and that's why I always use parentheses

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. What does _ _mb mean in the debugger?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 17th October 2008, 09:23 AM
  2. Debugger?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th August 2008, 07:17 PM
  3. Resizing the debugger...
    By Simon in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 6th July 2006, 10:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •