cosmopolitan/test
Gabriel Ravier 75e161b27b
Fix printf-family functions on long double inf (#1273)
Cosmopolitan's printf-family functions currently very poorly handle
being passed a long double infinity.

For instance, a program such as:

```cpp
#include <stdio.h>

int main()
{
    printf("%f\n", 1.0 / 0.0);
    printf("%Lf\n", 1.0L / 0.0L);
    printf("%e\n", 1.0 / 0.0);
    printf("%Le\n", 1.0L / 0.0L);
    printf("%g\n", 1.0 / 0.0);
    printf("%Lg\n", 1.0L / 0.0L);
}
```

will currently output the following:

```
inf
0.000000[followed by 32763 more zeros]
inf
N.aN0000e-32769
inf
N.aNe-32769
```

when the correct expected output would be:

```
inf
inf
inf
inf
inf
inf
```

This patch fixes this, and adds tests for the behavior.
2024-09-01 13:10:48 -07:00
..
ctl Make improvements 2024-09-01 01:27:47 -07:00
dsp Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
libc Fix printf-family functions on long double inf (#1273) 2024-09-01 13:10:48 -07:00
libcxx Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
math Share file offset across processes 2024-08-03 01:39:11 -07:00
net Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
posix Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
tool Move LoadZipArgs() to cosmo.h 2024-08-17 12:06:27 -07:00
BUILD.mk Introduce Cosmopolitan Templates Library (CTL) 2024-06-03 09:21:59 -07:00