From owner-freebsd-numerics@FreeBSD.ORG Thu Oct 31 14:38:33 2013 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84BFD9A5 for ; Thu, 31 Oct 2013 14:38:33 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 644242345 for ; Thu, 31 Oct 2013 14:38:33 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id r9VEcWI6062200; Thu, 31 Oct 2013 07:38:32 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id r9VEcWlo062199; Thu, 31 Oct 2013 07:38:32 -0700 (PDT) (envelope-from sgk) Date: Thu, 31 Oct 2013 07:38:32 -0700 From: Steve Kargl To: Mehmet Erol Sanliturk Subject: Re: Representation of 128 bit floating point numbers in FreeBSD amd64 and Clang Message-ID: <20131031143832.GA60432@troutmask.apl.washington.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 14:38:33 -0000 On Thu, Oct 31, 2013 at 09:27:34AM -0400, Mehmet Erol Sanliturk wrote: > > In FreeBSD amd64 and Clang , > how can I represent 128 bits ( 34 digits ) variables ? > Not sure it can be done with clang, but GCC supports a __float128 type. GCC refers to this as its TCmode. gfortran, the Fortran compiler that supports REAL(16), uses __float128 internally. I've never directly used __float128, so can't help beyond this. If you need 128-bits in C on ia32 or x86_64 hardware, you should probably look into using mpfr and mpc. -- Steve