Changeset 13607 in project
 Timestamp:
 03/09/09 04:25:17 (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

wiki/eggref/4/err5rsarithmetic
r13603 r13607 463 463 <procedure>(bitwiseif MASK TRUE FALSE) => INTEGER</procedure> 464 464 465 Merge under mask.466 467 465 ==== bitwisetest? 468 466 469 467 <procedure>(bitwisetest? VALUE1 VALUE2) => BOOLEAN</procedure> 470 468 471 Any bits set in both {{VALUE1}} and {{VALUE2}}?472 473 469 ==== bitwisebitcount 474 470 475 471 <procedure>(bitwisebitcount VALUE) => INTEGER</procedure> 476 472 477 Count of set bits.478 479 473 ==== bitwiselength 480 474 481 475 <procedure>(bitwiselength VALUE) => INTEGER</procedure> 482 476 483 Minimum number of bits to represent.484 485 477 ==== bitwisefirstbitset 486 478 487 479 <procedure>(bitwisefirstbitset VALUE) => INTEGER</procedure> 488 480 489 Least significant bit set.490 491 481 ==== bitwiselastbitset 492 482 493 483 <procedure>(bitwiselastbitset VALUE) => INTEGER</procedure> 494 484 495 Most significant bit set.496 497 485 ==== bitwisebitset? 498 486 499 487 <procedure>(bitwisebitset? VALUE INDEX) => BOOLEAN</procedure> 500 488 501 Specific bit set?502 503 489 ==== bitwisecopybit 504 490 505 491 <procedure>(bitwisecopybit TO START BIT) => INTEGER</procedure> 506 492 507 Set bit.508 509 493 ==== bitwisebitfield 510 494 511 495 <procedure>(bitwisebitfield VALUE START END) => INTEGER</procedure> 512 496 513 Get bits.514 515 497 ==== bitwisecopybitfield 516 498 517 499 <procedure>(bitwisecopybitfield TO START END FROM) => INTEGER</procedure> 518 500 519 Set bits.520 521 501 ==== bitwiserotatebitfield 522 502 523 503 <procedure>(bitwiserotatebitfield VALUE START END COUNT) => INTEGER</procedure> 524 504 525 Rotate bits.526 527 505 ==== bitwisereverse 528 506 529 507 <procedure>(bitwisereverse VALUE COUNT) => INTEGER</procedure> 530 508 531 Reverse loworder bits.532 533 509 ==== bitwisereversebitfield 534 510 535 511 <procedure>(bitwisereversebitfield VALUE START END) => INTEGER</procedure> 536 512 537 Reverse bits.538 539 513 ==== bitwiselist>integer 540 514 541 515 <procedure>(bitwiselist>integer LIST) => INTEGER</procedure> 542 516 543 Converts list of boolean, leastsignificant to mostsignificant, to integer.544 545 517 ==== bitwiseinteger>list 546 518 547 519 <procedure>(bitwiseinteger>list VALUE [LENGTH]) => LIST</procedure> 548 520 549 Converts integer to list of boolean, leastsignificant to mostsignificant.550 551 521 ==== bitwisearithmeticshift 552 522 … … 573 543 <procedure>(pow2log2 VALUE) => INTEGER</procedure> 574 544 575 Returns {{2 * log2 ({{VALUE}})).545 Returns {{(* 2 (log2 VALUE))}}, but more efficient. 576 546 577 547 ===== boolean>bit … … 579 549 <procedure>(boolean>bit OBJECT) => INTEGER</procedure> 580 550 581 Returns {{0}} for false or zeroand {{1}} otherwise.551 Returns {{0}} for {{#f}} or {{0}} and {{1}} otherwise. 582 552 583 553 ==== Unchecked variants 584 554 585 These procedures have the same signature as the argument checked versions but555 These procedures have the same signature as the similarly named ones but 586 556 perform no argument checking. 587 557 … … 678 648 == Version history 679 649 680 ; 1.0.0 : 650 ; 1.0.0 : Chicken 4 release. 681 651 682 652
Note: See TracChangeset
for help on using the changeset viewer.