VXAce Damage Formula Help

*Edited for clarity*
I'm working with the following damage formula:

(((a.atk/b.def * (x * 5)) * y) + 1

Where x= a base damage modifier assigned to any given skill and y= a random number between 0.75 and 0.95.

My question is how do I create that random multiplier y?
((a.atk/b.def * (x * 5)) * ((rand(20) + 75) / 100) + 1
probably
I thought there was probably a simple solution to that problem. Thanks! Also, apparently, I had to add .to_f to the division so the engine wouldn't just default to zero. The final formula looks something like this and seems to be working:

((a.atk / b.def.to_f) * (x * 5)) * ((rand(20) + 70) / 100.to_f) + 1
I thought there was probably a simple solution to that problem. Thanks! Also, apparently, I had to add .to_f to the division so the engine wouldn't just default to zero. The final formula looks something like this and seems to be working:

((a.atk / b.def.to_f) * (x * 5)) * ((rand(20) + 70) / 100.to_f) + 1

Personally, I would wrap the whole result and turn it into an integer at the end, just to make sure that no weird decimal is used in the HP.

Ruby:
(((a.atk / b.def.to_f) * (x * 5)) * ((rand(20) + 70) / 100.to_f) + 1).to_i
Ooh, good catch. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/vxace-damage-formula-help.147028/