'Check if number should be C++ float or C++ double using python
I am working on a simple C++ code generator created by excel parsing and I will need to distinguish between number type. I can deduce integer size (e.g. uint_32_t) using sys.getsizeof()
But How can I check if a non-decimal number should be float or a double in order to avoid narrowing?
for each number I know its range, its minimal and maximal value, if it would be of any help.
Thank you very much
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
