mirror of
https://github.com/gbdev/rgbds.git
synced 2025-12-01 15:27:48 +00:00
11
test/asm/fixed-point-precision.asm
Normal file
11
test/asm/fixed-point-precision.asm
Normal file
@@ -0,0 +1,11 @@
|
||||
f1 = 3.1
|
||||
f2 = 5.2
|
||||
pm = MUL(f1, f2)
|
||||
pr = 16.12
|
||||
println "`3.1`: {9.6f:f1} -> ${08x:f1}"
|
||||
println "`5.2`: {9.6f:f2} -> ${08x:f2}"
|
||||
println "`MUL`: {9.6f:pm} -> ${08x:pm}"
|
||||
println "`16.12`: {9.6f:pr} -> ${08x:pr}"
|
||||
|
||||
fl = 6.283185
|
||||
println "`6.283185`: {.6f:fl} -> ${08x:fl}"
|
||||
0
test/asm/fixed-point-precision.err
Normal file
0
test/asm/fixed-point-precision.err
Normal file
5
test/asm/fixed-point-precision.out
Normal file
5
test/asm/fixed-point-precision.out
Normal file
@@ -0,0 +1,5 @@
|
||||
`3.1`: 3.100007 -> $0003199a
|
||||
`5.2`: 5.199997 -> $00053333
|
||||
`MUL`: 16.120026 -> $00101eba
|
||||
`16.12`: 16.119996 -> $00101eb8
|
||||
`6.283185`: 6.283188 -> $0006487f
|
||||
Binary file not shown.
Reference in New Issue
Block a user