Post Reply 
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
FORTH for the PC-G850(V)(S) - robve - 11-06-2022, 01:56 PM
RE: FORTH for the PC-G850(V)(S) - robve - 11-08-2022, 09:23 PM
RE: FORTH for the PC-G850(V)(S) - Sukiari - 11-09-2022, 07:45 PM
RE: FORTH for the PC-G850(V)(S) - robve - 11-10-2022, 09:36 PM
RE: FORTH for the PC-G850(V)(S) - xerxes - 11-11-2022, 01:55 AM
RE: FORTH for the PC-G850(V)(S) - robve - 11-12-2022, 12:28 AM
RE: FORTH for the PC-G850(V)(S) - robve - 11-12-2022, 06:26 PM
RE: FORTH for the PC-G850(V)(S) - robve - 11-13-2022, 10:15 PM
RE: FORTH for the PC-G850(V)(S) - robve - 11-14-2022, 07:35 PM
RE: FORTH for the PC-G850(V)(S) - robve - 11-29-2022, 07:56 PM
RE: FORTH for the PC-G850(V)(S) - robve - 12-07-2022, 03:07 AM
RE: FORTH for the PC-G850(V)(S) - robve - 01-01-2023, 05:45 PM
RE: FORTH for the PC-G850(V)(S) - F-73P - 01-03-2023, 03:32 AM
RE: FORTH for the PC-G850(V)(S) - robve - 01-03-2023, 06:57 PM
RE: FORTH for the PC-G850(V)(S) - F-73P - 01-05-2023 07:52 AM
RE: FORTH for the PC-G850(V)(S) - robve - 05-20-2023, 11:11 PM
RE: FORTH for the PC-G850(V)(S) - robve - 07-31-2023, 01:53 AM



User(s) browsing this thread: 1 Guest(s)