Is is possible to memcpy from a double array to a float array safely?
Depends on what you want. The values certainly won't be preserved. If you need that, use std::copy
.
#include <algorithm>
int main()
{
double a[] = {1.618, 3.1416, 2.7, 0.707, 1.0};
float b[5];
std::copy(a, a + 5, b);
}