This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding __float128 (i.e TS 18661-3)


Picking up here as a reasonable place to continue the
discussion on ABI and API for float128 (or any future
TS 18661-3 derived type).


For any new TS 18661-3 derived type, I propose the
following new functions and ABI be exposed through
libm via math.h:

	From TS 18661-3:

	acosh acos asinh asin
	atan2 atanh atan cabs
	cacosh cacos carg casinh
	casin catanh catan cbrt
	ccosh ccos ceil cexp
	cimag clog conj copysign
	cosh cos cpow cproj
	creal csinh csin csqrt
	ctanh ctan erfc erf
	exp2 exp expm1 fabs
	fdim floor fma fmax
	fmin fmod frexp hypot
	ilogb ldexp lgamma llrint
	llround log10 log1p log2
	logb log lrint lround
	modf nanf nearbyint nextafter
	pow remainder remquo rint
	round scalbln scalbn 
	sinh sin sqrt tanh
	tan tgamma trunc nextup
	nextdown.

	From GNU:

	exp10 clog10 j0l j1l
	jnl lgamma?_r sincos
	y0 y1 yn

	Implementation support for the ISO C11 7.12.3
	classification macros:

	__finite __fpclassify
	__signbit __issignaling
	__isinf __isnan

	Likewise, the following functions would
	have an equivalent __*_finite ABI entry
	for optimization:

	acosh acos asin atan2
	atanh cosh exp10 exp2
	exp fmod hypot j0
	j1 jn log10 log2
	log pow remainder scalb
	sinh sqrt y0 y1
	yn

Likewise, through libc via stdlib.h:

	From TS 18661-3:

	strto strfrom

	GNU variants for symmetry with both wide
	character strings and existing locale
	support:

	strfrom*_l strto*_l wscto wscto*_l
	wcsfrom wscfrom*_l

Macros needing altered in math.h:

	From TS 18661-3:

	signbit fpclassify isfinite isinf
	isnan

	From GNU:

	issignaling

Macros added via math.h

	From TS 18661-3:
	
	FP_FAST_FMA HUGE_VAL

	From GNU:

	M_E M_LOG2E M_LOG10E M_LN2 
	M_LN10 M_PI M_PI_2 M_PI_4
	M_1_PI M_2_PI M_2_SQRTPI M_SQRT2
	M_SQRT1_2

typedefs via math.h:

	From TS 18661-3:

	_Float128_t


Note, the helper functions for classification macros
would *not* be exported through libc.

Likewise, matherr and _LIB_VERSION would not be supported
on these types. (Yes, this has long double transition
implications)

TS 18661-3 defines a number of new macros which should be
added to float.h.  This is a compiler header, we should
avoid injecting any of these macros into a user compilation.

It is still an open question as to how best to expose this
API.  I think the TS 18661-3 mandated __STDC_WANT_IEC_60559_TYPES_EXT__
should cover the entire non-GNU API. Likewise, _GNU_SOURCE
should only drive inclusion when used with a proper compiler
on a supported platform.






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]