Rounding on PowerPC with KIND=16

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Feb 13 21:19:00 GMT 2015


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.

-- 
Steve



More information about the Fortran mailing list