Go to Post Thats what makes FIRST so unique how culture and the time is reflected through our bots, but at the same time we all get along...with no problem. - Dan Richardson [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-02-2013, 14:30
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Fun Fact

Equally fun fact:
When you compare anything and one of the elements is NaN, the result is false. Nan > 0 is false and Nan < 0 is false and Nan == 0 is false.

And it isn't just LV. This is what IEEE 754 says to do. And it makes sense, but at the same time will surprise you at times when you least expect it -- possibly causing shooters to misbehave, wormholes to form, etc.

Greg McKaskle

Last edited by Greg McKaskle : 24-02-2013 at 14:32. Reason: button slip
Reply With Quote
  #2   Spotlight this post!  
Unread 24-02-2013, 15:35
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Fun Fact

If you do decide to experiment with exploiting wormholes, remember that game pieces from past or future games should not be allowed to enter the playing field. There's no rule against it yet, but R01 is always in force.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-02-2013, 15:49
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,623
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Fun Fact

Quote:
Originally Posted by Greg McKaskle View Post
Equally fun fact:
When you compare anything and one of the elements is NaN, the result is false. Nan > 0 is false and Nan < 0 is false and Nan == 0 is false.

And it isn't just LV. This is what IEEE 754 says to do. And it makes sense, but at the same time will surprise you at times when you least expect it -- possibly causing shooters to misbehave, wormholes to form, etc.

Greg McKaskle
Corollary: The smart programmer uses this fact to some advantage. If there's a possibility of you getting a NaN as result, then make sure your false case is what you'd want to run if you're processing a NaN. Makes things a lot more reliable.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #4   Spotlight this post!  
Unread 25-02-2013, 22:14
sur sur is offline
Registered User
AKA: Sujit Rao
FRC #3324 (Metrobots)
Team Role: Alumni
 
Join Date: May 2012
Rookie Year: 2011
Location: Ohio
Posts: 12
sur is an unknown quantity at this point
Re: Fun Fact

Quote:
Originally Posted by Greg McKaskle View Post
Equally fun fact:
When you compare anything and one of the elements is NaN, the result is false. Nan > 0 is false and Nan < 0 is false and Nan == 0 is false.

And it isn't just LV. This is what IEEE 754 says to do. And it makes sense, but at the same time will surprise you at times when you least expect it -- possibly causing shooters to misbehave, wormholes to form, etc.
Apparently this is how IsNaN is implemented in C#: http://stackoverflow.com/a/1145462.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi