about summary refs log tree commit diff
path: root/sysdeps/ieee754/float128
Commit message (Collapse)AuthorAgeFilesLines
* float128: Add strtof128, wcstof128, and related functions.Paul E. Murphy2017-06-1210-0/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementations are contained with sysdeps/ieee754/float128 as they are only built when _Float128 is enabled within libc/m. * include/gmp.h (__mpn_construct_float128): New declaration. * include/stdlib.h: Include bits/floatn.h for _Float128 tests. (__strtof128_l): New declaration. (__strtof128_nan): Likewise. (__wcstof128_nan): Likewise. (__strtof128_internal): Likewise. (____strtof128_l_internal): Likewise. * include/wchar.h: Include bits/floatn.h for _Float128 tests. (__wcstof128_l): New declaration. (__wcstof128_internal): Likewise. * stdlib/Makefile (bug-strtod2): Link libm too. * stdlib/stdlib.h (strtof128): New declaration. (strtof128_l): Likewise. * stdlib/tst-strtod-nan-locale-main.c: Updated to use tst-strtod.h macros to ensure float128 gets tested too. * stdlib/tst-strtod-round-skeleton.c (CHOOSE_f128): New macro. * stdlib/tst-strtod.h: Include bits/floatn.h for _Float128 tests. (IF_FLOAT128): New macro. (GEN_TEST_STRTOD): Update to optionally include _Float128 in the tests. (STRTOD_TEST_FOREACH): Likewise. * sysdeps/ieee754/float128/Makefile: Insert new strtof128 and wcstof128 functions into libc. * sysdeps/ieee754/float128/Versions: Add exports for the above new functions. * sysdeps/ieee754/float128/mpn2float128.c: New file. * sysdeps/ieee754/float128/strtod_nan_float128.h: New file. * sysdeps/ieee754/float128/strtof128.c: New file. * sysdeps/ieee754/float128/strtof128_l.c: New file. * sysdeps/ieee754/float128/strtof128_nan.c: New file. * sysdeps/ieee754/float128/wcstof128.c: New file. * sysdeps/ieee754/float128/wcstof128_l.c: New file. * sysdeps/ieee754/float128/wcstof128_nan.c: New fike. * wcsmbs/Makefile: (CFLAGS-wcstof128.c): Append strtox-CFLAGS. (CFLAGS-wcstof128_l): Likewise. * wcsmbs/wchar.h: Include bits/floatn.h for _Float128 tests. (wcstof128): New declaration. (wcstof128_l): Likewise.
* float128: Add strfromf128Gabriel F. T. Gomes2017-06-073-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | Add strfromf128 to stdlib when _Float128 support is enabled. * stdio-common/printf-parsemb.c (__parse_one_specmb): Initialize spec->info.is_binary128 to zero. * stdio-common/printf.h (printf_info): Add new member is_binary128 to indicate that the number being converted to string is compatible with the IEC 60559 binary128 format. * stdio-common/printf_fp.c (__printf_fp_l): Add code to deal with _Float128 numbers. * stdio-common/printf_fphex.c: Include ieee754_float128.h and ldbl-128/printf_fphex_macros.h (__printf_fphex): Add code to deal with _Float128 numbers. * stdio-common/printf_size.c (__printf_size): Likewise. * stdio-common/vfprintf.c (process_arg): Initialize member info.is_binary128 to zero. * stdlib/fpioconst.h (FLT128_MAX_10_EXP_LOG): New macro. * stdlib/stdlib.h: Include bits/floatn.h for _Float128 support. (strfromf128): New declaration. * stdlib/strfrom-skeleton.c (STRFROM): Set member info.is_binary128 to one. * sysdeps/ieee754/float128/Makefile: Add strfromf128. * sysdeps/ieee754/float128/Versions: Likewise. * sysdeps/ieee754/float128/strfromf128.c: New file.
* float128: Add conversion from float128 to mpnGabriel F. T. Gomes2017-06-073-0/+25
| | | | | | | | | | | | | | | | | | Reuse the code for __mpn_extract_long_double to implement __mpn_extract_float128. * include/gmp.h: Include bits/floatn.h (__mpn_extract_float128): Declare when __HAVE_DISTINCT_FLOAT128 is 1. * stdlib/gmp-impl.h: Also check if alloca is not defined before including stack-alloc.h. It could have been defined by other header which not necessarily defines HAVE_ALLOCA. * sysdeps/ieee754/float128/Makefile: New file. * sysdeps/ieee754/float128/float1282mpn.c: New file. * sysdeps/ieee754/float128/float128_private.h: Include gmp.h before redefining __mpn_extract_long_double to __mpn_extract_float128, then redefine __mpn_extract_long_double to __mpn_extract_float128. * sysdeps/ieee754/ldbl-128/ldbl2mpn.c: Replace long double with _Float128 to allow float128_private.h overrides.
* float128: Add wrappers to override ldbl-128 as float128.Paul E. Murphy2017-05-2585-0/+643
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change defines float128_private.h which contains macros used to override long double naming conventions when building a ldbl file. * math/math.h [__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)] (SNANF128): New macro. * math/e_sqrtf128.c: New file. * math/s_fmaxmag_template.c: Include math_private.h in order to make inline expansion of fabs128(). * math/s_fminmag_template.c: Likewise. * sysdeps/ieee754/float128/e_acosf128.c: New file. * sysdeps/ieee754/float128/e_acoshf128.c: New file. * sysdeps/ieee754/float128/e_asinf128.c: New file. * sysdeps/ieee754/float128/e_atan2f128.c: New file. * sysdeps/ieee754/float128/e_atanhf128.c: New file. * sysdeps/ieee754/float128/e_coshf128.c: New file. * sysdeps/ieee754/float128/e_exp10f128.c: New file. * sysdeps/ieee754/float128/e_expf128.c: New file. * sysdeps/ieee754/float128/e_fmodf128.c: New file. * sysdeps/ieee754/float128/e_gammaf128_r.c: New file. * sysdeps/ieee754/float128/e_hypotf128.c: New file. * sysdeps/ieee754/float128/e_ilogbf128.c: New file. * sysdeps/ieee754/float128/e_j0f128.c: New file. * sysdeps/ieee754/float128/e_j1f128.c: New file. * sysdeps/ieee754/float128/e_jnf128.c: New file. * sysdeps/ieee754/float128/e_lgammaf128_r.c: New file. * sysdeps/ieee754/float128/e_log10f128.c: New file. * sysdeps/ieee754/float128/e_log2f128.c: New file. * sysdeps/ieee754/float128/e_logf128.c: New file. * sysdeps/ieee754/float128/e_powf128.c: New file. * sysdeps/ieee754/float128/e_rem_pio2f128.c: New file. * sysdeps/ieee754/float128/e_remainderf128.c: New file. * sysdeps/ieee754/float128/e_scalbf128.c: New file. * sysdeps/ieee754/float128/e_sinhf128.c: New file. * sysdeps/ieee754/float128/float128_private.h: New file. * sysdeps/ieee754/float128/gamma_productf128.c: New file. * sysdeps/ieee754/float128/ieee754_float128.h: New file. * sysdeps/ieee754/float128/k_cosf128.c: New file. * sysdeps/ieee754/float128/k_sincosf128.c: New file. * sysdeps/ieee754/float128/k_sinf128.c: New file. * sysdeps/ieee754/float128/k_tanf128.c: New file. * sysdeps/ieee754/float128/lgamma_negf128.c: New file. * sysdeps/ieee754/float128/lgamma_productf128.c: New file. * sysdeps/ieee754/float128/s_asinhf128.c: New file. * sysdeps/ieee754/float128/s_atanf128.c: New file. * sysdeps/ieee754/float128/s_cbrtf128.c: New file. * sysdeps/ieee754/float128/s_ceilf128.c: New file. * sysdeps/ieee754/float128/s_copysignf128.c: New file. * sysdeps/ieee754/float128/s_cosf128.c: New file. * sysdeps/ieee754/float128/s_erff128.c: New file. * sysdeps/ieee754/float128/s_expm1f128.c: New file. * sysdeps/ieee754/float128/s_fabsf128.c: New file. * sysdeps/ieee754/float128/s_finitef128.c: New file. * sysdeps/ieee754/float128/s_floorf128.c: New file. * sysdeps/ieee754/float128/s_fmaf128.c: New file. * sysdeps/ieee754/float128/s_fpclassifyf128.c: New file. * sysdeps/ieee754/float128/s_frexpf128.c: New file. * sysdeps/ieee754/float128/s_fromfpf128.c: New file. * sysdeps/ieee754/float128/s_fromfpxf128.c: New file. * sysdeps/ieee754/float128/s_getpayloadf128.c: New file. * sysdeps/ieee754/float128/s_isinff128.c: New file. * sysdeps/ieee754/float128/s_isnanf128.c: New file. * sysdeps/ieee754/float128/s_issignalingf128.c: New file. * sysdeps/ieee754/float128/s_llrintf128.c: New file. * sysdeps/ieee754/float128/s_llroundf128.c: New file. * sysdeps/ieee754/float128/s_log1pf128.c: New file. * sysdeps/ieee754/float128/s_logbf128.c: New file. * sysdeps/ieee754/float128/s_lrintf128.c: New file. * sysdeps/ieee754/float128/s_lroundf128.c: New file. * sysdeps/ieee754/float128/s_modff128.c: New file. * sysdeps/ieee754/float128/s_nearbyintf128.c: New file. * sysdeps/ieee754/float128/s_nextafterf128.c: New file. * sysdeps/ieee754/float128/s_nexttowardf128.c: New file. * sysdeps/ieee754/float128/s_nextupf128.c: New file. * sysdeps/ieee754/float128/s_remquof128.c: New file. * sysdeps/ieee754/float128/s_rintf128.c: New file. * sysdeps/ieee754/float128/s_roundevenf128.c: New file. * sysdeps/ieee754/float128/s_roundf128.c: New file. * sysdeps/ieee754/float128/s_scalblnf128.c: New file. * sysdeps/ieee754/float128/s_scalbnf128.c: New file. * sysdeps/ieee754/float128/s_setpayloadf128.c: New file. * sysdeps/ieee754/float128/s_setpayloadsigf128.c: New file. * sysdeps/ieee754/float128/s_signbitf128.c: New file. * sysdeps/ieee754/float128/s_significandf128.c: New file. * sysdeps/ieee754/float128/s_sincosf128.c: New file. * sysdeps/ieee754/float128/s_sinf128.c: New file. * sysdeps/ieee754/float128/s_tanf128.c: New file. * sysdeps/ieee754/float128/s_tanhf128.c: New file. * sysdeps/ieee754/float128/s_totalorderf128.c: New file. * sysdeps/ieee754/float128/s_totalordermagf128.c: New file. * sysdeps/ieee754/float128/s_truncf128.c: New file. * sysdeps/ieee754/float128/s_ufromfpf128.c: New file. * sysdeps/ieee754/float128/s_ufromfpxf128.c: New file. * sysdeps/ieee754/float128/t_sincosf128.c: New file. * sysdeps/ieee754/float128/x2y2m1f128.c: New file. * sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h: (__iscanonicalf128): Define as a macro.
* float128: Add _Float128 make bits to libm.Paul E. Murphy2017-05-092-0/+148
This adds the appropriate common bits for a platform to enable float128 and expose ABI. * math/Makefile: (type-float128-suffix): New variable (type-float128-routines): Likewise (type-float128-yes): Likewise (types): Append float128 if supported (types-basic): New variable to control the use of templates for float, double, and long double, but not for float128 or newer types. (type-basic-foreach): Likewise. * sysdeps/ieee754/float128/Makeconfig: New file. * sysdeps/ieee754/float128/Versions: New file.