Remove unused 'exact' parameter.

This commit is contained in:
K. Lange 2024-02-28 18:01:57 +09:00
parent 1cdd9dfb1b
commit a36f6e00eb
2 changed files with 4 additions and 4 deletions

View File

@ -2455,7 +2455,7 @@ static size_t round_to(char * str, size_t len, size_t actual, size_t digits) {
*
*
*/
KrkValue krk_double_to_string(double a, int exact, unsigned int digits, char formatter, int plus, int forcedigits) {
KrkValue krk_double_to_string(double a, unsigned int digits, char formatter, int plus, int forcedigits) {
union { double d; uint64_t u; } val = {.d = a};
int noexp = (formatter | 0x20) == 'f';

View File

@ -627,9 +627,9 @@ KRK_StaticMethod(float,__new__) {
KRK_Method(float,__int__) { return krk_int_from_float(self); }
KRK_Method(float,__float__) { return argv[0]; }
extern KrkValue krk_double_to_string(double,int,unsigned int,char,int,int);
extern KrkValue krk_double_to_string(double,unsigned int,char,int,int);
KRK_Method(float,__repr__) {
return krk_double_to_string(self,0,16,' ',0,0);
return krk_double_to_string(self,16,' ',0,0);
}
KRK_Method(float,__format__) {
@ -675,7 +675,7 @@ KRK_Method(float,__format__) {
if (opts.hasPrecision) digits = opts.prec;
if (!opts.align) opts.align = '>';
KrkValue result = krk_double_to_string(self, 0, digits, formatter, opts.sign == '+', forcedigits);
KrkValue result = krk_double_to_string(self, digits, formatter, opts.sign == '+', forcedigits);
if (!IS_STRING(result) || !opts.width) return result;
krk_push(result);