cosmopolitan/third_party/gdtoa/strtold.c

20 lines
990 B
C
Raw Normal View History

#if 0
/*─────────────────────────────────────────────────────────────────╗
To the extent possible under law, Justine Tunney has waived
all copyright and related or neighboring rights to this file,
as it is written in the following disclaimers:
http://unlicense.org/ │
http://creativecommons.org/publicdomain/zero/1.0/ │
*/
#endif
2020-12-01 11:43:40 +00:00
#include "third_party/gdtoa/gdtoa.h"
2020-06-15 14:18:57 +00:00
/**
* Converts string to long double.
*/
2020-12-01 11:43:40 +00:00
long double strtold(const char *s, char **endptr) {
long double x;
strtorx(s, endptr, FPI_Round_near, &x);
return x;
2020-12-01 11:43:40 +00:00
}