View unanswered posts | View active topics It is currently Mon Nov 11, 2019 9:43 pm






Reply to topic  [ 5 posts ] 
bug with float on EV3 
Author Message
Rookie

Joined: Tue Feb 21, 2012 12:38 pm
Posts: 12
Location: Paris, France
Post bug with float on EV3
Hi,

I'm just trying the 4.25 version on my EV3 and I found a weird behaviour. After debugging, I realized that comparison of 2 float variables didn't work fine. Here is my code
Code:
task main()
{
   float a=1.0;
   float min = -1.0;
   if (a<min)
      toto = 12;
   else
      toto =9;
   return;
}
with this running on my EV3, I have toto=12. If a and min are int and not float, I have toto=9 (good behavior).
I hadn't this weird behaviour with RobotC 4.10.
Is it a known regression or did I miss something?

_________________
Bichon, Brickstory team for Eurobot


Mon Sep 01, 2014 2:07 pm
Profile WWW
Rookie

Joined: Fri Sep 20, 2013 8:39 am
Posts: 38
Post Re: bug with float on EV3
I tried but could not recreate the problem with 4.26 and an EV3.


Tue Sep 02, 2014 8:01 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: bug with float on EV3
Yeah, me neither...

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Sep 02, 2014 8:13 am
Profile WWW
Rookie

Joined: Tue Feb 21, 2012 12:38 pm
Posts: 12
Location: Paris, France
Post Re: bug with float on EV3
Then I'll try with 4.26, maybe it will be better than 4.25

_________________
Bichon, Brickstory team for Eurobot


Thu Sep 04, 2014 5:48 am
Profile WWW
Rookie

Joined: Tue Feb 21, 2012 12:38 pm
Posts: 12
Location: Paris, France
Post Re: bug with float on EV3
After downloading RobotC 4.26, it works well :D
Thx for your answers.

_________________
Bichon, Brickstory team for Eurobot


Thu Sep 04, 2014 1:52 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.