Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-23-2004, 11:13 PM   #1
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
floating point multiplication


Recently I've been tryin to multiply two 64 bit variables in Assembly language using the FPU.

Now I go like

fld var1
fld var2
fstp result

call display ;a function for displaying the result variable

all I get is either equal to var1 or 0

I does not multiply
say var1 = 4 var2 = 2
I should get 8, but I get 4

I use MASM 6.11 (I will try NASM out, but its part of a project which has to be done on Windoze)
Floating point addition and subtraction works fine


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating Point in kernel 2.4.28 lucs Slackware 1 10-19-2005 09:33 AM
Floating point exception hemk76 Linux - Software 1 05-07-2005 12:49 AM
managing floating point vince_2x Linux - General 2 09-21-2004 10:05 PM
Depmod -> floating point exception Wynd Linux - General 0 06-26-2004 09:21 PM
[Kingpin] Floating Point Exception SiQDiZ Linux - Games 1 06-14-2004 03:16 AM

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration