From owner-freebsd-questions@FreeBSD.ORG Mon Nov 15 19:42:24 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37E5E106567A for ; Mon, 15 Nov 2010 19:42:24 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id E4C088FC0A for ; Mon, 15 Nov 2010 19:42:23 +0000 (UTC) Received: by ywa8 with SMTP id 8so2797667ywa.13 for ; Mon, 15 Nov 2010 11:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to :in-reply-to:references:from:date:message-id:subject:to:cc :content-type; bh=GcoHGYikXK1BrVvVcZ4Qm5J7hxQWiNlfPWm80Vu82wk=; b=uamiotFZiGmDgx1AImzn5BmyzJhkjhMp4E6FRlS9vaqTTuy1jorEG9IynhKltivYHe W66KBliAHxmBL9YCir/8dKtl2cEJeLyfC4z5OokGahUmsUtKUqBu8TaFbJ6RAPHC0cHL 9aFaCoMcLCypUIt7q0yvBiKYXhOjyX8Fmwu+A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=rFT1iNoaSpbjSzDIjwqkpgreT03Od4zZD1/kiCkTHzsv26UnQRRSkNRokHH+6EMlfT 69smXQ3WM6mYlVQZ1+jmz06HIcljcuuS+WSwbX/WiBp3fWP4h05g2eSHDoFsh5ry7fZa wab57HCm3fb2Pbz0k6vxlmAiRNc4osMd8hJPM= Received: by 10.204.129.210 with SMTP id p18mr6471353bks.85.1289850142492; Mon, 15 Nov 2010 11:42:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.52.19 with HTTP; Mon, 15 Nov 2010 11:41:52 -0800 (PST) In-Reply-To: References: From: Chris Rees Date: Mon, 15 Nov 2010 19:41:52 +0000 Message-ID: To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 Cc: Arthur Bela , FreeBSD Mailing list Subject: Re: how to generate pi in c X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2010 19:42:24 -0000 On 11 November 2010 12:06, Wojciech Puchar wrote: > >> Does anyone has a "generate-pi.c" source code? > > atanl(1) Er, arc tan of 1 is pi/4. Try atanl(1)*4, or for a less wasteful instruction try using the constant M_PI Also, forgive me if I'm wrong, but this looks like a homework question. Chris