www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/12/11:44:31

Message-Id: <4.1.19981112171650.00a26d70@hal.nt.tuwien.ac.at>
X-Sender: tony AT hal DOT nt DOT tuwien DOT ac DOT at
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
Date: Thu, 12 Nov 1998 17:32:52 +0100
To: djgpp AT delorie DOT com
From: Anton Helm <tony AT nt DOT tuwien DOT ac DOT at>
Subject: high precision nonlinear math functions ?
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

I've some problems with numerical precision 
of some math functions.

Is there any math lib available that can do these
computations in long double ?

I would need e.g.:

log(tan(b/2.0 + PI/4.0))

asin(e * sin(b))

atan(exp(f))

Unfortunately all of them are inside an iteration loop
so they really need to be fast.

I recently got an infinite iteration loop due to low precision
(all other computations are done in long double).
If I change the break criteria of the iteration loop so that I
jump out before the error occurs the results are not precise enough :-(

... and yes I certainly use -lm for linking.

Thanks,

Tony

- Raw text -


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