www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/15/16:18:56

Sender: nate AT cartsys DOT com
Message-ID: <36ED78AD.313108A8@cartsys.com>
Date: Mon, 15 Mar 1999 13:16:29 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.3 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: sin(acos((float)i/1024))*0x10000L
References: <199903142305 DOT RAA16482 AT x15 DOT dejanews DOT com> <36EC443E DOT EFFA47B5 AT cartsys DOT com> <36EC5D7A DOT 97FAC93B AT geocities DOT com>
Reply-To: djgpp AT delorie DOT com

The Beyonder wrote:
> 
> OK I read the FAQ (section 11.1), but it didn't really explain anything
> regarding this problem... 

True.  I meant, it explains about WMEMU.

> I also tried -lm and -lemu on the linker line
> (presuming that the linker line is: gcc -lm (or -lemu) foo1.cc foo2.a -o
> foo.exe but this didn't work. 

You must add -lm at the end of the linker line; libraries are scanned in
the order specified.

> Also you weren't very clear on if it was
> the function's (acos) or emulator's fault... 

The emulator, I presume.  `acos' works just fine for people with FPUs.

> on a seperate note, just
> to get things rolling for now how would I go about making my own acos
> function? is it hard?

Probably.  It's an infinite series, and the tricky part is getting it to
the full accuracy of the `double' type.  Also, the basic series don't
converge very fast, so the function would probably be quite slow.  In
fact, you probably won't do much better than the libm's acos function,
which doesn't use the FPU or its emulation at all.  Try to get that
working.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019