# Will random function ever hit a hard coded decimal number?

I'm not very sure how exactly a fractal number is stored nor how random function works in mordern programming languages.

But I am curious, will random function ever hits a hard coded decimal number?

I know mathematically it is impossible, but how about in computer science?

Such as the following javascript code, will it ever hit the number and stop?

// this can be any number
const rnd = 0.123456;

while (true) {
if(rnd === Math.random()) {
console.log('hit');
break;
}
}

Also I ran that code for 2 hours and it didn't stop

If decimal points are store in 64 bit, does that mean the chance to hit any decimal point is 1/2^64?

If it can hit, is 0.000123456 harder to hit than 0.01?

Anyways, the computer can still represent a lot of numbers. Depending on your computer, it can be around $$2^{32}$$ different numbers, hence, if you try to actually run this code on your computer, it could take a lot of time and you might even start to think it will never finish...