41 if (d >= (
double)INT64_MIN && d <= (
double)INT64_MAX) {
42 int64_t ii = (int64_t)d;
43 if ((
double)ii == d) {
53 const char *
s =
v.s ?
v.s :
"";
55 while (*
p ==
' ' || *
p ==
'\t' || *
p ==
'\r' || *
p ==
'\n')
59 double dval = strtod(
p, &endp);
60 while (endp && (*endp ==
' ' || *endp ==
'\t' || *endp ==
'\r' || *endp ==
'\n'))
62 if (!endp || *endp !=
'\0') {
65 long long parsed = strtoll(
p, &endp, 10);
66 while (endp && (*endp ==
' ' || *endp ==
'\t' || *endp ==
'\r' || *endp ==
'\n'))
68 if (endp && *endp ==
'\0') {
75 if (dval >= (
double)INT64_MIN && dval <= (
double)INT64_MAX) {
76 int64_t ii = (int64_t)dval;
77 if ((
double)ii == dval) {
Tagged union representing a Fun value.
push_value(vm, make_int(0))
void free_value(Value v)
Free dynamic storage owned by a Value.
Value make_float(double v)
Construct a Value representing a double-precision float.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.