Hello, this is no technical problem, but I was wondering how I could do, by example, make a function that when I call it, I enter a number and it will return a number around it, but it has more chances to return something near, in fact, the nearer the number is, the more chances it will be the one returned? I already have something working for this, but I’m afraid it is a little bit too heavy…

you can probably use a function with a limit and make that limit be worked into your own limit.

the sin of x/x gets closer and closer to 1 for example as x approaches 0.

For example the difference between x = 1 and x = .1 maybe be .1 but the difference between x = .0001 and x = .00000000001 may only be far less than .1 (and in fact it is).

that means if x is a random number between 1 and 10000 its much more likely to be close to 0 than close to 1.

SO there you go its a number thats likely to be very close to zero.

Now the only problem is that technically it never is zero.

look up sin x/x or function limits or something to learn more

mark as answered and have anice day