On Thu, May 09, 2024 at 01:37:32PM +0800, Kewen.Lin wrote: > > > > > That said, Fortran has the concept of model numbers, which > > are set in arith.c. Does this change give the expected > > value for ibm128? For example, with "REAL(16) X", one > > has "DIGITS(X) = 113", which is the precision on the > > of the underlying IEEE754 binary128 type. > > > > With some testings locally, I noticed that currently DIGITS has > been already correct even without this change. For "REAL(16) X", > with -mabi=ibmlongdouble it's long double with ibm128 format and > its DIGITS(X) is 106, while with -mabi=ieeelongdouble it's long > double with ieee128 format and its DIGITS(X) is 113. >
That's good. I'll take a look later this weekend at arith.c. There are few others to consider: precision(x), minexponent(x), maxexponent(x), huge(x), and tiny(x). -- Steve