Questions tagged [fpu]

A floating-point unit is a part of a computer system specially designed to carry out operations on floating point numbers.

From Wikipedia:

A floating-point unit (FPU, colloquially a math coprocessor) is a part of a computer system specially designed to carry out operations on floating point numbers. Typical operations are addition, subtraction, multiplication, division, and square root. Some systems (particularly older, microcode-based architectures) can also perform various transcendental functions such as exponential or trigonometric calculations, though in most modern processors these are done with software library routines.

234 questions
0
votes
1 answer

how to reverse divide 1/f on fpu?

Sorry for such simple question, (learning assembly from few days) but i was browsing through books and couldnt find answer what is a proper quick way to count 1/f where f is some float on x86 fpu is it fld dword [ebp+8] fld1 fdivrp …
grunge fightr
  • 1,288
  • 1
  • 16
  • 34
0
votes
2 answers

some intersectRaySphere c procedure optymization through rewriting it to x86 asm (How?)

Hullo, I've got not to much knowledge in assembly, and i am thinking how to optimize it by rewriting this in x86 (32-bit fpu or sse2) assembly, thing should be optimized - rewritten in correct assembly, then I will test if I've got some speed up…
grunge fightr
  • 1,288
  • 1
  • 16
  • 34
0
votes
1 answer

Debugger stops inside mathematical functions that have floating point arguments

I'm using Keil uVision with gcc compiler (Sourcery Codebenchlite for ARM EABI ) to program the STM32F4 cortex M4 chip. The compiler control strings I have set are: -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -std=gnu99…
soonhooi
  • 1
  • 2
-1
votes
1 answer

Why is a FPU reset required to prevent a NaN result propagating to next calculation result?

I have a floating point calculation that results in -1.#IND0000 causing a -1.#IND0000 in the subsequent floating point calculation. What would cause this? The compiler is Visual Studio C++ 2013 18.00 x86. If I use GCC Version 7.4.0 the problem does…
-1
votes
3 answers

Integer division vs double division - optimization question

Which operation should be faster on a x86 CPU on Linux and what are the average differences (in %): unsigned int x, y, z; x = y / z; or: double x, y, z; x = y / z; The operation on double will be executed by the FPU and the CPU may continue to…
Dima
  • 1,121
  • 3
  • 18
  • 30
-1
votes
1 answer

fidiv: improper operand type error when dividing by register

Take the following piece of code: void calculate(int int_number) { __asm { fld1 mov eax, 5 fidiv eax ; A } } If I try to to compile it, the A line fails with error C2415: improper operand type. The same problem…
Ivan Akulov
  • 3,953
  • 4
  • 33
  • 57
-1
votes
1 answer

Why am I not getting 10 for the square root of 100 from the FPU in NASM?

I'm trying to learn a bit about floating point operations in NASM Assembly for 32-bit programs in Ubuntu. I'm interested in getting a number's square root. This is what I tried: SECTION .data num: dd 100 var: dd 0 SECTION .text global…
Voldemort
  • 17,051
  • 43
  • 135
  • 257
-2
votes
1 answer

Why they still have separate floating point unit , if there is Neon for fast processing of floating points in ARM cortex processors.

Neon (advanced SIMD) is very fast for add,subtract,multiply and floating point operations like single precision and double precision. Why ARM company still have another separate unit for floating point calculation as you can see in picture. i am…
Jawwad Rafiq
  • 187
  • 1
  • 15
-2
votes
1 answer

Divide a double precision by a single precision (both IEEE 754) in MIPS assembly without FPU

I have to make a program in MIPS assembly that divide a Double precision floating number by a Single precision number (with standard IEEE 754) without using the Floating Pointer Unit. The only thing I can't understand is how handle the mantissa of…
nytmrae55
  • 1
  • 1
1 2 3
15
16