Thank you MIT!! I've used this to back up my college since they do not go into enough detail to satisfy what I want to know. I didn't have enough money to go somewhere great like I wanted to, so I had to settle and you guys making these videos make it possible for me to catch up on what I'm missing.
2:00 Nitpick: other languages (everything C, .Net and Java, for instance) also define a type LONG, but those are limited to 2^64. There's no way to represent 2^1000 in these languages as an INT; you can only use the type DOUBLE, which is not integer.
3:30 2 billion ~ 2^31-1; int is represented on 32 bits, and half of that is reserved for negative numbers.
8:30 interesting result of that: every number that isn't a power of 2 is an approximation in float.
Hey guys, I have a question, so around 23:30..can someone clarify to me what does the following statement mean: "abs(a*a - 2.0) < epsilon"
I'm unsure what that statement is saying, I am a bit familar with epsilon, its that big E letter that represents sum from one variable to another, however in this case the epsilon is being used differently..I don't fully understand, I don't fully understand the whole statement! If anyone could explain that to me that would be greatly appreciated.
Nope - that greek letter is the letter "s" and is commonly used for, as you said, sum. Epsilon is the greek letter "e" and is commonly used for the value of a small positive number. In this case epsilon is chosen to be the amount of difference we'll consider to be "close enough to not care about".
We calculate the absolute value (abs) of (a*a) - 2.0. if that number is less than what we consider to be "close enough" we decide the two floats are equivalent.
Nope - that greek letter is the letter "s" and is commonly used for, as you said, sum. Epsilon is the greek letter "e" and is commonly used for the value of a small positive number. In this case epsilon is chosen to be the amount of difference we'll consider to be "close enough to not care about".
We calculate the absolute value (abs) of (a*a) - 2.0. if that number is less than what we consider to be "close enough" we decide the two floats are equivalent.
What we are basically doing here is working out what the difference is between what our rounded floats are and the value 2.0 (and we pick 2.0 because that's what we KNOW the answer should be)... epsilon is the amount of "slack" well accept.
I wonder how strange that felt to speak to an empty auditorium. If it were me, I may have wanted to lecture to the camera. He did great. I'm so grateful for these open courseware lectures. I am learning tons.
@Pichounator I just entered the variable, no print. That seems to affect other examples, like the one with "for i in range(10) s+=0.1" in Python 3 the last digits are 99, not 89, and the 'print' statement also prints 0.99...
MIT is my dream school for graduate studies in aerospace engineering.... right now im in my first year aerospace at ryerson university Canada. computer programming is very interesting but MIT makes it even more interesting! THANKS MIT!
THANK YOU MIT!!! The internet is the most amazing tool mankind has ever created. Unfortunately most people use it to manage fantasy football or watch sneezing pandas. There is no excuse for people not taking the initiative to learn any piece of information available to mankind.
i really want to learn to program, i've been messing with computers since i was 8 yrs old and consider myself an expert in most aspects of computer hardware/operating systems. But no matter how low i try to start in the programming totem pole it all sounds greek and i can't seem to find any instruction that doesn't include explanations for some things that i've never heard of.. i'm i just dumb or is there no such resource out there lol..
@jdsanchez473 I was the same way before i found, "a byte of python". It's a great introduction. Then i explored the python standard library. Now i'm listening to MIT lectures and reading dive into python. I've been finding it's a beautiful order to begin learning how to program. And python's interpreter, simple structure, and power make python a great facility for learning how to program.
-1022 to 1023 is because 2 power 10 = 1024,but 52 bits for mantissa will be 2 power 52 = 4.503599627 x 10 ^15,and that will gives us 16 digits long decimal,am i right ? why prof. said 17 digits?
Yes, thank you very much for taking the extra step in providing this lecture. By doing so, MIT has shown its dedication to us all. You could have easily just skipped it and rendered this series a disappointment. Thanks again...
creepy no audience hahahahaha
anderzom 20 hours ago
wow. okay, that's just impressive dedication to education. I'm gonna go donate to mit now.
fedal15 1 day ago
Thank you so much Prof Guttag!
javierbaldrich 2 days ago
Every time he tells a joke. . .
*awkward silence*
awsomenesscaleb 1 week ago
Thanks professor for lecturing to an empty audience just for us youtubers!
Also, thanks for clarifying squareRootBi, got a bit confused there.
calculusisamazing 2 weeks ago
Thank you MIT!! I've used this to back up my college since they do not go into enough detail to satisfy what I want to know. I didn't have enough money to go somewhere great like I wanted to, so I had to settle and you guys making these videos make it possible for me to catch up on what I'm missing.
liberate9 1 month ago
You can thank MIT by sharing open courseware via facebook, twitter etc. There could be lots of people who needs it but doesn't know it exists.
Belgarath 1 month ago
Thanks M.I.T!!!!!
impressive!
Apachaiii 1 month ago
thanks for taking time out and coming again to give this lecture.
aquajemavi 2 months ago
BTW, starting with Python 3.1, x = 0.1 will return 0.1
happenchance 2 months ago
Thank you MIT and professors lecturing. True open education for everyone, everywhere. Watching this from Thailand. Open courseware rocks!
RIR84 2 months ago
Thanks MIT.
Eleth 2 months ago
32:45 lol :D
Damirok 3 months ago
Wow they redid it with an empty class just for us.. That's so amazing, thank you MIT!
onelerv1 3 months ago 11
2:00 Nitpick: other languages (everything C, .Net and Java, for instance) also define a type LONG, but those are limited to 2^64. There's no way to represent 2^1000 in these languages as an INT; you can only use the type DOUBLE, which is not integer.
3:30 2 billion ~ 2^31-1; int is represented on 32 bits, and half of that is reserved for negative numbers.
8:30 interesting result of that: every number that isn't a power of 2 is an approximation in float.
10:30 A word = 2 bytes. Ancient stuff that
StrikaAmaru 4 months ago
@StrikaAmaru so u know more than him , u should go teach at MIT :p
yoyaya007 4 months ago
@yoyaya007 Industry jobs always pay more than teaching jobs ;)
StrikaAmaru 4 months ago
@StrikaAmaru no, it depends and you know that
yoyaya007 4 months ago
Comment removed
StrikaAmaru 4 months ago
Hey guys, I have a question, so around 23:30..can someone clarify to me what does the following statement mean: "abs(a*a - 2.0) < epsilon"
I'm unsure what that statement is saying, I am a bit familar with epsilon, its that big E letter that represents sum from one variable to another, however in this case the epsilon is being used differently..I don't fully understand, I don't fully understand the whole statement! If anyone could explain that to me that would be greatly appreciated.
TheZeppelinForever 4 months ago
@TheZeppelinForever
Nope - that greek letter is the letter "s" and is commonly used for, as you said, sum. Epsilon is the greek letter "e" and is commonly used for the value of a small positive number. In this case epsilon is chosen to be the amount of difference we'll consider to be "close enough to not care about".
We calculate the absolute value (abs) of (a*a) - 2.0. if that number is less than what we consider to be "close enough" we decide the two floats are equivalent.
H18136 4 months ago
@TheZeppelinForever
Nope - that greek letter is the letter "s" and is commonly used for, as you said, sum. Epsilon is the greek letter "e" and is commonly used for the value of a small positive number. In this case epsilon is chosen to be the amount of difference we'll consider to be "close enough to not care about".
We calculate the absolute value (abs) of (a*a) - 2.0. if that number is less than what we consider to be "close enough" we decide the two floats are equivalent.
H18136 4 months ago
@TheZeppelinForever
What we are basically doing here is working out what the difference is between what our rounded floats are and the value 2.0 (and we pick 2.0 because that's what we KNOW the answer should be)... epsilon is the amount of "slack" well accept.
Make sense?
H18136 4 months ago
I wonder how strange that felt to speak to an empty auditorium. If it were me, I may have wanted to lecture to the camera. He did great. I'm so grateful for these open courseware lectures. I am learning tons.
jmannii 4 months ago
i really do love the internet
supr3fre4k 5 months ago
What a legend!
SuperCorey95 5 months ago
He makes a funny noise just after 5:02
intuit13 6 months ago
32:43 LOL!
matthewkevinpowers 6 months ago 4
Each time I saw him went down on one knee before the table, I could not help expecting he was gonna propose to the laptop :D.
kokorosindeyiru 6 months ago
Hahaa. Even MIT has technical glitches. Lecturing to an empty class - Love it. Talk about dedication.
dandamakakojo 8 months ago 9
@dandamakakojo I'm so impressed by their commitment!
goobahman 7 months ago
It's strange, I don't get the 0.1 error using Python 3
ylavidasenosva 8 months ago
@ylavidasenosva You aren't using the print command only, of course? You entered the variable which was set to 0.1 and entered just the variable?
Python 3 brings the approximation straight into the variable's actual value, then (or at least when that variable is called).
Pichounator 6 months ago
@Pichounator I just entered the variable, no print. That seems to affect other examples, like the one with "for i in range(10) s+=0.1" in Python 3 the last digits are 99, not 89, and the 'print' statement also prints 0.99...
ylavidasenosva 6 months ago
i wish i could get a degree by watching :(
loko95ftp 9 months ago
Thank you!!
codelurker 9 months ago
@codelurker
you should stop saying thank you and make a donation
loko95ftp 9 months ago
thank you.
Dodgerdog83 11 months ago
5:29
jillybooty 1 year ago
MIT is my dream school for graduate studies in aerospace engineering.... right now im in my first year aerospace at ryerson university Canada. computer programming is very interesting but MIT makes it even more interesting! THANKS MIT!
floyd617 1 year ago 3
THANKS MIT UTILIZATION OF NETWORK TRAMISSION IS CONSISTENTLY WORTHY
cmdargument 1 year ago
def SquareRootBi(x,epsilon): assert x >= 0, +str(x) assert epsilon > 0, +str(epsilon) low = 0 high = x guess = (low+high)/2.0 crt = 1
# counter
Fensterplaetzchen 1 year ago
while abs(guess**2-x) > epsilon and crt <= 100: print 'low: ',low,'high: ',high,'guess: ',guess if guess**2 < x: low = guess else: high = guess guess = (low+high)/2.0 crt += 1 assert crt <= 100
# iteration count eceeded print 'Bi method Num iterations',crt,'Estimate',guess return guess
SquareRootBi(5,.0001)
Fensterplaetzchen 1 year ago
THANK YOU MIT!!! The internet is the most amazing tool mankind has ever created. Unfortunately most people use it to manage fantasy football or watch sneezing pandas. There is no excuse for people not taking the initiative to learn any piece of information available to mankind.
MadTown314 1 year ago
i really want to learn to program, i've been messing with computers since i was 8 yrs old and consider myself an expert in most aspects of computer hardware/operating systems. But no matter how low i try to start in the programming totem pole it all sounds greek and i can't seem to find any instruction that doesn't include explanations for some things that i've never heard of.. i'm i just dumb or is there no such resource out there lol..
jdsanchez473 1 year ago
@jdsanchez473 I was the same way before i found, "a byte of python". It's a great introduction. Then i explored the python standard library. Now i'm listening to MIT lectures and reading dive into python. I've been finding it's a beautiful order to begin learning how to program. And python's interpreter, simple structure, and power make python a great facility for learning how to program.
IcarusFlying 1 year ago
@IcarusFlying Thank you, i will look into that :)
jdsanchez473 1 year ago
This has been flagged as spam show
at 6:14, when he displays x he gets 0.100000001 but I just get 0.1. does anyone know why that might be?
joejoejoe64 1 year ago
Comment removed
joejoejoe64 1 year ago
This has been flagged as spam show
if (name == Vegeta and powerlevel > 9000): print("It's over 9000!!!")
Mattprole 1 year ago
Comment removed
Mattprole 1 year ago
lol he sounds like a dvd reapeting the same thing 16:00
Ello2Moto 1 year ago
-1022 to 1023 is because 2 power 10 = 1024,but 52 bits for mantissa will be 2 power 52 = 4.503599627 x 10 ^15,and that will gives us 16 digits long decimal,am i right ? why prof. said 17 digits?
RussellTuan 1 year ago
1/10 of base 2 = 0.0011001100.......but prof. write 0.000110011....
RussellTuan 1 year ago
thank you for speaking to a large audience ... 14,860 people have been in that classroom so far =)
alphydan 1 year ago 9
Thank you for supplying this lecture. Very well done!
It might be less strange to speak to an empty classroom if you print out smiling faces of people and tape them to some of the chairs.
oossgg 1 year ago
Comment removed
NeutralExistence 1 year ago
MIT kicks ass.
supaflyjohnson 1 year ago
Thank you very much, Professor
fiveofakind 1 year ago
this is weird without the class there
FredrichNietzsche25 1 year ago 4
Awesome lectures so far, thanks a ton!
Jarke11 1 year ago
I love ocw.
calvinandhodge 1 year ago 3
Thanks so much for doing this!
muted0 1 year ago
good stuff, man. I commend you.
killtheotherside 1 year ago
thanx a lot!!
Greatly appreciate your commitment!
basheersubei 1 year ago 2
And, i liked the subdle jokes.
sgamamia90 2 years ago
Thanks from an italian student. You are a great teacher.
sgamamia90 2 years ago
wow, I am impressed with MIT's commitment to open courseware. Thank you very much!
mossimokim 2 years ago 151
excellent lecture. great prof. thank you.
veramentegina 2 years ago
thank you for your lectures. - A student from the Netherlands
warmwaterkruik 2 years ago
Yes, thank you very much for taking the extra step in providing this lecture. By doing so, MIT has shown its dedication to us all. You could have easily just skipped it and rendered this series a disappointment. Thanks again...
yumyum999zz 2 years ago 8
Very very impressed with this lecture series!
jdtbruck 2 years ago
Thank you
alphydan 2 years ago
at 14:30 - 1.0 times....anybody? LOL!
alankarmisra 2 years ago 47
Wow, thank you so much for doing this just for us. Genuinely appreciate it.
alankarmisra 2 years ago 4
what a respect to the professor!
useagle1987 2 years ago 6
nice lecture despite no audience...
MAHIGUPTA 2 years ago 3