From owner-freebsd-numerics@FreeBSD.ORG Thu Oct 31 15:09:23 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 6EBA0B64 for ; Thu, 31 Oct 2013 15:09:23 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4033125A3 for ; Thu, 31 Oct 2013 15:09:23 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id x13so5179348ief.37 for ; Thu, 31 Oct 2013 08:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=p8sRDR2siEbDnFlP9lyUwy/A4DDrUphpQoADTdV3nvo=; b=rFlciReAieOwSdGNHOdydmge2F2HBq6t24Df7N8tDFaeiDOiTzItwmWSm/nDv+dWyt D3xs2tCkjNGC+U9xnL7BLo8jtgmZvi/22a2VX0iy9msX/bWlZ8R8Yibhn09kQDG8n6sz ovOJoe3DNLz3yEWllsV6TwUNwrYYJ1oL8F8vEfalpVtcpMwXW79naJgP3KrlQwnXgnow rQuqkdrXVkCDfIrpd4Eeb9UlY18iC7jSsI+5kCJatES9ERznZ7/OCxSpfF+6fztZM9rn 3ky641vmvsvISsGhgufLFMesxFia4n1AbukaCZwF5xt3M979NYjOtCWWUajyZxeOyNsn 9ViA== MIME-Version: 1.0 X-Received: by 10.50.45.100 with SMTP id l4mr7162355igm.8.1383232162727; Thu, 31 Oct 2013 08:09:22 -0700 (PDT) Received: by 10.64.12.140 with HTTP; Thu, 31 Oct 2013 08:09:22 -0700 (PDT) In-Reply-To: <20131031143832.GA60432@troutmask.apl.washington.edu> References: <20131031143832.GA60432@troutmask.apl.washington.edu> Date: Thu, 31 Oct 2013 11:09:22 -0400 Message-ID: Subject: Re: Representation of 128 bit floating point numbers in FreeBSD amd64 and Clang From: Mehmet Erol Sanliturk To: Steve Kargl Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 15:09:23 -0000 On Thu, Oct 31, 2013 at 10:38 AM, Steve Kargl < sgk@troutmask.apl.washington.edu> wrote: > 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 > These are defined in the following library : http://gcc.gnu.org/onlinedocs/libquadmath/ ( GCC libquadmath ) For printing values , the following is required : http://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html I could not find Clang libquadmath . Thank you very much . Mehmet Erol Sanliturk