News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

High-accuracy floating point arithmetic (Win32)

Started by Gunther, January 06, 2013, 12:07:25 PM

Previous topic - Next topic

Gunther

In August last year, I've started a thread http://masm32.com/board/index.php?topic=487.0 inside the 16 bit DOS Programming, because the frame program was written with PowerBASIC 3.5, which is a native 16 bit compiler. My original plan was to develop the 64 bit version first; for several reasons, I've started the migration from 16 bit code to 32 bit code first.

At the moment, my test program works and brings the right results. I've tested it under Windows XP Mode (Windows XP, SP3 with Virtual Computer). It runs well in compatibility mode under Windows 7 (64 bit), too.

XMM result FPU result Long Accumulator result
========== ========== =======================

Array 1 0.00 136.00 137.00
Array 2 17.00 137.00 137.00
Array 3 120.00 136.00 137.00
Array 4 147.00 139.00 137.00
Array 5 137.00 137.00 137.00
Array 6 -10.00 134.00 137.00

The right result is 137.00 and nothing else!


But I can't test the software under a native 32 bit Windows (XP, Windows 7, whatever Windows). So, I need some help for testing it under such an environment.

To be honest: The software is in the present state far from ideal and under construction. Most of the code (approximately 70%) is simple 16 bit code, running in the Windows FLAT memory model. I've to change that step by step into native 32 bit instructions. This is not so easy, because the parameter passing to some internal helper procedures  (for example: deleting or inverting the long accumulator) is made via registers and not via stack. By changing one procedure, there are side effects at others and that gives sometimes trouble.

Anyway, I hope to finish the migration in that program parts til March this year. Furthermore, I've to write an extensive documentation with background information for the used techniques and algorithms.

Gunther
You have to know the facts before you can distort them.

dedndave

ran it under XP SP3
i got the exact same results as you   :t

Gunther

You have to know the facts before you can distort them.

FORTRANS

Hi,

   Ran it on my P-III and Windows 2000.  The XMM results
were lunched.  The Long Accumulator result was good.  I
am reporting this as most XMM programs don't even run
on a P-III/Win2k.

Weird,

Steve N.

Gunther

Steve,

Quote from: FORTRANS on January 07, 2013, 12:12:41 AM
Ran it on my P-III and Windows 2000.  The XMM results
were lunched.  The Long Accumulator result was good.  I
am reporting this as most XMM programs don't even run
on a P-III/Win2k.

Weird,

Steve N.

that's good news. Thank you.

Gunther
You have to know the facts before you can distort them.

Gunther

You have to know the facts before you can distort them.

dedndave

prescott w/htt
                 XMM result      FPU result      Long Accumulator result
                 ==========      ==========      =======================

Array 1          0.00            136.00          137.00
Array 2          17.00           137.00          137.00
Array 3          120.00          136.00          137.00
Array 4          147.00          139.00          137.00
Array 5          137.00          137.00          137.00
Array 6          -10.00          134.00          137.00

Gunther

Thank you for the fast reply, Dave. I assume it is Win XP with SP3.

Gunther
You have to know the facts before you can distort them.

dedndave

yup   :t

i don't think the OS makes a difference, though

Gunther

Dave,

Quote from: dedndave on January 07, 2013, 04:41:37 AM
yup   :t

i don't think the OS makes a difference, though

that's the question. Does Win98 support SSE, SSE2? Probably not.

Gunther
You have to know the facts before you can distort them.

dedndave

i don't think win98 "knows" about SSE
back then, they had the FPU and MMX and that was about it
but - i don't think it cares, either - it isn't going to generate exceptions like NT-based OS's   :biggrin:

i think Steve and Michael have win98 machines up and running - probably Sinsi, as well
i have one, but i'd have to knock 6 inches of dust off to run it - lol
mine has a pentium III MMX

i gave up trying to support anything older than win 2000
there are just too many features that the earlier OS's didn't have
and too few people still using them

you can figure that most users that have a CPU that supports SSE, also have win 2000 or newer

Gunther

Dave,

Quote from: dedndave on January 07, 2013, 06:41:36 AM
i gave up trying to support anything older than win 2000
there are just too many features that the earlier OS's didn't have
and too few people still using them

you can figure that most users that have a CPU that supports SSE, also have win 2000 or newer

that's probably right Dave.

Gunther
You have to know the facts before you can distort them.

dedndave

i looked it up
SSE came out in 1999
win 2000 came out in december of the same year

they may have planned to call it windows 1999, because it came out on time   :lol:

Gunther

Hi Dave,

Quote from: dedndave on January 07, 2013, 10:33:24 AM
i looked it up
SSE came out in 1999
win 2000 came out in december of the same year

they may have planned to call it windows 1999, because it came out on time   :lol:

thank you that you've figured out the thing. I think that the application should support Win XP and above; that's good enough.

Gunther
You have to know the facts before you can distort them.

Donkey

Quote from: dedndave on January 07, 2013, 06:41:36 AM
i gave up trying to support anything older than win 2000
there are just too many features that the earlier OS's didn't have
and too few people still using them

I don't even bother with anything before XP, and even that is mostly because I have to change the target OS otherwise and its easier to just make stuff XP compatible than to get all of the header messages telling me I've used unsupported API's. But more and more I'm getting "xxx (Not Available)" when I try to assemble a program with XP as the target OS so I may end up changing the default to Vista soon. Really have to thank Yuri for convincing me to include API filtering in the header files.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable