User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

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

  1. #1
    No Products Registered

    Join Date
    Aug 2007
    Location
    Taiwan
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    hello guys, MMF built-in debugger reported me a strange value "-1#IND" while I was using it to trace variables (or Alterable values in MMF term).

    That variable stores the distance from enemies to player, here's how I update the value:

    Code:
    Always
    - Enemies: Set Alterable Value L To 
       Sqr(
        (X( "AUX::PlayerSprite" )-X( "Group.Enemies" )) pow 2) +
        (Y( "AUX::PlayerSprite" )-Y( "Group.Enemies" )) pow 2)
       )
    where AUX::PlayerSprite is the role controlled by player.


    Thanks!

  2. #2
    No Products Registered

    Join Date
    Aug 2007
    Location
    Taiwan
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    Okay, I finally figured out that I've made a stupid mistake.
    The "+" symbol in my expression is mistyped as "-" therefore MMF attempt to calculate the square of a negative number, that is not a real number.

    So I guess that "-1.#IND" reported by debugger means the number is NULL or unable to be presented.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    Interesting nonetheless - I hadn't seen that before.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

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

    So I guess that "-1.#IND" reported by debugger means the number is NULL or unable to be presented.
    Correct. -1.#IND is similar to a null/NaN (not a number) and roughly translates to "an indefinite (negative?) (number?)".

    To quote Wikipedia, "no negative number can have a real square root".
    .:::.Joshtek.:::.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    But putting -4 ^ 0.5 gives -2...

    I just thought that was interesting.

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

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

    -4 ^ 0.5 is evaluated as -(4^0.5) not as (-4)^0.5

  7. #7
    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?

    Wow, that's the worst example of Clickteam's occasional operator precedence errors I've seen yet

  8. #8
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    never realized this ! This should be fixed, anyone trying to use some maths could get such an error and it would be very hard to debug... (of course you could use Abs(Pow0.5 but this seems stupid)

  9. #9
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

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

    Mi TI-Interactive application calculates with the same operator precedence rules as MMF2. It's not an error.

    I think the order is:
    ^ (pow)
    % (mod)
    * /
    + -

  10. #10
    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?

    Except that in this case, it's the unary "-" not the binary "-", and the precedence should be different. The unary "-" (and unary +, if supported) should be acted on before any other operators, or even interpreted as part of the number: (-4) not -(4).

    Btw, for those who don't know Clickteam's last operator precedence mistake was the * and / operators in Jamagic, interpreting a*b/c*d as (a*b)/(c*d) instead of ((a*b)/c)*d or a*(b/c)*d.

Page 1 of 2 1 2 LastLast

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
  •