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

#1 2009-03-10 14:05:14

djmoomoo
Scratcher
Registered: 2007-08-31
Posts: 57

Coping with (240/180)!

I typed the number 1.333333333 into a subtraction block in scratch, but it automatically changes to 1.3333333330000001 .

I can see why this is happening due to scratch's incapability to cope with 1/3, but the number I typed isn't 1/3 ? It's not really a massive problem, just a little glitch which could be fixed very easily. I'm sorry I don't have a screen capture video.

Last edited by djmoomoo (2009-03-10 14:05:56)


There are 0011 types of people, those that can count in binary and those that can't.

Offline

 

#2 2009-03-10 20:13:01

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

Re: Coping with (240/180)!

Many floating point numbers that you enter into a computer have to be represented as an approximation due to the limitations of the storage scheme...how the base 10 number with integer and fractional portions maps into the base 2 pattern of ones and zeros (of fixed length) that the computer uses to store it.

Boy was that a long and awkward sentence.  Sorry about that!  Wanted: a good technical writer to clean that up.


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

Offline

 

Board footer