Further Reading........................................................................................................................................................................................................................... 191
Exercises....................................................................................................................................................................................................................................... 191
Chapter 12. Rings................................................................................................................ 194
Section 12.1. Interface.................................................................................................................................................................................................................. 194
Section 12.2. Implementation..................................................................................................................................................................................................... 198
Further Reading.......................................................................................................................................................................................................................... 207
Exercises...................................................................................................................................................................................................................................... 208
Chapter 13. Bit Vectors........................................................................................................ 210
Section 13.1. Interface.................................................................................................................................................................................................................. 210
Section 13.2. Implementation...................................................................................................................................................................................................... 213
Further Reading.......................................................................................................................................................................................................................... 224
Exercises...................................................................................................................................................................................................................................... 224
Chapter 14. Formatting....................................................................................................... 226
Section 14.1. Interface.................................................................................................................................................................................................................. 227
Section 14.2. Implementation..................................................................................................................................................................................................... 235
Further Reading.......................................................................................................................................................................................................................... 249
Exercises...................................................................................................................................................................................................................................... 250
Chapter 15. Low-Level Strings............................................................................................. 252
Section 15.1. Interface.................................................................................................................................................................................................................. 254
Section 15.2. Example: Printing Identifiers................................................................................................................................................................................ 260
Section 15.3. Implementation..................................................................................................................................................................................................... 262
Further Reading........................................................................................................................................................................................................................... 275
Exercises...................................................................................................................................................................................................................................... 276
Chapter 16. High-Level Strings........................................................................................... 280
Section 16.1. Interface................................................................................................................................................................................................................. 280
Section 16.2. Implementation..................................................................................................................................................................................................... 287
Further Reading.......................................................................................................................................................................................................................... 304
Exercises...................................................................................................................................................................................................................................... 305
Chapter 17. Extended-Precision Arithmetic........................................................................ 308
Section 17.1. Interface................................................................................................................................................................................................................. 308
Section 17.2. Implementation...................................................................................................................................................................................................... 314
Further Reading.......................................................................................................................................................................................................................... 332
Exercises...................................................................................................................................................................................................................................... 333
Chapter 18. Arbitrary-Precision Arithmetic........................................................................ 334
Section 18.1. Interface................................................................................................................................................................................................................. 334
Section 18.2. Example: A Calculator........................................................................................................................................................................................... 338
Section 18.3. Implementation..................................................................................................................................................................................................... 345
Further Reading.......................................................................................................................................................................................................................... 364
Exercises...................................................................................................................................................................................................................................... 365
Chapter 19. Multiple-Precision Arithmetic.......................................................................... 368
Section 19.1. Interface................................................................................................................................................................................................................. 369
Section 19.2. Example: Another Calculator................................................................................................................................................................................ 376
Section 19.3. Implementation..................................................................................................................................................................................................... 384
Further Reading........................................................................................................................................................................................................................... 413
Exercises....................................................................................................................................................................................................................................... 413
Chapter 20. Threads............................................................................................................ 416
Section 20.1. Interfaces................................................................................................................................................................................................................ 419
Section 20.2. Examples............................................................................................................................................................................................................... 429
Section 20.3. Implementations................................................................................................................................................................................................... 442
Further Reading........................................................................................................................................................................................................................... 474
Exercises...................................................................................................................................................................................................................................... 476
Interface Summary............................................................................................................. 480
AP................................................................................................................................................................................................................................................. 481
Arena........................................................................................................................................................................................................................................... 482
Arith............................................................................................................................................................................................................................................. 483
Array............................................................................................................................................................................................................................................ 483
ArrayRep...................................................................................................................................................................................................................................... 484
Assert........................................................................................................................................................................................................................................... 485
Atom............................................................................................................................................................................................................................................ 485
Bit................................................................................................................................................................................................................................................. 485
Chan............................................................................................................................................................................................................................................. 487
Except.......................................................................................................................................................................................................................................... 487
Fmt.............................................................................................................................................................................................................................................. 488
List............................................................................................................................................................................................................................................... 489
Mem............................................................................................................................................................................................................................................. 490
MP................................................................................................................................................................................................................................................ 491
Ring.............................................................................................................................................................................................................................................. 494
Sem.............................................................................................................................................................................................................................................. 495
Seq............................................................................................................................................................................................................................................... 496
Set................................................................................................................................................................................................................................................ 497
- 1
- 2
- 3
- 4
- 5
前往页