Message-Id: <9805110742.AA14523@axe.bre.da> Subject: Re: Code to Fix sinh() in libm.a To: Kbwms AT aol DOT com (Kbwms) Date: Mon, 11 May 1998 9:42:23 METDST Cc: djgpp AT delorie DOT com In-Reply-To: <5bc654c6.3551fb66@aol.com>; from "Kbwms" at May 7, 98 2:20 pm From: Jens Bischoff Precedence: bulk Hi! Thank you for your work! However, I believe that the coefficients are slightly inexact. The correct values should be: long double C[] = { 1.L, 1/6.L, 1/120.L, 1/5040.L, 1/362880.L, 1/39916800.L, 1/6227020800.L}; if they are derived from the series for sinhx(x): sinh(x) = 1 + x^3/3! + x^5/5! + x^7/7! + ... Besides, this approximation (that uses 7 coefficients) is only accurate with 64bit (double) arithmetic. With long doubles a 8th coefficient should be added: C[7] = 1/1307674368000.L Jens --- | | | Jens Bischoff | Daimler-Benz Aerospace Airbus | | ---- +-----------------+---------------------------------+ | | | Aerodynamic Data Department (EFD) | | Dasa Airbus | Huenefeldstrasse 1-5 D-28199 Bremen (Germany) |