mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 21:40:30 +00:00
Add long double printf formatting support
You can now easily print numbers that have 80 bits of precision. This change also imports many of the test vectors from the gdtoa codebase.
This commit is contained in:
parent
dae0583ee5
commit
1c387727fe
9 changed files with 808 additions and 287 deletions
20
third_party/gdtoa/gdtoa.h
vendored
20
third_party/gdtoa/gdtoa.h
vendored
|
@ -3,6 +3,26 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
/**
|
||||
* Configures g_*fmt()
|
||||
*
|
||||
* @param ic
|
||||
* 0 ==> Infinity or NaN
|
||||
* 1 ==> infinity or nan
|
||||
* 2 ==> INFINITY or NAN
|
||||
* 3 ==> Inf or NaN
|
||||
* 4 ==> inf or nan
|
||||
* 5 ==> INF or NAN
|
||||
* @param ic determines if NaNs are rendered as NaN(...)
|
||||
* 0 ==> no
|
||||
* 1 ==> yes
|
||||
* 2 ==> no for default NaN values; yes otherwise
|
||||
* @param ns determines sign of NaN values reported
|
||||
* 0 ==> distinguish NaN and -NaN
|
||||
* 1 ==> report both as NaN
|
||||
*/
|
||||
#define NIK(ic, nb, ns) (ic + 6 * (nb + 3 * ns))
|
||||
|
||||
enum {
|
||||
/* return values from strtodg */
|
||||
STRTOG_Zero = 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue