double to float c++

C++
    double v1 = 20120313.0;
    float v2 = (float) v1;
Source

Also in C++: