FORTH for the PC-G850(V)(S)
|
01-05-2023, 07:52 AM
(This post was last modified: 01-06-2023 06:42 AM by F-73P.)
Post: #15
|
|||
|
|||
RE: FORTH for the PC-G850(V)(S)
Brilliant!
I'm using a relatively simple but inefficient approach for converting strings to single-precision floating-point: use multiple-precision arithmetic and tables to find integers s,e such that s x 2^e = user input, where s element of [2^23,2^24) and is rounded up. Then use s,e to obtain the IEEE 754 single-precision encoding. Its working for the few values I've tested (0.5 -> 0x3F000000, 2 -> 0x40000000 and 2.5 -> 0x40200000). Once I've added higher powers of 10 to the table and parsing exponents I'll try smaller and bigger values. For floating-point to string I'll use the first algorithm in this paper. The C language combines all the power of assembly language with all the ease-of-use of assembly language |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)