# logBase 10 erroneous

**URL:** <https://discourse.elm-lang.org/t/logbase-10-erroneous/6312>\
**Category:** Learn\
**Created:** [September 27, 2020, 10:55pm UTC](https://discourse.elm-lang.org/t/logbase-10-erroneous/6312 "2020-09-27T22:55:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jreusch](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jreusch](https://discourse.elm-lang.org/u/jreusch)\
**Post date:** [September 28, 2020, 9:05pm UTC](https://discourse.elm-lang.org/t/logbase-10-erroneous/6312/4 "2020-09-28T21:05:54Z")

</div>

`Basics.logBase` is [implemented](https://github.com/elm/core/blob/1.0.5/src/Basics.elm#L619) as `log number / log base`, where `log` is just `Math.log` from Javascript. The rounding errors you are seeing comes from the floating-point division happening here.

There also exists `Math.log10` in Javascript, which yields better results, but does not exist in Internet Explorer. As always, there already exists an issue [matching your problem](https://github.com/elm/core/issues/1048), and a [pull request](https://github.com/elm/core/pull/1054/files%5D) proposing to use said javascript function.

---

_[View the full topic](https://discourse.elm-lang.org/t/logbase-10-erroneous/6312)._
