Questions tagged [fixed-point]

Questions about fixed-point arithmetic, done using a set number of decimal places. For the combinators used to encode recursion, use [fixpoint-combinators] instead. For the numerical method, use [fixed-point-iteration] instead. For the fixedpoint engine of Z3, use [z3-fixedpoint] instead.

Fixed point arithmetic uses a fixed radix position to do calculations, instead of a variable amount (floating point). Instead of representing numbers using the IEEE mantissa-and-exponent format, numbers are represented as integers which are scaled by a fixed amount. It can be faster and is, within its regime, more precise than floating-point.

Most questions deal with finding a suitable fixed-point library for [insert language here], as most languages lack fixed-point arithmetic in their standard libraries (although some have one natively). Also, different types of fixed point number exist based on the number of decimal points included (and thus accuracy) - see the Q format.

511 questions
-1
votes
1 answer

Fixed point representation vs. floating point representation on [0,1]

What are the differences/similarities between the fixed point (bit-level) representation of a value in [0,1] compared to its floating point (bit-level) value?
Mike
  • 39
  • 5
-1
votes
1 answer

Single precision in Fixed Point Arithmetic

I need up to 6 decimal places precision for a Taylor series calculation using fixed point arithmetic. I have tried different fixed point format for achieving 6 decimal places precision. For example, Using s16.15 (Left shift by 15) format I have got…
Shaown
  • 89
  • 2
  • 12
-1
votes
2 answers

Fixed Point Library OpenCL FPGA

I am trying to speed up the execution of my algorithm on FPGA. I'm trying to look for fixed math libraries with 32:32 (64) length in C code which would be easy translated to OpenCL. Is there anyone that knows a good library? I am trying to avoid…
-1
votes
1 answer

12bit ADC as input for CORDIC

I am new in DSP and this is problem for me. I need convert 12bit output from ADC to 2QN number format. It is input for CORDIC IP in Vivado. Output from CORDIC are two signals in 1QN format. Sin and Cos. Quadrature signal (I and Q) I need from CORDIC…
thomas810
  • 9
  • 3
-1
votes
1 answer

My Fixed point arithmetic implementation, performance

I'm implementing a fixed point arithmetic, in C, which extends the format of the usual C types. for example... you know that the greatest size allowed by C integer types is 8 bytes. My extension works in this way typedef struct fixed_point { …
user8469759
  • 2,522
  • 6
  • 26
  • 50
-1
votes
3 answers

Adding Library to VHDL Project

I am trying to use fixed point numbers in my VHDL project, but I keep having trouble implementing the library (found here http://www.eda-stds.org/fphdl/fixed_pkg_c.vhdl). The error I receive when trying to simulate is this is not…
srohrer32
  • 67
  • 2
  • 9
-1
votes
1 answer

How to write 0.5 in assembly language code?

How can I convert the floating point "0.5" into a fixed point digit suitable for an assembly code? Thank you for your answer, Edit: I am trying to multiply the contents of AX by half, so I wrote IMUL AX,AX,0.5 The assembler refused this and told me…
Hani
  • 41
  • 4
-1
votes
1 answer

implementing fixed-point multiplier in verilog

I need to design a system that calculates correlation in verilog and I can only use fixed-point calculations with limited number of bits. So I need to implement a fixed-point multiplier which has less number of bits than the sum of the inputs (the…
soroosh.strife
  • 1,181
  • 4
  • 19
  • 45
-2
votes
1 answer

fixed point binary operation with matlab

I have these decimal values: x1=-43.00488 x4=11.5048 y1=-11.5048 y4=-43.004 I converted them to their equal binary values, in the format Q7.10 So, these are the binary values: % All of the binary values are signed and in Q7.10…
-2
votes
1 answer

Converting SIGNED fractions to UNSIGNED fixed point for addition and multiplication

How can we convert floating point numbers to their "fixed-point representations", and use their "fixed-point representations" in fixed-point operations such as addition and multiplication? The result in the fixed-point operation must yield to the…
chaine09
  • 77
  • 1
  • 1
  • 6
-2
votes
1 answer

How can we code in fixed-point representation for signed floating point input?

The microcontroller I have to implement my digital filter does not support floating point operations. Given an analog input signal (which can take on values from -1.65 V to 1.65 V) sampled at a given rate of 100 Hz, I can only perform fixed-point…
chaine09
  • 77
  • 1
  • 1
  • 6
-3
votes
2 answers

fixed point singular value decomposition in c/c++

I am looking for some c/c++ libraries to do fixed point singular value decomposition or eigenvalue decomposition. Do you know any libraries or any pointers to existing codes? Thanks
-3
votes
1 answer

Fixed Point number 4 bytes or 8 bytes with different scale factors - library to convert numbers?

I have to read fixed point numbers either 4 bytes or 8 bytes and the location of the decimal moves for each item (a known location)(scale number) Is there a library where this is automated? C/C++ is the language of choice For Example: This is…
GregM
  • 3,624
  • 3
  • 35
  • 51
-4
votes
1 answer

Fixed point to floating point data

I recive 24 bits fixed-point data from a CODEC (ADC) by TDM transmission. Then data is stored into a int buffer (32 bits). I want to convert this to float data. I tried: g_analog_input_chL_mean = (((float)(*rx_block_pointer[buffer_cntr] << 8)) *…
-4
votes
1 answer

C Language Fixed Point Math

I am familiar with the Arduino programming tools but have relatively small experience with embedded programming. When using decimal numbers in the Arduino I never had any issues, so when I recently started playing around with TI's Launchpad…
1 2 3
34
35