LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 34
floating point multiplication


Hi,



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

Now I go like

finit
fld var1
fld var2
fmul
fwait
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
 
  


Reply


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 08:33 AM
Floating point exception hemk76 Linux - Software 1 05-06-2005 11:49 PM
managing floating point vince_2x Linux - General 2 09-21-2004 09:05 PM
Depmod -> floating point exception Wynd Linux - General 0 06-26-2004 08:21 PM
[Kingpin] Floating Point Exception SiQDiZ Linux - Games 1 06-14-2004 02:16 AM


All times are GMT -5. The time now is 11:50 PM.

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