A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
1st Parameter
Pointer to the null-terminated wide-character string to be converted.
Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
Read more about parameters of wcstod128 in parameters section
The wcstod128function in C language Converts the initial portion of a wide character string to a decimal floating-point number with 128-bit precision.
wcstod128 converts the initial portion of the wide-character string pointed to by nptr to a _Decimal128 representation. It follows similar rules to wcstod but produces a decimal floating-point result with 128-bit precision, offering the highest precision among decimal floating-point types.
The wcstod128function takes 2
parameters:
•
const wchar_t * `nptr`: Pointer to the null-terminated wide-character string to be converted.
•
wchar_t ** `endptr`: Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
Converts the initial part of the wide-character string `nptr` to a `_Decimal128` value. If `endptr` is not `NULL`, it points to the first character after the number that was converted.
The wcstod128 function return value :
Returns the converted _Decimal128 value
If no conversion could be performed, 0
0 is returned
If the correct value is outside the range of representable values, ±HUGE_VAL_D128 is returned (according to the sign of the value), and the value of the macro ERANGE is stored in errno
Output
This example demonstrates the basic usage of wcstod128 to convert a wide string to a _Decimal128 value, showing its high precision capability.