n is the average of the two middle elements.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">The median of elements in this range.</p></span><h4 class="">Throws</h4><div class="table"><div class="table-row" data-filterable-current=":kubit/commonMain" data-filterable-set=":kubit/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-arithmetic-exception/index.html"><span>Arithmetic</span