digitalmars.D - What's up with the 'cent' type?
- kinghajj (4/4) Aug 17 2004 It looks interesting... when will it be completed? 16-bytes can hold alo...
- Arcane Jill (21/26) Aug 17 2004 I wrote the class Int for that very purpose. Ints are unlimited precisio...
It looks interesting... when will it be completed? 16-bytes can hold alot of data ;) ... just think about the cryptology uses! When it is implemented, will there be phobos functions to take many other types (say, bytes/ubyes) and combine them into one cent?
Aug 17 2004
In article <cftnob$1e11$1 digitaldaemon.com>, kinghajj says...It looks interesting... when will it be completed? 16-bytes can hold alot of data ;) ... just think about the cryptology uses!I wrote the class Int for that very purpose. Ints are unlimited precision integers. You will find them in etc.bigint.bigint in Deimos on dsource. I notice you said "cryptology" instead of "cryptography". May I assume you have some cryptanalysis in mind? I'd be intrigued if so.When it is implemented,Don't know. But it the meantime, it would be pretty easy to fake it up, using something like: Of course (gripe) you still wouldn't be able to say but the actually arithmetic would be dead straightforward. In actual fact, you could implement ucent arithmetic entirely using the low-level functions in etc.bigint. Signed cents would need a little more work, but not much.will there be phobos functions to take many other types (say, bytes/ubyes) and combine them into one cent?I imagine it will be treated in exactly the same way as every other primitive integer type. So yes - use a union. Arcane Jill
Aug 17 2004