Skip to main content

Questions tagged [floating-point]

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

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 ...
robert bristow-johnson's user avatar
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. ...
EE18's user avatar
  • 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: ...
DaveFenner's user avatar
-1 votes
2 answers
203 views

Possible FPU error

...
user avatar
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 ...
An5Drama's user avatar
  • 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 ...
Jamie Marshall's user avatar
-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 ...
Muhammad Ikhwan Perwira's user avatar
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 ...
robert bristow-johnson's user avatar
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: ...
NoahWecoso's user avatar
-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 ...
abdo Salm's user avatar
  • 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 ...
ktynmr's user avatar
  • 1
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 ...
Tony's user avatar
  • 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, ...
Michael's user avatar
  • 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 ...
user_fs10's user avatar
  • 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 ...
Vahe's user avatar
  • 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 ...
Anshul Gupta's user avatar
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 ...
Anshul Gupta's user avatar
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 ...
Jon's user avatar
  • 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 ...
Sanjay Verma's user avatar
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 ...
Thanh Nhon's user avatar
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 ...
Ubi.B's user avatar
  • 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 ...
gbt's user avatar
  • 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 ...
BioByte's user avatar
  • 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: ...
19172281's user avatar
  • 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 ...
Nike Dattani's user avatar
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"...
gyuunyuu's user avatar
  • 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 ...
quantum231's user avatar
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 ...
rwallace's user avatar
  • 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 ...
rwallace's user avatar
  • 563
1 vote
0 answers
76 views

How should be interpreted this note about the floating point?

In an old class notes I have found something that puzzles me since I don't grasp how it works. The notes says **Floating point numbers representation ** In general if \$N=\pm(a_{n-1}...a_{0}...a_{...
riccs_0x's user avatar
  • 530
0 votes
2 answers
181 views

Are floating point numbers denormalised before the processor performs arithmetic operations on them? [closed]

Does the processor denormalise the numbers in IEEE 754 notation and normalise the result after storing or are the arithmetic operations performed on the numbers as they are? I'm asking because in case ...
KHUSHBOO KOHLI's user avatar
2 votes
1 answer
2k views

Transistor count of floating point multiplier

I'm trying to figure out just how expensive floating point fundamentally is, at the hardware level. For example, how many more transistors does a 32-bit multiplier cost in floating point compared to ...
rwallace's user avatar
  • 563
2 votes
1 answer
389 views

How does the ARM Compiler (Version 5) handle double-precision floats in devices whose floating-point unit hardware only supports single precision?

After reading ARM Compiler version 5's manual, it says that for devices without a floating point unit, floats are dealt with through software implementations, which is likely going to be slower than ...
a2xia's user avatar
  • 135
1 vote
3 answers
187 views

Convert 4.11 (integer.fraction) to float32

Im getting a value from a register (SRCx_RATIO) from a SHARC DSP, the datasheet says: I'm using the following code to convert the value: ...
user2982010's user avatar
0 votes
2 answers
3k views

The decimal value 0.5 in IEEE single precision floating point representation?

If I hadn't studied floating point from here my answer would be fraction bits of 000…000 and exponent value of −1 as shown below : But in the link I attached above, they mention Denormalized value in ...
momo's user avatar
  • 103
1 vote
1 answer
260 views

Combinational Linear Shifting VHDL

I am designing a 32 bit floating point pipelined and synthesizable adder/multiplier as part of group for a class in school. I was put in charge of the re-normalization. Part of this is left or right ...
jackana3's user avatar
1 vote
3 answers
1k views

The NUCLEO F411RE Works with float point?

I need a MCU to works with Wifi and Floating point for PID application. In the later I acquire a Wifi expansion board, but I wants know if the STM32 NUCLEO FR11RE works with a Floating Point. I don't ...
Augusto's user avatar
  • 191
1 vote
2 answers
299 views

How would you calculate the Mandelbrot set in hardware? [closed]

I'd like to build a small novelty circuit that calculates the Mandelbrot set and displays it on an array of LEDs. The minimum floating point math would not necessarily require complex numbers (just ...
uhoh's user avatar
  • 3,439
0 votes
2 answers
128 views

Two single-precision versus one double-precision unit

Suppose you are designing a floating point unit, and it is desired that it be capable of both single precision and double precision operation, in the former case not by simply expanding the single ...
rwallace's user avatar
  • 563
4 votes
0 answers
104 views

Can anyone tell me what other computers used this floating-point format?

I have discovered that the DEC PDP-10 used a floating-point format that differed from IEEE-754 in an interesting way. IEEE-754 is like sign-magnitude representation. The only difference between a ...
robert bristow-johnson's user avatar
1 vote
1 answer
972 views

Denormalized Number

I have read that for IEEE-754 Single Precision For E = 0, N = (-1)^S × 0.F × 2^(-126). These numbers are in the so-called denormalized form. The exponent of 2^-126 evaluates to a very small number....
Akhil Nadh PC's user avatar
1 vote
1 answer
346 views

Problems with implementation of a band-stop filter on an MCU (dsPIC) using fixed-point arithmetic

I'm trying to implement a band-stop (notch) filter on a microcontroller dsPIC33EP64GS506 to filter out a 100 Hz component from ...
Marko Gulin's user avatar
  • 1,633
0 votes
1 answer
1k views

How can I save a floating point value to a Microcontroller data Flash

I'm trying to save some floating values to the Data flash of my Nuc220(ARM-M0 32 bit) Microcontroller using ISP procedure. ...
Arun Joe Cheriyan's user avatar
2 votes
2 answers
3k views

STM32 NaN value for floating point operations on global variables

I am trying to implement a simple Odometry computation loop. Which is being run in a while loop. Following is the code: ...
Asusrog's user avatar
  • 85
0 votes
2 answers
8k views

How to compute acceleration from accelerometer raw data

I'm working on a project based on NXP accelerometer MMA8653. This is a I2C, 3-axial accelerometer with 10-bit resolution. Actually I can read the accelerometer registers and I'm able to configure it....
Federico's user avatar
  • 145
5 votes
0 answers
550 views

Floating point addition. Are guard, round and sticky bit always necessaryl? analysis of a special case

I've a particular case of floating point addition. As you know for given floating point numbers \$x,y\$ one of the steps of the addition involves the fixed point sum: $$ s = 1.m_x + (-1)^{s_x \oplus ...
user8469759's user avatar
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
Hasi's user avatar
  • 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, ...
Tim's user avatar
  • 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 ...
Florent's user avatar
  • 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 ...
quantum231's user avatar