(49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer
|
03-12-2018, 01:20 AM
Post: #2
|
|||
|
|||
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer
That's a nice way to use →H, Gerald!
A couple of minor issues: - Sign is lost - 0 (exact integer zero) has a unique representation in memory, so the algorithm generates an error for that specific input I hope you don't mind my offering an alternative. This is bigger (mostly due to the Saturn code block), but in addition to handling the above issues, it also: - has overloaded handlers for lists and strings so that all three types of objects can be passed to it - is a wee bit faster for exact integers Size: 108.5 bytes Cksum: # 172Ah Code: :: |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - Gerald H - 01-14-2018, 02:09 PM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - DavidM - 03-12-2018 01:20 AM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - John Keith - 03-13-2018, 08:19 PM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - TheKaneB - 03-14-2018, 12:36 AM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - rprosperi - 03-14-2018, 01:17 AM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - DavidM - 03-14-2018, 02:55 AM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - TheKaneB - 03-14-2018, 12:00 PM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - Gerald H - 03-20-2018, 08:09 PM
RE: (49G, 49g+ & 50g) ZREV: Speedily Reverse Digits of Integer - DavidM - 03-21-2018, 02:25 AM
|
User(s) browsing this thread: 2 Guest(s)