Post Reply 
Searching for decimal library for RP Pico
08-31-2023, 01:49 PM
Post: #8
RE: Searching for decimal library for RP Pico
(08-26-2023 07:51 AM)EdS2 Wrote:  Great links - thanks!

blackjetrock, I'd be interested to hear about your progress, and what package you choose and what size it is.

I found this repository:

https://github.com/edwig/BCD/tree/master

which has a couple of libraries that looked to be close to what I was after. One is BCD and the other is ICD (Integer Coded Decimal). They are both C++ for some microsoft dialect, so I have mangled the Icd library so that it compiles under Linux and also ported it over to the Pio where it does indeed run.

My mangled code is here:

https://github.com/blackjetrock/bcd.git

This is definitely a mangled work in progress. I've run some quick tests on the Pico and it appears to work.

That's the good news. The bad news is that it doesn't do exponents, and so the range is about +/- 1E38 to +/- 1E-38. So almost what I am after. I think it might do.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Searching for decimal library for RP Pico - blackjetrock - 08-31-2023 01:49 PM



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