The days of committing to a 1,000 copies or more are gone. A bonus for ebook and CD-ROM buyers is that the text is searchable. Whether you do depends upon how the book is structured. However, once coded, there is no cost to you on a per book basis. CD-ROMs could be about the same or slightly higher depending on the cost for each.
Print is the most expensive.
Part of the cost is determined by the expense and part by the subject matter. Once you are sure which path you want to take, books on the Net are an increasingly popular item to purchase. I would be careful to offer only one time electronic rights and retain the copyright . If they ask for more, then ask for more in payment. I believe they are, if you are careful as to who you publish with.