diff --git a/fix32.tal b/fix32.tal index 768da92..75aca42 100644 --- a/fix32.tal +++ b/fix32.tal @@ -284,7 +284,7 @@ INC2 GTH2k ?&fraction !&round ( limit* pos+1 [wlo* whi* 10s+digit*] ) &dotend ( limit* pos* [wlo* whi* s*] ) LIT2r 000a MUL2r ( limit* pos* [wlo* whi* 10s*] ) - INC2 GTH2k ?&fraction !&finish ( limit* pos+1* [wlo* whi* 10s*] ) + INC2 GTH2k ?&dotend !&finish ( limit* pos+1* [wlo* whi* 10s*] ) &round ( limit* limit* [wlo* whi* s*] ) LDAk #00 EQU ?&finish ( limit* limit* [wlo* whi* s*] ) LDAk #30 LTH ?&error2 ( limit* limit* [wlo* whi* s*] ) diff --git a/test-fix32.tal b/test-fix32.tal index 78cf80f..0107c58 100644 --- a/test-fix32.tal +++ b/test-fix32.tal @@ -92,6 +92,11 @@ LIT "$ #18 DEO #0a18 DEO ;data/str17 x32-parse x32-emit #0a18 DEO + ;data/str18 x32-parse x32-emit #0a18 DEO + ;data/str19 x32-parse x32-emit #0a18 DEO + ;data/str20 x32-parse x32-emit #0a18 DEO + ;data/str21 x32-parse x32-emit #0a18 DEO + ;data/str22 x32-parse x32-emit #0a18 DEO #800f DEO BRK @@ -140,4 +145,9 @@ &str14 "0.1245 00 &str15 "0.1255 00 &str16 "0.1265 00 - &str17 "1.5 00 + &str17 "1.500 00 + &str18 "1.5 00 + &str19 "0.5 00 + &str20 ".5 00 + &str21 "1.000 00 + &str22 "1. 00