fixed-point
Algorithm for fixed-point multiplication
I\'m trying to rescale a timestamp (fractional part of seconds only) from nanoseconds (units of 10^-9 seconds) to the lower half of an NTP timestamp (units of 2^-32 seconds). Effectively this means mu[详细]
2023-02-14 13:11 分类:问答Fixed point processing: what is the difference between uint16_t and uint_fast16_t?
I have a 16 bit fixe开发者_如何学运维d point processor and I want to do fixed point processing with it.I\'m looking for the correct datatype to use for unsigned 16 bit ints..[详细]
2023-02-09 15:57 分类:问答Fixed point multiply/divide for 15.16 numbers
I am looking for an algorithm to multiply and divide fixed point 15.16 numbers. I already have addition and subtraction. Those were easy - simple 32-bit add and subtract. With multiply and divide, I[详细]
2023-02-06 17:51 分类:问答Converting byte[] of binary fixed point to floating point value
I\'m reading some data over a socket. The integral data types are no trouble, the System.BitConverter methods are correctly handling the conversion. (So there are no Endian issues to worry about, I th[详细]
2023-02-02 20:20 分类:问答Doing exact real number arithmetic with PHP
Wha开发者_如何学编程t is fastest and most easy way of making basic arithmetic operations on strings representing real numbers in PHP? I have a string representing MySQL\'s DECIMAL value on which I wan[详细]
2023-01-31 11:06 分类:问答Convert a double to fixed decimal point in C++
I have a double variable in C++ and want to print it out to the screen as a fixed decimal point number.[详细]
2023-01-18 16:37 分类:问答Python: create fixed point decimal from two 32-bit ints (one for int portion, one for decimal)
I have a 64-bit timestamp unpacked from a file with bin开发者_开发问答ary data, where the top 32 bits are the number of seconds and the bottom 32 bits are the fraction of the second.I\'m stuck with ho[详细]
2023-01-18 02:57 分类:问答float to fixed conversion with different scaling factors
Can anyone please let me know What will be the difference between these approcahes when I convert fixed to float and float to fixed.[详细]
2023-01-12 03:08 分类:问答Fixed-point multiplication in a known range
I\'m trying to multiply A*B in 16-bit fixed point, while keeping as much accuracy as possible. A is 16-bit in unsigned integer range, B is divided by 1000 and always between 0.001 and 9.999. It\'s bee[详细]
2023-01-08 07:36 分类:问答Floating Point Algorithms in C
I am thinking recently on how floating point math works on computers and is hard for me understand all the tecnicals details behind the formulas. I would need to understand the basics of addition, sub[详细]
2023-01-06 05:20 分类:问答