Rounding on PowerPC with KIND=16

Jerry DeLisle jvdelisle@charter.net
Fri Feb 13 21:36:00 GMT 2015


On 02/13/2015 01:19 PM, Steve Kargl wrote:
> On Fri, Feb 13, 2015 at 01:11:01PM -0800, Jerry DeLisle wrote:
>>
>> If you run this program on x86-64 vs Power PC, the Power PC
>> appears to have an off by one spacing.  I assume this means
>> the least significant bit is off or we are converting wrong
>> when we write it.  I suspect this is a known issue, but was
>> wondering if anyone has explored it?  Could it have something
>> to do with endianess?
>>
>
> I don't have access to PowerPC hardware.  Does gfortran's
> REAL(16) map to libquadmath?  If it maps to C's long double
> on some (all?) PowerPC archs, long double is mapped to a
> double-double representation with 106-bits of precision
> instead of IEEE754's binary128 with 113-bits of precision.
>

I have been using gcc112 of the GCC Compile Farm to look at this.

I wonder if we should reduce our default digits by a few for this platform?  We 
may be emitting garbage and not realize it.

Jerry



More information about the Fortran mailing list