Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!jrv@Mitre-Bedford
From: jrv@Mitre-Bedford
Newsgroups: net.lang.c
Subject: DeSmet C
Message-ID: <7202@brl-tgr.ARPA>
Date: Thu, 10-Jan-85 22:31:47 EST
Article-I.D.: brl-tgr.7202
Posted: Thu Jan 10 22:31:47 1985
Date-Received: Sat, 12-Jan-85 07:41:44 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 36

I have discovered three bugs in DeSmet C version 2.3...
1.    A double constant may not have more than 19 significant
digits.  I'm not asking for arbitrary-precision arithmetic,
but  pi=3.141592653589793238462  shouldn't generate a syntax
error.

2.    For this code:

              double alpha()
              {    if(1) return 1.; else return 2.;}
              int beta(){}

the compiler reports "error:must return float" at the beginning
of the *last* line.  There are really three problems here.

a.     The compiler isn't smart enough to see that a double
       really is being returned for every execution path.
b.     The compiler refers to "float" rather than "double".
c.     The error message is in the wrong place.

The easy fix would be to have the compiler generate the
non-fatal message "warning:above function may not alway return
double"

3.    The DeSmet C library program can't calculate the sine of
any angle between 0 and .2118609476670 when an 80287 is used.
(The program prints "*Square root of a negative number*" and
dies. On an IBM AT, a cntrl-alt-del reset is needed to
recover.) Numbers outside that range work OK, tan() and cos()
work OK, and sin() works OK if the 80287 isn't used.  The same
programs work okay on Z-100s with 8087s. 
 
I've heard that a new version of DeSmet C has been released
which fixes a bug in the 80287 math routines. This may be the
bug they found.
                                - Jim Van Zandt