Is it possible to include UINT64 in a float? I understand that UINT64 does not contain decimals, so my float will be an integer. However, my delta time return function returns UINT64, which is not very useful for the function that I am currently working with. I assume that simple static_cast <float> (uint64value) will not work?
Large UINT64 values โโ(8 bytes) can be truncated if you pass them to a float, which is only 4 bytes.
Define - , 64- , (, - , , ), , , .
long double double:
long double
double
typedef long double real_type real_type x = static_cast<real_type>(long1); real_type y = static_cast<real_type>(long2); real_type z = x / y; float result = static_cast<float>(real_type);
, , 16 , , . .
, , IEEE 754, 23 float 52 double. , - , 1FFFFFFFFFFFFF 9007199254740991 .
, 32- double; , .
, , JavaScript . , , " ", .
Safe? ? , IEEE-754 float 23 - (+ 1) . 64- "" 24- , . ? , 64- , - , float, .
float
static_cast?
Max uint64 is 2^64 = 1.84467441 ร 10^19
this max 32- float
9.999999ร10^96.
... ?
http://en.wikipedia.org/wiki/Decimal32_floating-point_format
Source: https://habr.com/ru/post/1723057/More articles:Is there an ORM scheme for Cocoa or a structure that accomplishes a similar goal using a different technique? - cocoaBenefits of the Win32 API for .NET. - .netHow to determine which input bus is active when AUEffectBase :: Render is called? - c ++DataGridView / Enter Key? - datagridviewphp session.use_trans_sid - phpclojure ะฟัะพะฑะปะตะผะฐ ั rmi classpath - classpathWPF 3.5 Weakening functions for animation? - animationReaching the multi-page GWT website - javaDetecting drag and drop operations in an external application using .Net - c #less restrictive GPL-like license - licensingAll Articles