![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

On 11/13/2001 at 12:54 PM, Charles Melice wrote:
> There is only one hardware float stack (HFS) in the computer.
Je ne pal par Francais (hope that's close) but I do know the
Intel FPU fairly well.
> Any external application, or external API call can destroy
> the HFS content.
Hmm, I've never observed, in Win2000 or WinNT, one
application interferring with another applications FP stack.
It's the job of the OS to take care of those things. I'm
not doing any API calls in my code, but thanks for your
comments Charles.
Perhaps I've overstated the robustness of SwiftForth. I've
run some more tests by opening two SwiftForth apps and two
CMD apps. In the SwiftForth apps I used the following test
code:
-------------------------------------------------------------
[DEFINED] __fptest__ [IF] __fptest__ [THEN] MARKER __fptest__
1.000000001E0 fconstant factor
: fptest ( -- )
factor #1.0E 1000000000 0 do fover f* loop fswap fdrop ;
: doit
cr ." Performing " 1000000000 ,. ." loops ..." cr
fptest f. ;
cr .( Type 'doit' to run the test.) cr
-------------------------------------------------------------
In the CMD windows I used the following C code:
-------------------------------------------------------------
#include <stdio.h>
int main( void )
{
double ans = 1.0,
factor = 1.000000001;
int i;
for ( i = 0; i < 1000000000; i++ )
ans *= factor;
printf( "Result = %0.10f\n", ans );
return 0;
}
-------------------------------------------------------------
I compiled the C code with Watcom for one window and with
GCC for the other - each with all appropriate optimizations.
I also had an Excel window open.
My test was to start up my test code in four of the windows,
then to a 'solve' in Excel. After Excel did its thing, I
inspected my four apps running my simple test code.
The usual result was for all four calculations, of 'e' the
hard way, to produce identical results (I had 'precision'
set to 11).
However, running this scenario over and over, I received
some failure. The failures were always in one or both of
the SwiftForth windows and never in the CMD windows running
my code in C.
This seems like intolerable results for a commercial
package. I regularly run financial simulations that take
hours or days to complete. I don't think I can depend on
SwiftForth to produce reliable results unless I don't touch
my computer during the test.
Rick, any comment?
Regards,
Bill
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Tue Nov 13 2001 - 23:59:20 PST
This archive was generated by hypermail 2.2.0 : Sat Nov 22 2008 - 03:04:19 PST