This commit is contained in:
minjaesong
2017-05-11 03:12:10 +09:00
parent 0d778c86bd
commit 8651a11ae5
3 changed files with 65 additions and 27 deletions

View File

@@ -23,6 +23,8 @@ class Float16() {
bits = Float16.fromFloat(fval)
}
// operators are stripped: you don't calculate from FP16; this is only for storing values //
companion object {
fun toFloat(hbits: Short): Float {
val hbits = hbits.toInt().and(0xFFFF)