increased floating point multiplication precision
This commit is contained in:
1 parent
e11bfe5a87
commit
56a1431db8
1 file changed
+24
@@ -8,6 +8,16 @@
|
||||
|
||||
mul_FAC2_FAC1_shift:
|
||||
|
||||
// Check if rounding is needed
|
||||
|
||||
php
|
||||
clc
|
||||
lda RESHO+4
|
||||
bpl !+
|
||||
sec
|
||||
!:
|
||||
// Copy bytes
|
||||
|
||||
lda RESHO+3
|
||||
sta RESHO+4
|
||||
lda RESHO+2
|
||||
@@ -18,5 +28,19 @@ mul_FAC2_FAC1_shift:
|
||||
sta RESHO+1
|
||||
lda #$00
|
||||
sta RESHO+0
|
||||
bcc !+
|
||||
|
||||
// Perform rounding
|
||||
|
||||
inc RESHO+4
|
||||
bne !+
|
||||
inc RESHO+3
|
||||
bne !+
|
||||
inc RESHO+2
|
||||
bne !+
|
||||
inc RESHO+1
|
||||
bne !+
|
||||
inc RESHO+0
|
||||
!:
|
||||
plp
|
||||
rts
|
||||
Reference in new issue
Block a user