Error in Simple_Numbers library object
Phil Pilgrim (PhiPi)
Posts: 23,514
Here's the program:
Here's what gets output:
-Phil
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ pst : "Parallax Serial Terminal" num : "Simple_Numbers" PUB start | seed, value, best, worst, sum, n pst.start(9600) pst.str(num.decx(1_580_219_585, 10))
Here's what gets output:
0170154177
-Phil
Comments
"div * 10" in this case is over 32 bits.
Thanks. I hadn't bothered yet to find the cause, but I'm sure you're right.
-Phil
I think most of it originated in Tim Moore's four port serial object.
The number displays correctly with this modified method (there are actually two different methods used).
It should be cleaned up before being added to Simple_Numbers officially.
Again, most of it is not my code.
-Phil