Print out float/double variables for verification : I have the following scenario. A algorithm with A*B+C*D in floating-point variables calculation implemented in C++. However, in order to implement in hardware, we need to print out the A, B, C, D and golden output values from C++ simulation as a simulation pattern for hardware check. However, in C++, it comes to set precision digit. If that's the case, for the pattern feeding to hardware verification, can we expect it will get the same result against the golden output data printed out from C++ simulation ?
I'm thinking if printing out the floating values has essential uncertainty error and the result comparison should use relative way.
