Questions tagged [floating-point]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
48 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
4answers
373 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
2answers
173 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 ...
17
votes
9answers
4k 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 ...
0
votes
0answers
10 views

Neural Network on Open MV cam

I am using an OpenMV M7 module to perform lane detection for an RC car and drive its steering. I also wanted to teach the device how to stay within the lanes using a neural network (I am new to NN and ...
1
vote
1answer
208 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 ...
0
votes
1answer
82 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: ...
36
votes
6answers
6k 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 ...
0
votes
1answer
431 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"...
7
votes
3answers
3k 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 ...
0
votes
1answer
41 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 ...
1
vote
1answer
53 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 ...
0
votes
0answers
72 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_{...
0
votes
2answers
108 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 ...
2
votes
1answer
427 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 ...
2
votes
1answer
158 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 ...
1
vote
3answers
128 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: ...
0
votes
1answer
1k 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 ...
1
vote
1answer
97 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 ...
1
vote
3answers
563 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 ...
1
vote
2answers
220 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 ...
0
votes
2answers
94 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 ...
2
votes
0answers
86 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 ...
1
vote
1answer
592 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....
1
vote
1answer
283 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 ...
0
votes
1answer
481 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. ...
2
votes
2answers
1k 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: ...
0
votes
2answers
4k 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....
3
votes
0answers
373 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 ...
0
votes
1answer
335 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
3
votes
3answers
2k 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, ...
6
votes
1answer
3k 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 ...
2
votes
3answers
964 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 ...
3
votes
2answers
762 views

Why comparison of biased representation are faster than two's complement?

Biased representation (or excess-N, offset binary) are used for floating number representation in computers. This wiki page says This allows high speed comparisons Could any one explain why ...
3
votes
2answers
17k views

Normalized and denormalized floating point numbers

Regarding the normalized and denormalized representations of binary floating-point numbers (as described in the book by Patterson), I want to know how a denormalized number is really shown. See the ...
1
vote
2answers
428 views

avr-gcc float macro error

When I try to compile some code with macro definition at the following definition # define _SPEED_FACTOR0 0.9 //or any float value I get the error floating ...
7
votes
1answer
1k views

TMS320 Floating Point (Texas Instruments DSP from '98)

Background Is there anybody here who is an EE with programming experience who has worked with the Texas Instruments TMS320 C3X-series DSP? I am currently doing some work with the C3X for a project. ...
0
votes
1answer
92 views

How to store modify and resend 4 bytes of data from an assembly coded dspic to that in a c compiler based pic18f

I'm using Xc8 compiler and pic18f.Im communicating with a dspic30f ;coded in assembly and receiving a 4 byte variable via i2c. Task: I have to receive the 4 byte packet store,modify it and send back ...
2
votes
3answers
9k views

Why float data type is not accurate on a STM32?

I'm using STM32F103C8T6 and my compiler is KEIL 5. I have written a simple program to check something but I found out an interesting point. When I download the program to the MCU, ...
1
vote
0answers
1k views

Include libraries in GHDL

I'm using GHDL to simulate some designs that I'm doing. Now, I included the float_pkg package to work with floats in Sigasi but when I'm simulating in GHDL it ...
0
votes
1answer
842 views

Converting int to float and vice-versa in HDL

I am trying to write an HDL code for converting floating point numbers in IEEE-754 format to integers and vice-versa. For eg. ...
1
vote
1answer
154 views

Current specifications for parallel circuit from two cross connected power supplies

I have two 24 volt DC power supplies (that each look like this - according to documentation). ...
0
votes
1answer
135 views

can't read&store in global variable in function OR can, but get error reading ds18b20 sensor

I'm using Atmega8 with CVAVR 2.05.0 and trying to slightly modify the way ds18b20 library works. I want to store temperatures from sensors in global array and start conversion for all sensors at one ...
2
votes
2answers
1k views

FPGA Floating-point to Unsigned 32bits

Regarding something I read in a Xilinx manual saying this: Because floating-point operations use considerable resources relative to integer/fixed point operations, the Vivado HLS tool utilizes ...
3
votes
1answer
7k views

std logic conversion into float in vhdl

I am new in this field. I have a problem with conversion of std logic input into real values. I have been using to_float function but it always showed error. When I ...
0
votes
1answer
3k views

2's complement of negative fractional number

I have tried to search it out on google before posting it here but didn't find explained way.My question is as follows: What is 2's complement representation of -5/8 ? It would help even if way is ...
0
votes
1answer
890 views

Best way to pass floating-point numbers to DDR - Zedboard

I have a Zedboard and I made a PL block in Vivado HLS that is going to return milions of floats to the DDR via an AXI DMA block, and those results are then going to be read by the PS from the memory. ...
1
vote
1answer
865 views

Floating Point problem using PIC18F4550

I'm making an obstacle avoiding robot and using the mentioned PIC controller. I'm currently not at the obstacle avoiding part so what i'm doing is writing code to control the movement, e.g. making it ...
0
votes
4answers
2k views

Convert IEEE Double to Integer - Verilog

I want to convert the IEEE Double value computed in my code to Integer. E.g. I have computed: X = 64'hxxxxxxxxxxxxxxxx; Now i want to use it as index of an array as: some_array[X]; How can I do it? ...
2
votes
1answer
460 views

How do physical connection interfaces handle floating voltages

I am sorry if this is a bit of a novice question but I am new to electronics and have come to a problem that I can't quite see an obvious answer for. A while ago I had a bit of a scary encounter when ...