 What's up guys Mike the Coder here today? I'm going to go over a cool trick that I learned so here Let's say we have two numbers a and b and We are want to multiply them together and then truncate the fractional part so we get rid of the decimal part So as you can see here one nine eight times one point one Equals two one seven point eight and if you remove the point eight you get two one seven So this problem is actually really easy if the values are super small But for super large numbers you have to know the trick behind it So how do you do this problem and what is the trick? So truncating is really hard for like large numbers, but here's the trick. So you take your decimal part Right your decimal number so both of these are b is a decimal All right, and a is an integer so when you take your decimal part You add up by any random garbage value that has like longer than I don't know Point zero zero one or any garbage value right that has like a decimal value And then what you're going to do is you're going to multiply by a hundred and cast it Okay, so here LL is a long long So we're going to take our decimal value and multiply by a hundred and cast it to a long long Okay, so that way is it's going to be Truncated and then what we're going to do is we're going to take this value and multiply by a Which is like our other value right? All right value of a and then we're going to divide by a hundred essentially what we're doing is we're taking So we're trying to calculate a times b right and then truncate it So truncate so to what we're doing is we're basically taking b and then just adding it by like point zero zero one Right, and then we're casting it cast it multiple point zero zero one and then multiply this value by a hundred and We're casting it Okay, to a new new new new value Let's call it D and then then we multiply this new value by a and divided by a hundred Okay, so a times D divided by a hundred Okay, the reason why we're doing this is that this would help stop the overflow of issues for floating point values and It will also help you dealing with large numbers. So, yeah, this is a cool trick you could do Not sure if it's super useful outside of coding contests, but this is very useful Okay, so add it by some garbage decimal value multiplied by a hundred cast it Then do your multiplication with your other number and the divide by a hundred Okay Yeah, if you want to take two numbers and you want to truncate and multiply them Multiply them and then truncate it. This is what you do Yeah, I hope you guys know this video may come subscribe. I'll check you guys later. Peace