Answer the question
In order to leave comments, you need to log in
Algorithm for converting a real number to single precision?
Please tell me the algorithm for converting a real number (floating point) from double precision (64 bits) to single precision (32 bits).
Answer the question
In order to leave comments, you need to log in
Something like this can be done:
Links:
[1] https://en.wikipedia.org/wiki/Single-precision_flo...
[2] https://en.wikipedia.org/wiki/Double-precision_flo...
[3] https:/ /en.wikipedia.org/wiki/IEEE_floating_point#...
But simply. Take a C++ compiler, send something like
volatile double a;
cin >> a;
volatile float b=a;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question