-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de72b73
commit 9a810f9
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
examples/src/main/kotlin/space/kscience/kmath/jafama/KMathaJafamaDemo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright 2018-2021 KMath contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
package space.kscience.kmath.jafama | ||
|
||
import net.jafama.FastMath | ||
|
||
|
||
fun main(){ | ||
val a = JafamaDoubleField.number(2.0) | ||
val b = StrictJafamaDoubleField.power(FastMath.E,a) | ||
|
||
println(JafamaDoubleField.add(b,a)) | ||
println(StrictJafamaDoubleField.ln(b)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Module kmath-jafama | ||
|
||
Jafama based implementation of DoubleField of kmath-operations. | ||
|
||
- JafamaDoubleField : DoubleField implementation using FastMath | ||
- StrictJafamaDoubleField - DoubleField implementation using StrictFastMath | ||
|
||
## Examples | ||
|
||
Different Operations on DoubleField | ||
|
||
```kotlin | ||
package space.kscience.kmath.jafama | ||
|
||
import net.jafama.FastMath | ||
|
||
|
||
fun main(){ | ||
val a = JafamaDoubleField.number(2.0) | ||
val b = StrictJafamaDoubleField.power(FastMath.E,a) | ||
println(JafamaDoubleField.add(b,a)) | ||
println(StrictJafamaDoubleField.ln(b)) | ||
} | ||
``` |