Commit Graph

28 Commits

Author SHA1 Message Date
Simon Forman 2cf2b56751 Dang it... 2022-10-10 18:39:35 -07:00
Simon Forman 92ffefd6f0 Minor cleanup. 2022-10-06 18:11:24 -07:00
Simon Forman bad1a909c7 Just for me...
(That's how you look all clever, but it's a dick move removing the
commentary like that.)
2022-10-06 15:36:16 -07:00
Simon Forman e085218490 Bisect for the win! 2022-10-06 15:34:34 -07:00
Simon Forman 1007cceab5 find_greatest()
I think it's ready to use...
2022-10-06 15:31:24 -07:00
Simon Forman d8b346958a Finish lil_divmod. 2022-10-06 08:04:54 -07:00
Simon Forman c07a9e3ed9 One more lil bug squash.
Subsidiary functions...

Fuzz FTW.
2022-10-05 12:31:35 -07:00
Simon Forman 0e283f1052 Div Mod of same sign ints.
That seems to be that.
2022-10-05 12:21:46 -07:00
Simon Forman 634ff157bc Flush out and squash some bugs. 2022-10-05 12:19:39 -07:00
Simon Forman df42bbcb7d I think I figured something out... 2022-10-05 10:16:47 -07:00
Simon Forman 339852a435 Kinda sorta not really working,
as in broken.

This is getting out of hand.
2022-10-05 09:15:41 -07:00
Simon Forman 0ee3d00537 Almost got it... 2022-10-05 08:49:35 -07:00
Simon Forman 70ea2c3f53 Divmod, yeah? 2022-10-05 08:27:01 -07:00
Simon Forman e2f8d236cc Minor cleanup.
I almost can't believe I did it.  I guess I thought it would be harder
or more involved.  Maybe divmod will be a pill?

Kinda relaxing after wasting the weekend nerd-sniped by curses.
2022-10-04 22:21:58 -07:00
Simon Forman 233f7431d6 Copyright and executable bit 2022-10-04 22:19:14 -07:00
Simon Forman 918e77b678 Minor cleanup. 2022-10-04 22:18:22 -07:00
Simon Forman beafe3aff0 Minor cleanup; multiplication.
I forgot to commit after cleanup but before implementing multiplication
so this commit is kind of a mess.

Anyway, it works.  :D
2022-10-04 22:06:49 -07:00
Simon Forman 217adaa318 test_Subtraction_large_from_small 2022-10-04 16:41:09 -07:00
Simon Forman 4cea474166 I guess subtraction works!? 2022-10-04 16:28:43 -07:00
Simon Forman 70b8bbdc0e Adding two negative numbers. 2022-10-04 12:10:32 -07:00
Simon Forman 0333c3c522 That was easy! Add BigInts of the same sign. 2022-10-04 12:05:41 -07:00
Simon Forman 0817dcf4b1 Red... (Green, Refactor)
TDD FTW!
2022-10-04 11:37:55 -07:00
Simon Forman 21bd4bcfd3 Not using ctypes; test_twice_min 2022-10-04 11:31:40 -07:00
Simon Forman f0b6f4036a BitInt start; unittest. 2022-10-04 11:20:14 -07:00
Simon Forman 53bea5f59b That was easy...
but it breaks associativity or is it commutivity?

Anyway you can't add THREE or more things in one expression (yet)
because adding OberonInt objects returns a two-tuple.

I could adjust the semantics of ObInt to accept such two-tuples and do
add_with_carry() but that's probably more trouble than it's worth.

Just gotta be careful with math expressions, eh?
2022-10-04 08:53:32 -07:00
Simon Forman 690f157ac8 Switch to double-underscore method names.
Worry about type conversions later.
2022-10-04 08:49:40 -07:00
Simon Forman e2f107d1bb Subtraction. 2022-10-04 08:47:39 -07:00
Simon Forman 6ecf681d3a BigInts in terms of Oberon Ints
Oberon RISC has Two's Complement 32-bit ints with carry.

So far so good.
2022-10-04 08:32:04 -07:00