 Now a great example of a conditional statement and evaluating a conditional statement can come through Something known as approximation and there's a reason for this. Well, again If we think about just this magical term and this picture that I grabbed offline It's that a value is nearly but not Exactly correct. And if we think about that for a second. Oh, well, that's AI That's the circle thing that he showed in the last video, but we can get super super crazy and use it with Decimals The entire idea is that we're dealing with floating point numbers or we're dealing with you know Decimal places with some of our mathematics and the problem is that I could have for example a Number that just continues to trail on into Infinity and the problem is again, let's think about this from just more of a resource perspective. I have a Finite place or a finite amount of memory, right? This maybe only has two gigs of space get two gigabytes of space It can't store an infinite number of decimal places and it just physically cannot Reason why this is important is when we start to think about something more like this 0.6. All right, we all can see it seems very finite in nature, but the problem is that that still has tons and tons of Zeros going to infinity and so as a result there is actually a problem with Almost every programming language out there known as the floating point error The entire idea is if I take say 0.1 and even for our sake, let's go ahead and throw this out there. So X is going to equal 0.1. Okay Now what's going to happen if I subtract X minus 0.1? I get 0.9. Okay Mr. Guida is clearly a liar and a thief and a charlatan No, but let's just continue rolling with this for a second. Let's say 0.1 minus 0.1. Okay. All right He's still a heretic and a charlatan and all of those other bad things, but 0.1 one more time What is this that's not right, you know, that's not how I was taught math, right? It should be 0.7, but as you can clearly see it is 0.7 trailing a ton of zeros One because again, this is really getting down to like the ones and zeros inside of binary inside of your computer And the problem is that at some point Python had to cut it off and it's not just that I Did it with a zero point, you know, I did it with a bunch of those zero point ones Okay, maybe I did but more to my point is That you could get these zero point these floating point errors and So you have to think about how I can evaluate them because the reason why is if Well, let me store this so x is going to now why we'll say y is now going to equal seven is Why equal equal to zero point seven if that is true Why is zero point seven Else and what we know will happen Why is Straight well, I don't need the string for this why again, we didn't see the zero point seven Approach because this is a false statement this number zero point seven zero zero zero zero zero zero one does not equal zero point seven So what can we do in effect with this? That's actually where we can do approximations and the entire idea to an approximation is we have some Threshold in this case. We're calling it epsilon just it's math because math term says that that means Very small positive quantity So we're saying basically within some type of plus or minus threshold is going to be appropriate. So again, if I did my Little subtraction and there needs to be another 0.1 here Now what we can do is say well First we need to find out if we are instead of checking to see if it's equal to zero point seven instead of seeing that We're going to see is It within a threshold is it close enough to zero point seven that we are okay with it So just to see sort of all of the actions going on here ABS ABS is a built-in Python function. It already exists. It's for our benefit but the entire idea is that it's going to produce the absolute value of Whatever number we give it so in this case I gave it negative seven It's going to return a seven now The reason why this is important is because if I did something like y minus zero point seven I'm gonna see one number. It's gonna be an ugly number But what happens if I had done zero points on minus y? Oh? well now it's a negative number and if we think about what our criteria was is a negative number less than zero point zero zero zero zero one Well, yeah, that's a true statement. So that's technically not true So what we're doing here is again, we're gonna set establish some Epsilon yeah, that's what I thought it's not epi salon epsilon It's going to be just some Threshold again, you can make it as rough or fine detailed as you want and Then we're saying if the absolute value of our calculated value minus our expected value of zero point seven if That is less than our Epsilon print Why is Approximately Zero point seven and again, that's exactly what we should see Why is in fact approximately zero point seven?