Closed joseluis closed 1 year ago
Is there any necessary use case for this change? You can convert the UBig
result into IBig
by a single .into()
expression.
Right, I guess can use the Into impl without performance loss I assume.
I was just porting some code that used the ibig crate to dashu-int and it felt weird that the function returned a different type, and was wondering if there was a good reason for that. The only benefit in anycase may be API-wise.
It's kind of my personal favor. I think it's better to use the most concise type for the output to reduce ambiguity. For example, if the GCD of IBigs returns an IBig, then I can't immediately know what is the sign of the output without looking at the docs.
I will close this issue for now, as I don't plan to change that. Sorry for the confusion.
I understand. I like that it's a consistent choice, I can see the euclidean remainder for IBig is also a UBig. That's good. And since the From
Would it be possible to make it a closed operation, like the rest, that returns the same operand type?