<divclass="platform-hinted UnderCoverText"data-platform-hinted="data-platform-hinted"><divclass="content sourceset-depenent-content"data-active=""data-togglable=":kmath-jafama:dokkaHtmlPartial/main"><pclass="paragraph">Integration with <ahref="https://github.com/jeffhain/jafama">Jafama</a>.</p><ul><li><pclass="paragraph">src/main/kotlin/space/kscience/kmath/jafama/ : Double ExtendedField implementations based on Jafama</p></li></ul><h2class=""> Artifact:</h2><pclass="paragraph">The Maven coordinates of this project are <code>space.kscience:kmath-jafama:0.3.0-dev-17</code>.</p><pclass="paragraph">Gradle:</p><divclass="sample-container"><codeclass=""theme="idea"><pre>repositories {<br> maven { url 'https://repo.kotlin.link' }<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation 'space.kscience:kmath-jafama:0.3.0-dev-17'<br>}</pre></code></div><pclass="paragraph">Gradle Kotlin DSL:</p><divclass="sample-container"><codeclass=""theme="idea"><pre>repositories {<br> maven("https://repo.kotlin.link")<br> mavenCentral()<br>}<br><br>dependencies {<br> implementation("space.kscience:kmath-jafama:0.3.0-dev-17")<br>}</pre></code></div><h2class=""> Example usage</h2><pclass="paragraph">All the <code>DoubleField</code> uses can be replaced with <code>JafamaDoubleField</code> or <code>StrictJafamaDoubleField</code>.</p><divclass="sample-container"><codeclass=""theme="idea"><pre>import space.kscience.kmath.jafama.*<br>import space.kscience.kmath.operations.*<br><br>fun main() {<br> val a = 2.0<br> val b = StrictJafamaDoubleField { exp(a) }<br> println(JafamaDoubleField { b + a })<br> println(StrictJafamaDoubleField { ln(b) })<br>}</pre></code></div><h2class=""> Performance</h2><pclass="paragraph">According to KMath benchmarks on GraalVM, Jafama functions are slower than JDK math; however, there are indications that on Hotspot Jafama is a bit faster.</p><divclass="sample-container"><codeclass=""theme="idea"><pre><pclass="paragraph">Can't find appropriate benchmark data. Try generating readme files after running benchmarks.</p></pre></code></div></div></div>