[ruby/bigdecimal] Add TODO comment

https://github.com/ruby/bigdecimal/commit/ef9cf4e69e
This commit is contained in:
Kenta Murata 2021-12-09 21:50:46 +09:00
parent 98918209b7
commit 0b8638cd74
No known key found for this signature in database
GPG Key ID: CEFE8AFB6081B062

View File

@ -1943,6 +1943,9 @@ BigDecimal_div2(VALUE self, VALUE b, VALUE n)
GUARD_OBJ(cv, VpCreateRbObject(mx + VpBaseFig(), "0", true));
GUARD_OBJ(av, GetVpValue(self, 1));
/* TODO: I want to refactor this precision control for a float value later
* by introducing an implicit conversion function instead of
* GetVpValueWithPrec. */
if (RB_FLOAT_TYPE_P(b) && b_prec > BIGDECIMAL_DOUBLE_FIGURES) {
b_prec = BIGDECIMAL_DOUBLE_FIGURES;
}