Skip to main content

# Questions tagged [floating-point]

The tag has no usage guidance, but it has a tag wiki.

98 questions
Filter by
Sorted by
Tagged with
1 vote
2 answers
127 views

### Dealing with denorms in the ARM Cortex M4 FPU

Okay, a year ago I asked this other question and got zero responses. Now, I will try to get a little more specific: The ARM chip that is in this product is the STM32F407 and I got the docs on that ...
0 votes
1 answer
41 views

### Why is this extra MUX here when shifting mantissa as part of a FP add?

My textbook (Harris and Harris, Digital Design and Computer Architecture) asks us to design a simplified (in that only positive numbers be considered, with NaN and infinities ignored) FP adder block. ...
• 1,161
0 votes
1 answer
396 views

### How to convert floating point numbers to fixed point for use in a Verilog table? [closed]

I have a LUT in I need to assign values. They are in the range of 0 to 3.3. This is the code: ...
-1 votes
2 answers
203 views

...
0 votes
0 answers
36 views

### Why does the Fused Multiply Add CSA use the inverted MSB of the addend when one multiply operand is negative?

I found one valuable paper about the "Fused Multiply Add": Instead of using 161-bit CSA, Only the 106 least-significant bits of the aligned A are needed as input to the 3:2 CSA, because the ...
• 183
0 votes
0 answers
25 views

### Floating point on Cam Tables?

What's the general way to handle floating point error on a cam table? Constraints are using: PLC Open function blocks Scale on application units for servo setup is an ...
-1 votes
1 answer
92 views

### Is floating point IEEE754 binary digit represented using special unit/circuit for arithmetic operation?

We know that two un/signed integers arithmetic operation using special circuit called full-adder to execute arithmetic operation in Arithmetic Logic Unit (ALU). The full-adder I mean is classical ...
1 vote
0 answers
69 views

### Are there now 64-bit processors that deal with denorms routinely with no exception or interrupt? [closed]

Title says it all. Are there processors with FPUs that deal with denorms arithmetically correctly (don't assume they're zero nor flush them to zero) and don't cause an exception? I would be interested ...
3 votes
1 answer
103 views

### Floating point arithmetic - unexpected results in certain test cases

I was hoping I could get some help with a floating point adder I'm designing in verilog. The test case I am having trouble with is adding the following 2 numbers: ...
-1 votes
1 answer
125 views

### What is the best adder to use inside a FPU unit?

I have this college assignment where I was asked to implement a FPU (floating point unit) that adds numbers using only Verilog, but that's not a problem here. The problem is that I must use a 32-bit ...
• 143
0 votes
2 answers
421 views

### Synthesize of "REAL VARIABLES" in Vivado 2020.1

I am using the following libraries: library ieee; use ieee.std_logic_1164.all; library ieee_proposed; use ieee_proposed.fixed_pkg.all; use ieee_proposed.fixed_float_types.all; I cannot synthesize real ...
1 vote
0 answers
244 views

### VHDL conversion between signed and float

I've a small IP core module which performs some operations on a float input. The module has been developed using vivado hls. As shown below, the float input of the module is taken as a ...
• 11
1 vote
1 answer
2k views

### Print float value over UART with STM32

I am working with an STM32, more specifically an STM32F401RE. I am trying to send some float value over UART by using the printf command. When I execute the code, ...
• 187
2 votes
1 answer
1k views

### STM32F4 PLC Integer Calculation vs Float Calculation

I am using a PLC that uses a STM32F4 as its processor. The PLC software has Integer and Float calculation commands. When I work with floating point numbers I usually try to use integer calculations ...
• 871
0 votes
1 answer
278 views

### How is a Floating Point PRNG designed

Forgive the breadth of my question, but from understanding of basic digital circuits, an integer PRNG outputs a random number by using the XOR of certain bits of a LSFR. using an XOR tap into bits to ...
• 171
-1 votes
1 answer
144 views

### How is the exponent expressed in single precision floating-point number representation using IEEE-754 format

I am learning computer architecture and organization. I am stuck in the following question. Can someone please help me? How is the exponent expressed in single precision floating-point number ...
• 385
0 votes
2 answers
645 views

### The minimum (negative) value of the exponent in decimal

I am learning computer architecture and organization. I am stuck in the following question. Can someone please help me? For a floating-point representation with 35 bits in the mantissa and 15 bits in ...
• 385
4 votes
1 answer
2k views

### ARM Cortex-M Floating Point Multiply-Accumulate Cycle Time

According to the ARM Cortex M4 technical manual, a floating point multiply accumulate instruction (VMLA.F32) takes 3 cycles. However the separate multiply (VMUL.F32) and add (VADD.F32) instructions ...
• 5,097
0 votes
1 answer
292 views

### Floating point representation- Double precision

The difference between 201 and next larger double precision number is 2^P. If IEEE double precision format is used then the value of P is _________? -- I know how number is stored using double ...
1 vote
4 answers
1k views

### How to code in assembly language for floating point exponentiation?

I have problem calculating raise a to the power of b (a^b) where b is a floating point number. In my case, b=-1.45. So the ...
3 votes
2 answers
365 views

### How we got exponent as $2^{127-64}$?

Information: Consider a 16-bit register of the following format is used to store a floating point number. Mantissa (M) is denoted as normalized signed magnitude fraction, Exponent (E) is expressed in ...
• 135
22 votes
9 answers
10k views

### Does the "Avoid using floating-point" rule of thumb apply to a microcontroller with a floating point unit (FPU)?

As a rule of thumb, I try to avoid using floating-point in my embedded system codebase. Floating-point variables are: Computation-intensive Not atomic (can cause problems in an RTOS application or ...
• 713
2 votes
2 answers
3k views

### Sending a double type value over CAN Bus

I need help to send a double value using a CAN Bus. I am working on a eletronic traction control and i need to send, by a CAN bus, the calculated values of speed of wheels. The problem start when the ...
• 23
0 votes
1 answer
157 views

### Problems with mbed LPC1768 double precision

I have a motion profile generator which calculates a position 1000/sec. During the decelerating portion of the move, the following calculation is used: ...
• 743
39 votes
6 answers
8k views

### Why does Intel's Haswell chip allow floating point multiplication to be twice as fast as addition?

I was reading this very interesting question on Stack Overflow: Is integer multiplication really done at the same speed as addition on a modern CPU? One of the comments said: "It's worth nothing ...
• 547
1 vote
1 answer
2k views

### How to convert single precision floating point numbers in a file into their 32 bit representation in VHDL

Test data consists of single precision floating point numbers in a text file. These must be read into testbench and applied to a 32 bit std_logic_vector input port. The numbers can be read in as "real"...
• 2,103
12 votes
3 answers
6k views

### VHDL: Why is it hard to design a floating point unit in hardware? [closed]

Floating point calculation basically involves representing units in a scientific notation and then deciding how many bits to devote to the manitssa and exponent. Therefore, all calculations involving ...
• 12k
0 votes
1 answer
73 views

### Does choosing rounding mode have to be costly?

In many floating-point implementations, changing the rounding mode is costly in that it requires a pipeline flush. Is this because there is something particularly complicated about rounding modes, or ...
• 563
1 vote
1 answer
81 views

### Is qNaN easier than trapping on overflow?

According to James Demmel's article, "Faster Numerical Algorithms via Exception Handling", IEEE Trans. on Computers 43 (1994), 983-992, the way a floating-point processor handles overflow can be ...
• 563
1 vote
0 answers
76 views

• 618
0 votes
1 answer
490 views

### IEEE 754 standard and C language float data type [closed]

Is IEEE single precision floating point numbers equal to the float data type numbers in C language. Is there a way to check this
• 1
4 votes
3 answers
4k views

### STM32 non floating point unit chips

I would like to know how STM32F2 chips and below that doesn't handle floating point unit, perform float operation. I read here, it mentions that the floating point is handled by library functions, ...
• 919
6 votes
1 answer
5k views

### STM32F4 : Floating point instructions too slow

I'm working on an audio application on the Nucleo F411RE and I've noticed that my processing was too slow, making the application skip some samples. Looking at my disassembly I figured given the ...
• 370
2 votes
3 answers
2k views

### wav file audio samples are signed, how does DAC deal with signed numbers when it does not have negative supply?

I was looking into wav audio file specification, they may hold the pulse coded modulation data as signed our unsigned integers as well as floating point values. How does a DAC deal with signed ...
• 12k