This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-12-22 14:34:58

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

An addition with fractions

Well I have been experimenting with pi and when I add a button to my calculator which changes the main number to 3.14 and I click start and click that button the variable changes to 3.1 and not 3.14. I think they should really change it to unlimited (or at least more) fractions.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#2 2007-12-22 14:44:27

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: An addition with fractions

I'm pretty sure that internally the value is being carried to much greater precision.  It is only the very limited variable display that is rounding or truncating the internal value.  You can test this theory by multipliying your variable value by 100000 or some such to shift the decimal over and then displaying it.  It would certainly be nice to have control of the variable display format....let's put it on the wish list!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer