home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!rayssd!galaxia!animato!rlcarr
- From: rlcarr@animato.network23.com (Rich Carreiro)
- Newsgroups: comp.sys.amiga.programmer
- Subject: SAS/C 6.1 math=68881 BUG
- Distribution: world
- Message-ID: <rlcarr.0969@animato.network23.com>
- X-NewsSoftware: GRn 1.16f (10.17.92) by Mike Schwartz & Michael B. Smith
- Date: 19 Dec 92 00:52:35 EDT
- Organization: The Other Side of Life
- Lines: 42
-
-
- Has anyone else been bitten by this weird one? I have reported it via
- EMITS. Haven't heard anything yet.
-
- /***
- * Problems with using the math=68881 option.
- * Copyright 1992 by Richard L. Carreiro
- *
- * Command line: sc math=68881 verbose link test.c
- * Release: SAS/C 6.1
- * Configuration: A2000, A2630 (4 meg RAM onboard), SupraRAM (4 meg onboard),
- * AmigaDOS 2.04, A2091 SCSI controller
- *
- * Note that this program works fine with "math=ieee", "math=standard", and
- * "math=ffp".
- *
- ***/
-
- #include <stdlib.h>
- #include <stdio.h>
- #include <math.h>
- #include <m68881.h>
-
- main()
- {
- double y;
- double x;
-
- x = 1.0;
-
- y = sin(x * (3.14159265/100000.0) );
- printf("y=%f\n", y); /* this will print NaN0.000000 */
-
- y = sin(x * 3.14159265/100000.0); /* this will crash the program, getting */
- /* error 8000 0004 or 8000 0008 */
- printf("y=%f\n", y);
- }
-
- --
- Rich Carreiro Home: (401)841-8514
- rlcarr@animato.network23.com
- uunet.uu.net!animato!rlcarr
-