Closed finsterdexter closed 4 years ago
Good point. The way I calculate Log10 is by using the natural log divided by a constant value representing the natural log of 10. It simplifies calculations but it doesn't work quite as expected in situations like this.
I think what I'll have to do is add special cases for these but I'll have to think about how to do that in a performant way.
@finsterdexter Thanks for the issue report. I've added special-case handling for all powers of 10 in v1.0.2.
For certain values, the Log10 function is returning some strange results.
DecimalEx.Log10(0.1m)
DecimalEx.Log10(0.01m)
DecimalEx.Log10(0.001m)
Ideally, these results should be the same as the Math.Log10 function, as by definition, the Log10 of 0.1 is the integer -1.