Subject: Type-Level arithmetic library Newsgroups: gmane.comp.lang.haskell.general Date: Tuesday 31st January 2006 02:12:57 UTC (over 11 years ago) While cleaning up my home directory, I discovered some code I worked on a while ago which implements type level arithmetic. I have cleaned it up and decided to release. This library includes the following operations on type level naturals: addition subtraction multiplication division remainder GCD and also contains the following predicates test for zero test for equality < > <= >= This library uses a binary representation and can handle numbers at the order of 10^15 (at least). It also contains a test suite to help validate the somewhat unintuitive algorithms. You can retrieve this library with the following command darcs get --partial --tag '0.1' http://www.eecs.tufts.edu/~rdocki01/ typenats/ Enjoy, Rob Dockins PS Please let me know if you come up with useful ways to use this library! (I'm mostly just curious) Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG |
|||