I am reading fairly old book Object Orientated Programming in C++. What I have noticed is that they use frequently float type, and when I read other (newer books such as Programming Principles and Practise using C++ 2nd Edition)and here on forums, articles. I get impression (maybe wrongly)that currently double is proffered type for floating point numbers.
double is the default for literal values. The problem with float is that it's precision is easily exceeded. float can do 6 or 7significant figures (sf), while double can do 15 or 16sf, longdouble 18 or 19sf, all of those depend of the implementation - the system you are on.
One might use float if a library requires it - typically a graphics library, or if you have billions of them and doing float is worthwhile.
floats are smaller in terms of bytes, so if you had to send billions of them over a network or store them in a file, and IF you only need a small number of significant digits, you would use float because it would reduce the bandwidth or file size.
I don't know if it's still true, but once upon a time, the runtime required to do math with a double was no different on X86 systems than with a float, and maybe even faster. The reason was that the hardware always operated on doubles, so using a float might actually slow your program down because it had to convert to/from double.
Less precision (not important if you aren't working with high precision numbers)
This is how easy it is to loose precision: Take a number like 9.999 and square it. float has already lost precision, it can only do 7sf at best (sometimes only 6), that calculation requires 8sf (99.980001). The problem gets much worse with higher powers , eg 9.993
There are whole range of problems with float, trigonometry for example.
So be careful what you mean by "high precision numbers" :+)
Float might also be slightly slower on a 64 bit system because the compiler might pack 2 of them into a 64 bit machine word, it takes time to unpack them.
The performance should be nearly the same for all types on intel and similar systems. It may vary a bit on exotic hardware and I don't know what RISC machines do.
I think for all standard c++ types, the FPU promotes the value to a 10 byte floating point, which it uses to do the computation, and converts back. The only real difference is the time it costs to fetch the data from the cache to the CPU, which is wide enough on modern machines that I think it will be identical for all types (the smaller types just have unused wires on the bus, as I understand it you can't optimize it to send 2 floats at once over the wires, its serial, ?? I could be wrong...) so in all cases its doing more or less the same amount of work.
Some compilers support using the 10 byte directly, which is nice but it can give more numerical issues if used carelessly. I don't know if the language has a standard 10b type now or not (??).