One way to do so can be to generate 2 numbers (using rand()).
Divide one of them by a multiple of 10. Add the result to the original number.
First number: 25
Second Number: 35.
Divide second by 100 (102) and add it to the original.
Depending how random you want your random number to be, you could try getting a random integer of the same size and reinterpret_cast it to a double/float. Is there a specific range you want to limit the random number to?