Date: Wed, 17 Nov 1999 13:16:25 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Surahyo cc: djgpp AT delorie DOT com Subject: Re: math.h or math co-processor? In-Reply-To: <4.1.19991117155637.00a4b240@mail.student.unimelb.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 17 Nov 1999, Surahyo wrote: > My system is 386SX-40, no math co-processor, 4 MB SIMM RAM, > and 16 MB Flash Disk (the controller for vehicle navigation system). > > I used GCC ver 2.6.3 (gcc263bn.zip) since the latest one doesn't work > on my system. > I've put "set GO32=emu c:\bin\emu387" in my autoexec.bat for 387 emulation. > > I compiled the next source code on my system using the next command: > gcc model.c -o model -lm > and no errors. > However, I got a wrong result when I run it. This is a known problem: several trig functions, such as atan, acos and asin, give inaccurate results near 90 degrees. These problems will be corrected in DJGPP v2.03. If you don't have any other solution than to use DJGPP v1.x, try to rewrite your code so that it doesn't invoke acos to compute angles near 90 degrees. Then the results will be more accurate. Alternatively, write your own acos function using one of the available approximation methods. > Anyway, I am still hoping to use the latest GCC on my system. > However, every time I run it, my system reboot automatically. > I've followed the advice in section 3.9 of the FAQ for the memory-starved > systems. Did you change CWSDPMI parameter "Minimum application memory desired before 640K paging" parameter to 512K or larger (using CWSPARAM)? If not, please try it. Also, what does "mem /c" print on your 386SX?