public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jerry DeLisle <jvdelisle@charter.net>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: gfortran <fortran@gcc.gnu.org>
Subject: Re: [PATCH, libgfortran] PR68867 numeric formatting problem in the fortran library
Date: Sun, 13 Dec 2015 05:29:00 -0000	[thread overview]
Message-ID: <566D021C.2080306@charter.net> (raw)
In-Reply-To: <20151213043039.GA51740@troutmask.apl.washington.edu>

On 12/12/2015 08:30 PM, Steve Kargl wrote:
> On Sat, Dec 12, 2015 at 08:14:39PM -0800, Jerry DeLisle wrote:
>>      case 16:
>> +      /* Adjust decimal precision depending on binary precision, 103 or 113.  */
> 
> 
> s/103/106

Fixed the typo, thanks.

> 
> I suspect that this is simply a bandaid on a much bigger
> problem.  Namely, few of the intrinsic functions for 
> REAL(16) expect 106 bits instead of 113 bits.
> 

The patch only affects default "list directed" formatting which is processor
defined, ie defined by us.  It seems obvious that the number of digits we emit
should be less. (It reminds me of the reports we get once in a while from people
wondering why 1.0_4/3.0_4 is not .333333333... out to 16 digits).

There are a few tests failing on PowerPC, not related to this PR, such as one of
the bessel tests. Also some of the ERF tests fail.

Otherwise the intrinsics I have spot checked are using GFC_REAL_16 to define
everything and that should be configured for PowerPC. I am not super familiar
with the architecture, but I assume it has its own specific math libraries.

For example, I see in one file:

#if defined(GFC_REAL_16_IS_FLOAT128)
#define MATHFUNC(funcname) funcname ## q
#else
#define MATHFUNC(funcname) funcname ## l
#endif

#if defined (HAVE_GFC_REAL_16)

Still looking for an OK.

Jerry

  reply	other threads:[~2015-12-13  5:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  4:14 Jerry DeLisle
2015-12-13  4:30 ` Steve Kargl
2015-12-13  5:29   ` Jerry DeLisle [this message]
2015-12-14 23:09     ` Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=566D021C.2080306@charter.net \
    --to=jvdelisle@charter.net \
    --cc=fortran@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).