Fix float literals for integer floats
This commit is contained in:
parent
e9abf8a370
commit
31c8d0af15
@ -1025,7 +1025,7 @@ CORD compile(env_t *env, ast_t *ast)
|
|||||||
}
|
}
|
||||||
case Int: return CORD_asprintf("I%ld(%ld)", Match(ast, Int)->bits, Match(ast, Int)->i);
|
case Int: return CORD_asprintf("I%ld(%ld)", Match(ast, Int)->bits, Match(ast, Int)->i);
|
||||||
case Num: {
|
case Num: {
|
||||||
return CORD_asprintf(Match(ast, Num)->bits == 64 ? "%.9g" : "%.9gf", Match(ast, Num)->n);
|
return CORD_asprintf(Match(ast, Num)->bits == 64 ? "%.9g" : "(float)%.9g", Match(ast, Num)->n);
|
||||||
}
|
}
|
||||||
case Length: {
|
case Length: {
|
||||||
ast_t *expr = Match(ast, Length)->value;
|
ast_t *expr = Match(ast, Length)->value;
|
||||||
|
Loading…
Reference in New Issue
Block a user