From owner-freebsd-standards@FreeBSD.ORG Thu Sep 29 19:55:52 2005 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E26EB16A41F for ; Thu, 29 Sep 2005 19:55:52 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DE0543D49 for ; Thu, 29 Sep 2005 19:55:52 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.13.4/8.13.4) with ESMTP id j8TJtqki015020 for ; Thu, 29 Sep 2005 12:55:52 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.4/8.13.1/Submit) id j8TJtqai015019 for freebsd-standards@freebsd.org; Thu, 29 Sep 2005 12:55:52 -0700 (PDT) (envelope-from sgk) Date: Thu, 29 Sep 2005 12:55:52 -0700 From: Steve Kargl To: freebsd-standards@freebsd.org Message-ID: <20050929195552.GA14982@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: complex.h math functions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 19:55:53 -0000 Is it permissible to implement the complex.h math functions in terms of functions in math.h. For example, if z = x + I * y, then cos(z) = cos(x) * cosh(y) - I sin(x) * sinh(y) This can be (naively?) implemented as double complex ccos(double complex z) { double x, y; x = creal(z); y = cimag(y); return (cosh(y) * (cos(x) - I * sin(x) * tanh(y))); } I don't own a copy of C99, so I can't easily check the wording of the standard. -- Steve