Changeset 0a6da484
- Timestamp:
- Apr 15, 2020, 3:00:15 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- f017af6
- Parents:
- 912ccbcf (diff), 21923bd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bitmanip.hfa
r912ccbcf r0a6da484 11 11 // Created On : Sat Mar 14 18:12:27 2020 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Mon Apr 13 22:37:03202014 // Update Count : 11 013 // Last Modified On : Wed Apr 15 10:51:01 2020 14 // Update Count : 119 15 15 // 16 16 … … 88 88 89 89 // Returns n aligned at the floor of align, clear bits above or equal to align, giving n % align. 90 // signed char floor2( signed char n, signedchar align ) { /*assert( is_pow2( align ) );*/ return n & -align; }91 //unsigned char floor2( unsigned char n, unsigned char align ) { /*assert( is_pow2( align ) );*/ return n & -align; }92 // short int floor2( short int n, unsignedshort int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }93 //unsigned short int floor2( unsigned short int n, unsigned short int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }94 // int floor2( int n, unsignedint align ) { /*assert( is_pow2( align ) );*/ return n & -align; }95 //unsigned int floor2( unsigned int n, unsigned int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }96 // long int floor2( long int n, unsignedlong int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }97 //unsigned long int floor2( unsigned long int n, unsigned long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }98 // long long int floor2( long long int n, unsignedlong long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }99 //unsigned long long int floor2( unsigned long long int n, unsigned long long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; }90 signed char floor2( signed char n, char align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 91 unsigned char floor2( unsigned char n, unsigned char align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 92 short int floor2( short int n, short int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 93 unsigned short int floor2( unsigned short int n, unsigned short int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 94 int floor2( int n, int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 95 unsigned int floor2( unsigned int n, unsigned int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 96 long int floor2( long int n, long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 97 unsigned long int floor2( unsigned long int n, unsigned long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 98 long long int floor2( long long int n, long long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 99 unsigned long long int floor2( unsigned long long int n, unsigned long long int align ) { /*assert( is_pow2( align ) );*/ return n & -align; } 100 100 101 forall( otype T | { T ?&?( T, T ); T -?( T ); } )102 T floor2( T n, T align ) { /* assert( is_pow2( align ) ); */ return n & -align; }101 // forall( otype T | { T ?&?( T, T ); T -?( T ); } ) 102 // T floor2( T n, T align ) { /* assert( is_pow2( align ) ); */ return n & -align; } 103 103 104 forall( otype T | { T ?/?( T, T ); T ?*?( T, T ); } ) 105 T floor( T n, T align ) { return n / align * align; } 104 signed char floor( signed char n, char align ) { return n / align * align; } 105 unsigned char floor( unsigned char n, unsigned char align ) { return n / align * align; } 106 short int floor( short int n, short int align ) { return n / align * align; } 107 unsigned short int floor( unsigned short int n, unsigned short int align ) { return n / align * align; } 108 int floor( int n, int align ) { return n / align * align; } 109 unsigned int floor( unsigned int n, unsigned int align ) { return n / align * align; } 110 long int floor( long int n, long int align ) { return n / align * align; } 111 unsigned long int floor( unsigned long int n, unsigned long int align ) { return n / align * align; } 112 long long int floor( long long int n, long long int align ) { return n / align * align; } 113 unsigned long long int floor( unsigned long long int n, unsigned long long int align ) { return n / align * align; } 114 115 // forall( otype T | { T ?/?( T, T ); T ?*?( T, T ); } ) 116 // T floor( T n, T align ) { return n / align * align; } 106 117 107 118 // Returns n aligned at the ceiling of align, negate, round down, negate is the same as round up. 108 forall( otype T | { T floor2( T, T ); T -?( T ); } ) 109 T ceiling2( T n, T align ) { /* assert( is_pow2( align ) ); */ return -floor2( -n, align ); } 119 signed char ceiling2( signed char n, char align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 120 unsigned char ceiling2( unsigned char n, unsigned char align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 121 short int ceiling2( short int n, short int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 122 unsigned short int ceiling2( unsigned short int n, unsigned short int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 123 int ceiling2( int n, int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 124 unsigned int ceiling2( unsigned int n, unsigned int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 125 long int ceiling2( long int n, long int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 126 unsigned long int ceiling2( unsigned long int n, unsigned long int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 127 long long int ceiling2( long long int n, long long int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 128 unsigned long long int ceiling2( unsigned long long int n, unsigned long long int align ) { /*assert( is_pow2( align ) );*/ return -floor2( -n, align ); } 110 129 111 forall( otype T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T ); T ?/?( T, T ); } ) 112 T ceiling( T n, T align ) { return (n + (align - (T){1})) / align; } 130 // forall( otype T | { T floor2( T, T ); T -?( T ); } ) 131 // T ceiling2( T n, T align ) { /* assert( is_pow2( align ) ); */ return -floor2( -n, align ); } 132 133 signed char ceiling( signed char n, char align ) { return (n + (align - 1)) / align; } 134 unsigned char ceiling( unsigned char n, unsigned char align ) { return (n + (align - 1)) / align; } 135 short int ceiling( short int n, short int align ) { return (n + (align - 1)) / align; } 136 unsigned short int ceiling( unsigned short int n, unsigned short int align ) { return (n + (align - 1)) / align; } 137 int ceiling( int n, int align ) { return (n + (align - 1)) / align; } 138 unsigned int ceiling( unsigned int n, unsigned int align ) { return (n + (align - 1)) / align; } 139 long int ceiling( long int n, long int align ) { return (n + (align - 1)) / align; } 140 unsigned long int ceiling( unsigned long int n, unsigned long int align ) { return (n + (align - 1)) / align; } 141 long long int ceiling( long long int n, long long int align ) { return (n + (align - 1)) / align; } 142 unsigned long long int ceiling( unsigned long long int n, unsigned long long int align ) { return (n + (align - 1)) / align; } 143 144 // forall( otype T | { void ?{}( T &, one_t ); T ?+?( T, T ); T ?-?( T, T ); T ?/?( T, T ); } ) 145 // T ceiling( T n, T align ) { return (n + (align - (T){1})) / align; } 113 146 } // distribution 114 147 -
tests/.expect/bitmanip3.x64.txt
r912ccbcf r0a6da484 427 427 short int 428 428 floor(0, 0) = 0, floor(2, 0) = 0, floor(-2, 0) = 0 429 floor(1 1) = 1, floor(3 1) = 3, floor(-31) = -3430 floor(2 2) = 2, floor(4 2) = 4, floor(-42) = -4431 floor(4 4) = 4, floor(6 4) = 4, floor(-64) = -8432 floor(8 8) = 8, floor(10 8) = 8, floor(-108) = -16433 floor(16 16) = 16, floor(18 16) = 16, floor(-1816) = -32434 floor(32 32) = 32, floor(34 32) = 32, floor(-3432) = -64435 floor(64 64) = 64, floor(66 64) = 64, floor(-6664) = -128436 floor(128 128) = 128, floor(130 128) = 128, floor(-130128) = -256437 floor(256 256) = 256, floor(258 256) = 256, floor(-258256) = -512438 floor(512 512) = 512, floor(514 512) = 512, floor(-514512) = -1024439 floor(1024 1024) = 1024, floor(1026 1024) = 1024, floor(-10261024) = -2048440 floor(2048 2048) = 2048, floor(2050 2048) = 2048, floor(-20502048) = -4096441 floor(4096 4096) = 4096, floor(4098 4096) = 4096, floor(-40984096) = -8192442 floor(8192 8192) = 8192, floor(8194 8192) = 8192, floor(-81948192) = -16384443 floor(16384 16384) = 16384, floor(16386 16384) = 16384, floor(-1638616384) = -32768444 floor(-32768 -32768) = -32768, floor(-32766 -32768) = -32768, floor(32766-32768) = 0429 floor(1, 1) = 1, floor(3, 1) = 3, floor(-3, 1) = -3 430 floor(2, 2) = 2, floor(4, 2) = 4, floor(-4, 2) = -4 431 floor(4, 4) = 4, floor(6, 4) = 4, floor(-6, 4) = -8 432 floor(8, 8) = 8, floor(10, 8) = 8, floor(-10, 8) = -16 433 floor(16, 16) = 16, floor(18, 16) = 16, floor(-18, 16) = -32 434 floor(32, 32) = 32, floor(34, 32) = 32, floor(-34, 32) = -64 435 floor(64, 64) = 64, floor(66, 64) = 64, floor(-66, 64) = -128 436 floor(128, 128) = 128, floor(130, 128) = 128, floor(-130, 128) = -256 437 floor(256, 256) = 256, floor(258, 256) = 256, floor(-258, 256) = -512 438 floor(512, 512) = 512, floor(514, 512) = 512, floor(-514, 512) = -1024 439 floor(1024, 1024) = 1024, floor(1026, 1024) = 1024, floor(-1026, 1024) = -2048 440 floor(2048, 2048) = 2048, floor(2050, 2048) = 2048, floor(-2050, 2048) = -4096 441 floor(4096, 4096) = 4096, floor(4098, 4096) = 4096, floor(-4098, 4096) = -8192 442 floor(8192, 8192) = 8192, floor(8194, 8192) = 8192, floor(-8194, 8192) = -16384 443 floor(16384, 16384) = 16384, floor(16386, 16384) = 16384, floor(-16386, 16384) = -32768 444 floor(-32768, -32768) = -32768, floor(-32766, -32768) = -32768, floor(32766, -32768) = 0 445 445 446 446 unsigned short int … … 668 668 669 669 long long int 670 floor(0 0) = 0, floor(2 0) = 0, floor(-20) = 0671 floor(1 1) = 1, floor(3 1) = 3, floor(-31) = -3672 floor(2 2) = 2, floor(4 2) = 4, floor(-42) = -4673 floor(4 4) = 4, floor(6 4) = 4, floor(-64) = -8674 floor(8 8) = 8, floor(10 8) = 8, floor(-108) = -16675 floor(16 16) = 16, floor(18 16) = 16, floor(-1816) = -32676 floor(32 32) = 32, floor(34 32) = 32, floor(-3432) = -64677 floor(64 64) = 64, floor(66 64) = 64, floor(-6664) = -128678 floor(128 128) = 128, floor(130 128) = 128, floor(-130128) = -256679 floor(256 256) = 256, floor(258 256) = 256, floor(-258256) = -512680 floor(512 512) = 512, floor(514 512) = 512, floor(-514512) = -1024681 floor(1024 1024) = 1024, floor(1026 1024) = 1024, floor(-10261024) = -2048682 floor(2048 2048) = 2048, floor(2050 2048) = 2048, floor(-20502048) = -4096683 floor(4096 4096) = 4096, floor(4098 4096) = 4096, floor(-40984096) = -8192684 floor(8192 8192) = 8192, floor(8194 8192) = 8192, floor(-81948192) = -16384685 floor(16384 16384) = 16384, floor(16386 16384) = 16384, floor(-1638616384) = -32768686 floor(32768 32768) = 32768, floor(32770 32768) = 32768, floor(-3277032768) = -65536687 floor(65536 65536) = 65536, floor(65538 65536) = 65536, floor(-6553865536) = -131072688 floor(131072 131072) = 131072, floor(131074 131072) = 131072, floor(-131074131072) = -262144689 floor(262144 262144) = 262144, floor(262146 262144) = 262144, floor(-262146262144) = -524288690 floor(524288 524288) = 524288, floor(524290 524288) = 524288, floor(-524290524288) = -1048576691 floor(1048576 1048576) = 1048576, floor(1048578 1048576) = 1048576, floor(-10485781048576) = -2097152692 floor(2097152 2097152) = 2097152, floor(2097154 2097152) = 2097152, floor(-20971542097152) = -4194304693 floor(4194304 4194304) = 4194304, floor(4194306 4194304) = 4194304, floor(-41943064194304) = -8388608694 floor(8388608 8388608) = 8388608, floor(8388610 8388608) = 8388608, floor(-83886108388608) = -16777216695 floor(16777216 16777216) = 16777216, floor(16777218 16777216) = 16777216, floor(-1677721816777216) = -33554432696 floor(33554432 33554432) = 33554432, floor(33554434 33554432) = 33554432, floor(-3355443433554432) = -67108864697 floor(67108864 67108864) = 67108864, floor(67108866 67108864) = 67108864, floor(-6710886667108864) = -134217728698 floor(134217728 134217728) = 134217728, floor(134217730 134217728) = 134217728, floor(-134217730134217728) = -268435456699 floor(268435456 268435456) = 268435456, floor(268435458 268435456) = 268435456, floor(-268435458268435456) = -536870912700 floor(536870912 536870912) = 536870912, floor(536870914 536870912) = 536870912, floor(-536870914536870912) = -1073741824701 floor(1073741824 1073741824) = 1073741824, floor(1073741826 1073741824) = 1073741824, floor(-10737418261073741824) = -2147483648702 floor(2147483648 2147483648) = 2147483648, floor(2147483650 2147483648) = 2147483648, floor(-21474836502147483648) = -4294967296703 floor(4294967296 4294967296) = 4294967296, floor(4294967298 4294967296) = 4294967296, floor(-42949672984294967296) = -8589934592704 floor(8589934592 8589934592) = 8589934592, floor(8589934594 8589934592) = 8589934592, floor(-85899345948589934592) = -17179869184705 floor(17179869184 17179869184) = 17179869184, floor(17179869186 17179869184) = 17179869184, floor(-1717986918617179869184) = -34359738368706 floor(34359738368 34359738368) = 34359738368, floor(34359738370 34359738368) = 34359738368, floor(-3435973837034359738368) = -68719476736707 floor(68719476736 68719476736) = 68719476736, floor(68719476738 68719476736) = 68719476736, floor(-6871947673868719476736) = -137438953472708 floor(137438953472 137438953472) = 137438953472, floor(137438953474 137438953472) = 137438953472, floor(-137438953474137438953472) = -274877906944709 floor(274877906944 274877906944) = 274877906944, floor(274877906946 274877906944) = 274877906944, floor(-274877906946274877906944) = -549755813888710 floor(549755813888 549755813888) = 549755813888, floor(549755813890 549755813888) = 549755813888, floor(-549755813890549755813888) = -1099511627776711 floor(1099511627776 1099511627776) = 1099511627776, floor(1099511627778 1099511627776) = 1099511627776, floor(-10995116277781099511627776) = -2199023255552712 floor(2199023255552 2199023255552) = 2199023255552, floor(2199023255554 2199023255552) = 2199023255552, floor(-21990232555542199023255552) = -4398046511104713 floor(4398046511104 4398046511104) = 4398046511104, floor(4398046511106 4398046511104) = 4398046511104, floor(-43980465111064398046511104) = -8796093022208714 floor(8796093022208 8796093022208) = 8796093022208, floor(8796093022210 8796093022208) = 8796093022208, floor(-87960930222108796093022208) = -17592186044416715 floor(17592186044416 17592186044416) = 17592186044416, floor(17592186044418 17592186044416) = 17592186044416, floor(-1759218604441817592186044416) = -35184372088832716 floor(35184372088832 35184372088832) = 35184372088832, floor(35184372088834 35184372088832) = 35184372088832, floor(-3518437208883435184372088832) = -70368744177664717 floor(70368744177664 70368744177664) = 70368744177664, floor(70368744177666 70368744177664) = 70368744177664, floor(-7036874417766670368744177664) = -140737488355328718 floor(140737488355328 140737488355328) = 140737488355328, floor(140737488355330 140737488355328) = 140737488355328, floor(-140737488355330140737488355328) = -281474976710656719 floor(281474976710656 281474976710656) = 281474976710656, floor(281474976710658 281474976710656) = 281474976710656, floor(-281474976710658281474976710656) = -562949953421312720 floor(562949953421312 562949953421312) = 562949953421312, floor(562949953421314 562949953421312) = 562949953421312, floor(-562949953421314562949953421312) = -1125899906842624721 floor(1125899906842624 1125899906842624) = 1125899906842624, floor(1125899906842626 1125899906842624) = 1125899906842624, floor(-11258999068426261125899906842624) = -2251799813685248722 floor(2251799813685248 2251799813685248) = 2251799813685248, floor(2251799813685250 2251799813685248) = 2251799813685248, floor(-22517998136852502251799813685248) = -4503599627370496723 floor(4503599627370496 4503599627370496) = 4503599627370496, floor(4503599627370498 4503599627370496) = 4503599627370496, floor(-45035996273704984503599627370496) = -9007199254740992724 floor(9007199254740992 9007199254740992) = 9007199254740992, floor(9007199254740994 9007199254740992) = 9007199254740992, floor(-90071992547409949007199254740992) = -18014398509481984725 floor(18014398509481984 18014398509481984) = 18014398509481984, floor(18014398509481986 18014398509481984) = 18014398509481984, floor(-1801439850948198618014398509481984) = -36028797018963968726 floor(36028797018963968 36028797018963968) = 36028797018963968, floor(36028797018963970 36028797018963968) = 36028797018963968, floor(-3602879701896397036028797018963968) = -72057594037927936727 floor(72057594037927936 72057594037927936) = 72057594037927936, floor(72057594037927938 72057594037927936) = 72057594037927936, floor(-7205759403792793872057594037927936) = -144115188075855872728 floor(144115188075855872 144115188075855872) = 144115188075855872, floor(144115188075855874 144115188075855872) = 144115188075855872, floor(-144115188075855874144115188075855872) = -288230376151711744729 floor(288230376151711744 288230376151711744) = 288230376151711744, floor(288230376151711746 288230376151711744) = 288230376151711744, floor(-288230376151711746288230376151711744) = -576460752303423488730 floor(576460752303423488 576460752303423488) = 576460752303423488, floor(576460752303423490 576460752303423488) = 576460752303423488, floor(-576460752303423490576460752303423488) = -1152921504606846976731 floor(1152921504606846976 1152921504606846976) = 1152921504606846976, floor(1152921504606846978 1152921504606846976) = 1152921504606846976, floor(-11529215046068469781152921504606846976) = -2305843009213693952732 floor(2305843009213693952 2305843009213693952) = 2305843009213693952, floor(2305843009213693954 2305843009213693952) = 2305843009213693952, floor(-23058430092136939542305843009213693952) = -4611686018427387904733 floor(4611686018427387904 4611686018427387904) = 4611686018427387904, floor(4611686018427387906 4611686018427387904) = 4611686018427387904, floor(-46116860184273879064611686018427387904) = -9223372036854775808734 floor(-9223372036854775808 -9223372036854775808) = -9223372036854775808, floor(-9223372036854775806 -9223372036854775808) = -9223372036854775808, floor(9223372036854775806-9223372036854775808) = 0670 floor(0, 0) = 0, floor(2, 0) = 0, floor(-2, 0) = 0 671 floor(1, 1) = 1, floor(3, 1) = 3, floor(-3, 1) = -3 672 floor(2, 2) = 2, floor(4, 2) = 4, floor(-4, 2) = -4 673 floor(4, 4) = 4, floor(6, 4) = 4, floor(-6, 4) = -8 674 floor(8, 8) = 8, floor(10, 8) = 8, floor(-10, 8) = -16 675 floor(16, 16) = 16, floor(18, 16) = 16, floor(-18, 16) = -32 676 floor(32, 32) = 32, floor(34, 32) = 32, floor(-34, 32) = -64 677 floor(64, 64) = 64, floor(66, 64) = 64, floor(-66, 64) = -128 678 floor(128, 128) = 128, floor(130, 128) = 128, floor(-130, 128) = -256 679 floor(256, 256) = 256, floor(258, 256) = 256, floor(-258, 256) = -512 680 floor(512, 512) = 512, floor(514, 512) = 512, floor(-514, 512) = -1024 681 floor(1024, 1024) = 1024, floor(1026, 1024) = 1024, floor(-1026, 1024) = -2048 682 floor(2048, 2048) = 2048, floor(2050, 2048) = 2048, floor(-2050, 2048) = -4096 683 floor(4096, 4096) = 4096, floor(4098, 4096) = 4096, floor(-4098, 4096) = -8192 684 floor(8192, 8192) = 8192, floor(8194, 8192) = 8192, floor(-8194, 8192) = -16384 685 floor(16384, 16384) = 16384, floor(16386, 16384) = 16384, floor(-16386, 16384) = -32768 686 floor(32768, 32768) = 32768, floor(32770, 32768) = 32768, floor(-32770, 32768) = -65536 687 floor(65536, 65536) = 65536, floor(65538, 65536) = 65536, floor(-65538, 65536) = -131072 688 floor(131072, 131072) = 131072, floor(131074, 131072) = 131072, floor(-131074, 131072) = -262144 689 floor(262144, 262144) = 262144, floor(262146, 262144) = 262144, floor(-262146, 262144) = -524288 690 floor(524288, 524288) = 524288, floor(524290, 524288) = 524288, floor(-524290, 524288) = -1048576 691 floor(1048576, 1048576) = 1048576, floor(1048578, 1048576) = 1048576, floor(-1048578, 1048576) = -2097152 692 floor(2097152, 2097152) = 2097152, floor(2097154, 2097152) = 2097152, floor(-2097154, 2097152) = -4194304 693 floor(4194304, 4194304) = 4194304, floor(4194306, 4194304) = 4194304, floor(-4194306, 4194304) = -8388608 694 floor(8388608, 8388608) = 8388608, floor(8388610, 8388608) = 8388608, floor(-8388610, 8388608) = -16777216 695 floor(16777216, 16777216) = 16777216, floor(16777218, 16777216) = 16777216, floor(-16777218, 16777216) = -33554432 696 floor(33554432, 33554432) = 33554432, floor(33554434, 33554432) = 33554432, floor(-33554434, 33554432) = -67108864 697 floor(67108864, 67108864) = 67108864, floor(67108866, 67108864) = 67108864, floor(-67108866, 67108864) = -134217728 698 floor(134217728, 134217728) = 134217728, floor(134217730, 134217728) = 134217728, floor(-134217730, 134217728) = -268435456 699 floor(268435456, 268435456) = 268435456, floor(268435458, 268435456) = 268435456, floor(-268435458, 268435456) = -536870912 700 floor(536870912, 536870912) = 536870912, floor(536870914, 536870912) = 536870912, floor(-536870914, 536870912) = -1073741824 701 floor(1073741824, 1073741824) = 1073741824, floor(1073741826, 1073741824) = 1073741824, floor(-1073741826, 1073741824) = -2147483648 702 floor(2147483648, 2147483648) = 2147483648, floor(2147483650, 2147483648) = 2147483648, floor(-2147483650, 2147483648) = -4294967296 703 floor(4294967296, 4294967296) = 4294967296, floor(4294967298, 4294967296) = 4294967296, floor(-4294967298, 4294967296) = -8589934592 704 floor(8589934592, 8589934592) = 8589934592, floor(8589934594, 8589934592) = 8589934592, floor(-8589934594, 8589934592) = -17179869184 705 floor(17179869184, 17179869184) = 17179869184, floor(17179869186, 17179869184) = 17179869184, floor(-17179869186, 17179869184) = -34359738368 706 floor(34359738368, 34359738368) = 34359738368, floor(34359738370, 34359738368) = 34359738368, floor(-34359738370, 34359738368) = -68719476736 707 floor(68719476736, 68719476736) = 68719476736, floor(68719476738, 68719476736) = 68719476736, floor(-68719476738, 68719476736) = -137438953472 708 floor(137438953472, 137438953472) = 137438953472, floor(137438953474, 137438953472) = 137438953472, floor(-137438953474, 137438953472) = -274877906944 709 floor(274877906944, 274877906944) = 274877906944, floor(274877906946, 274877906944) = 274877906944, floor(-274877906946, 274877906944) = -549755813888 710 floor(549755813888, 549755813888) = 549755813888, floor(549755813890, 549755813888) = 549755813888, floor(-549755813890, 549755813888) = -1099511627776 711 floor(1099511627776, 1099511627776) = 1099511627776, floor(1099511627778, 1099511627776) = 1099511627776, floor(-1099511627778, 1099511627776) = -2199023255552 712 floor(2199023255552, 2199023255552) = 2199023255552, floor(2199023255554, 2199023255552) = 2199023255552, floor(-2199023255554, 2199023255552) = -4398046511104 713 floor(4398046511104, 4398046511104) = 4398046511104, floor(4398046511106, 4398046511104) = 4398046511104, floor(-4398046511106, 4398046511104) = -8796093022208 714 floor(8796093022208, 8796093022208) = 8796093022208, floor(8796093022210, 8796093022208) = 8796093022208, floor(-8796093022210, 8796093022208) = -17592186044416 715 floor(17592186044416, 17592186044416) = 17592186044416, floor(17592186044418, 17592186044416) = 17592186044416, floor(-17592186044418, 17592186044416) = -35184372088832 716 floor(35184372088832, 35184372088832) = 35184372088832, floor(35184372088834, 35184372088832) = 35184372088832, floor(-35184372088834, 35184372088832) = -70368744177664 717 floor(70368744177664, 70368744177664) = 70368744177664, floor(70368744177666, 70368744177664) = 70368744177664, floor(-70368744177666, 70368744177664) = -140737488355328 718 floor(140737488355328, 140737488355328) = 140737488355328, floor(140737488355330, 140737488355328) = 140737488355328, floor(-140737488355330, 140737488355328) = -281474976710656 719 floor(281474976710656, 281474976710656) = 281474976710656, floor(281474976710658, 281474976710656) = 281474976710656, floor(-281474976710658, 281474976710656) = -562949953421312 720 floor(562949953421312, 562949953421312) = 562949953421312, floor(562949953421314, 562949953421312) = 562949953421312, floor(-562949953421314, 562949953421312) = -1125899906842624 721 floor(1125899906842624, 1125899906842624) = 1125899906842624, floor(1125899906842626, 1125899906842624) = 1125899906842624, floor(-1125899906842626, 1125899906842624) = -2251799813685248 722 floor(2251799813685248, 2251799813685248) = 2251799813685248, floor(2251799813685250, 2251799813685248) = 2251799813685248, floor(-2251799813685250, 2251799813685248) = -4503599627370496 723 floor(4503599627370496, 4503599627370496) = 4503599627370496, floor(4503599627370498, 4503599627370496) = 4503599627370496, floor(-4503599627370498, 4503599627370496) = -9007199254740992 724 floor(9007199254740992, 9007199254740992) = 9007199254740992, floor(9007199254740994, 9007199254740992) = 9007199254740992, floor(-9007199254740994, 9007199254740992) = -18014398509481984 725 floor(18014398509481984, 18014398509481984) = 18014398509481984, floor(18014398509481986, 18014398509481984) = 18014398509481984, floor(-18014398509481986, 18014398509481984) = -36028797018963968 726 floor(36028797018963968, 36028797018963968) = 36028797018963968, floor(36028797018963970, 36028797018963968) = 36028797018963968, floor(-36028797018963970, 36028797018963968) = -72057594037927936 727 floor(72057594037927936, 72057594037927936) = 72057594037927936, floor(72057594037927938, 72057594037927936) = 72057594037927936, floor(-72057594037927938, 72057594037927936) = -144115188075855872 728 floor(144115188075855872, 144115188075855872) = 144115188075855872, floor(144115188075855874, 144115188075855872) = 144115188075855872, floor(-144115188075855874, 144115188075855872) = -288230376151711744 729 floor(288230376151711744, 288230376151711744) = 288230376151711744, floor(288230376151711746, 288230376151711744) = 288230376151711744, floor(-288230376151711746, 288230376151711744) = -576460752303423488 730 floor(576460752303423488, 576460752303423488) = 576460752303423488, floor(576460752303423490, 576460752303423488) = 576460752303423488, floor(-576460752303423490, 576460752303423488) = -1152921504606846976 731 floor(1152921504606846976, 1152921504606846976) = 1152921504606846976, floor(1152921504606846978, 1152921504606846976) = 1152921504606846976, floor(-1152921504606846978, 1152921504606846976) = -2305843009213693952 732 floor(2305843009213693952, 2305843009213693952) = 2305843009213693952, floor(2305843009213693954, 2305843009213693952) = 2305843009213693952, floor(-2305843009213693954, 2305843009213693952) = -4611686018427387904 733 floor(4611686018427387904, 4611686018427387904) = 4611686018427387904, floor(4611686018427387906, 4611686018427387904) = 4611686018427387904, floor(-4611686018427387906, 4611686018427387904) = -9223372036854775808 734 floor(-9223372036854775808, -9223372036854775808) = -9223372036854775808, floor(-9223372036854775806, -9223372036854775808) = -9223372036854775808, floor(9223372036854775806, -9223372036854775808) = 0 735 735 736 736 unsigned long long int … … 825 825 826 826 short int 827 floor(1, 1) = 1, floor(3, 1) = 3, floor(-3, 1) = 65533828 floor(2, 2) = 2, floor(4, 2) = 4, floor(-4, 2) = 65532829 floor(4, 4) = 4, floor(6, 4) = 4, floor(-6, 4) = 65532830 floor(8, 8) = 8, floor(10, 8) = 8, floor(-10, 8) = 65528831 floor(16, 16) = 16, floor(18, 16) = 16, floor(-18, 16) = 65520832 floor(32, 32) = 32, floor(34, 32) = 32, floor(-34, 32) = 65504833 floor(64, 64) = 64, floor(66, 64) = 64, floor(-66, 64) = 65472834 floor(128, 128) = 128, floor(130, 128) = 128, floor(-130, 128) = 65408835 floor(256, 256) = 256, floor(258, 256) = 256, floor(-258, 256) = 65280836 floor(512, 512) = 512, floor(514, 512) = 512, floor(-514, 512) = 65024837 floor(1024, 1024) = 1024, floor(1026, 1024) = 1024, floor(-1026, 1024) = 64512838 floor(2048, 2048) = 2048, floor(2050, 2048) = 2048, floor(-2050, 2048) = 63488839 floor(4096, 4096) = 4096, floor(4098, 4096) = 4096, floor(-4098, 4096) = 61440840 floor(8192, 8192) = 8192, floor(8194, 8192) = 8192, floor(-8194, 8192) = 57344841 floor(16384, 16384) = 16384, floor(16386, 16384) = 16384, floor(-16386, 16384) = 49152842 floor(-32768, -32768) = 32768, floor(-32766, -32768) = 0, floor(32766, -32768) = 0827 floor(1, 1) = 1, floor(3, 1) = 3, floor(-3, 1) = -3 828 floor(2, 2) = 2, floor(4, 2) = 4, floor(-4, 2) = -4 829 floor(4, 4) = 4, floor(6, 4) = 4, floor(-6, 4) = -4 830 floor(8, 8) = 8, floor(10, 8) = 8, floor(-10, 8) = -8 831 floor(16, 16) = 16, floor(18, 16) = 16, floor(-18, 16) = -16 832 floor(32, 32) = 32, floor(34, 32) = 32, floor(-34, 32) = -32 833 floor(64, 64) = 64, floor(66, 64) = 64, floor(-66, 64) = -64 834 floor(128, 128) = 128, floor(130, 128) = 128, floor(-130, 128) = -128 835 floor(256, 256) = 256, floor(258, 256) = 256, floor(-258, 256) = -256 836 floor(512, 512) = 512, floor(514, 512) = 512, floor(-514, 512) = -512 837 floor(1024, 1024) = 1024, floor(1026, 1024) = 1024, floor(-1026, 1024) = -1024 838 floor(2048, 2048) = 2048, floor(2050, 2048) = 2048, floor(-2050, 2048) = -2048 839 floor(4096, 4096) = 4096, floor(4098, 4096) = 4096, floor(-4098, 4096) = -4096 840 floor(8192, 8192) = 8192, floor(8194, 8192) = 8192, floor(-8194, 8192) = -8192 841 floor(16384, 16384) = 16384, floor(16386, 16384) = 16384, floor(-16386, 16384) = -16384 842 floor(-32768, -32768) = -32768, floor(-32766, -32768) = 0, floor(32766, -32768) = 0 843 843 844 844 unsigned short int … … 1603 1603 ceiling(16, 16) = 1, ceiling(18, 16) = 2, ceiling(-18, 16) = 0 1604 1604 ceiling(32, 32) = 1, ceiling(34, 32) = 2, ceiling(-34, 32) = 0 1605 ceiling(64, 64) = 1, ceiling(66, 64) = -1, ceiling(-66, 64) = 01606 ceiling(-128, -128) = 0, ceiling(-126, -128) = 0, ceiling(126, -128) = 01605 ceiling(64, 64) = 1, ceiling(66, 64) = 2, ceiling(-66, 64) = 0 1606 ceiling(-128, -128) = 2, ceiling(-126, -128) = 1, ceiling(126, -128) = 0 1607 1607 1608 1608 unsigned char … … 1614 1614 ceiling(32, 32) = 1, ceiling(34, 32) = 2, ceiling(222, 32) = 7 1615 1615 ceiling(64, 64) = 1, ceiling(66, 64) = 2, ceiling(190, 64) = 3 1616 ceiling(128, 128) = 1, ceiling(130, 128) = 0, ceiling(126, 128) = 11616 ceiling(128, 128) = 1, ceiling(130, 128) = 2, ceiling(126, 128) = 1 1617 1617 1618 1618 short int 1619 ceiling(1, 1) = 1, ceiling(3, 1) = 3, ceiling(-3, 1) = 655331620 ceiling(2, 2) = 1, ceiling(4, 2) = 2, ceiling(-4, 2) = 655351619 ceiling(1, 1) = 1, ceiling(3, 1) = 3, ceiling(-3, 1) = -3 1620 ceiling(2, 2) = 1, ceiling(4, 2) = 2, ceiling(-4, 2) = -1 1621 1621 ceiling(4, 4) = 1, ceiling(6, 4) = 2, ceiling(-6, 4) = 0 1622 1622 ceiling(8, 8) = 1, ceiling(10, 8) = 2, ceiling(-10, 8) = 0 … … 1631 1631 ceiling(4096, 4096) = 1, ceiling(4098, 4096) = 2, ceiling(-4098, 4096) = 0 1632 1632 ceiling(8192, 8192) = 1, ceiling(8194, 8192) = 2, ceiling(-8194, 8192) = 0 1633 ceiling(16384, 16384) = 1, ceiling(16386, 16384) = 65535, ceiling(-16386, 16384) = 01634 ceiling(-32768, -32768) = 0, ceiling(-32766, -32768) = 0, ceiling(32766, -32768) = 01633 ceiling(16384, 16384) = 1, ceiling(16386, 16384) = 2, ceiling(-16386, 16384) = 0 1634 ceiling(-32768, -32768) = 2, ceiling(-32766, -32768) = 1, ceiling(32766, -32768) = 0 1635 1635 1636 1636 unsigned short int … … 1650 1650 ceiling(8192, 8192) = 1, ceiling(8194, 8192) = 2, ceiling(57342, 8192) = 7 1651 1651 ceiling(16384, 16384) = 1, ceiling(16386, 16384) = 2, ceiling(49150, 16384) = 3 1652 ceiling(32768, 32768) = 1, ceiling(32770, 32768) = 0, ceiling(32766, 32768) = 11652 ceiling(32768, 32768) = 1, ceiling(32770, 32768) = 2, ceiling(32766, 32768) = 1 1653 1653 1654 1654 int -
tests/bitmanip3.cfa
r912ccbcf r0a6da484 10 10 // Created On : Tue Apr 7 21:22:59 2020 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 14 10:52:36202013 // Update Count : 4212 // Last Modified On : Tue Apr 14 23:07:15 2020 13 // Update Count : 57 14 14 // 15 15 … … 18 18 19 19 int main() { 20 signed char sc; 21 unsigned char usc; 22 short int si; 23 unsigned short int usi; 24 int i; 25 unsigned int ui; 26 long int li; 27 unsigned long int uli; 28 long long int lli; 29 unsigned long long int ulli; 20 bool b1, b2; 21 signed char sc, scr1, scr2, scr3; 22 unsigned char uc, ucr1, ucr2, ucr3; 23 short int si, sir1, sir2, sir3; 24 unsigned short int usi, usir1, usir2, usir3; 25 int i, ir1, ir2, ir3; 26 unsigned int ui, uir1, uir2, uir3; 27 long int li, lir1, lir2, lir3; 28 unsigned long int uli, ulir1, ulir2, ulir3; 29 long long int lli, llir1, llir2, llir3; 30 unsigned long long int ulli, ullir1, ullir2, ullir3; 30 31 31 32 //============================================================ … … 35 36 sout | "signed char"; 36 37 sc = 0; 37 sout | wd(__bitsizeof(sc)+2, pad0(bin(sc))) | is_pow2( sc ) | wd(__bitsizeof(sc)+2, pad0(bin(sc + 13hh))) | is_pow2( sc + 13hh ); 38 b1 = is_pow2( sc ), b2 = is_pow2( sc + 13hh ); 39 sout | wd(__bitsizeof(sc)+2, pad0(bin(sc))) | b1 | wd(__bitsizeof(sc)+2, pad0(bin(sc + 13hh))) | b2; 38 40 for ( sc = 1; sc != 0; sc <<= 1 ) { 39 sout | wd(__bitsizeof(sc)+2, pad0(bin(sc))) | is_pow2( sc ) | wd(__bitsizeof(sc)+2, pad0(bin(sc + 13hh))) | is_pow2( sc + 13hh ); 41 b1 = is_pow2( sc ), b2 = is_pow2( sc + 13hh ); 42 sout | wd(__bitsizeof(sc)+2, pad0(bin(sc))) | b1 | wd(__bitsizeof(sc)+2, pad0(bin(sc + 13hh))) | b2; 40 43 } // for 41 44 sout | nl; 42 45 sout | "unsigned char"; 43 usc = 0; 44 sout | wd(__bitsizeof(usc)+2, pad0(bin(usc))) | is_pow2( usc ) | wd(__bitsizeof(usc)+2, pad0(bin(usc + 13hh))) | is_pow2( usc + 13hh ); 45 for ( usc = 1; usc != 0; usc <<= 1 ) { 46 sout | wd(__bitsizeof(usc)+2, pad0(bin(usc))) | is_pow2( usc ) | wd(__bitsizeof(usc)+2, pad0(bin(usc + 13hh))) | is_pow2( usc + 13hh ); 46 uc = 0; 47 b1 = is_pow2( uc ), b2 = is_pow2( uc + 13hh ); 48 sout | wd(__bitsizeof(uc)+2, pad0(bin(uc))) | b1 | wd(__bitsizeof(uc)+2, pad0(bin(uc + 13hh))) | b2; 49 for ( uc = 1; uc != 0; uc <<= 1 ) { 50 b1 = is_pow2( uc ), b2 = is_pow2( uc + 13hh ); 51 sout | wd(__bitsizeof(uc)+2, pad0(bin(uc))) | b1 | wd(__bitsizeof(uc)+2, pad0(bin(uc + 13hh))) | b2; 47 52 } // for 48 53 sout | nl; … … 50 55 sout | "short int"; 51 56 si = 0; 52 sout | wd(__bitsizeof(si)+2, pad0(bin(si))) | is_pow2( si ) | wd(__bitsizeof(si)+2, pad0(bin(si + 13h))) | is_pow2( si + 13h ); 57 b1 = is_pow2( si ), b2 = is_pow2( si + 13hh ); 58 sout | wd(__bitsizeof(si)+2, pad0(bin(si))) | b1 | wd(__bitsizeof(si)+2, pad0(bin(si + 13h))) | b2; 53 59 for ( si = 1; si != 0; si <<= 1 ) { 54 sout | wd(__bitsizeof(si)+2, pad0(bin(si))) | is_pow2( si ) | wd(__bitsizeof(si)+2, pad0(bin(si + 13h))) | is_pow2( si + 13h ); 60 b1 = is_pow2( si ), b2 = is_pow2( si + 13hh ); 61 sout | wd(__bitsizeof(si)+2, pad0(bin(si))) | b1 | wd(__bitsizeof(si)+2, pad0(bin(si + 13h))) | b2; 55 62 } // for 56 63 sout | nl; 57 64 sout | "unsigned short int"; 58 65 usi = 0; 59 sout | wd(__bitsizeof(usi)+2, pad0(bin(usi))) | is_pow2( usi ) | wd(__bitsizeof(usi)+2, pad0(bin(usi + 13h))) | is_pow2( usi + 13h ); 66 b1 = is_pow2( usi ), b2 = is_pow2( usi + 13hh ); 67 sout | wd(__bitsizeof(usi)+2, pad0(bin(usi))) | b1 | wd(__bitsizeof(usi)+2, pad0(bin(usi + 13hh))) | b2; 60 68 for ( usi = 1; usi != 0; usi <<= 1 ) { 61 sout | wd(__bitsizeof(usi)+2, pad0(bin(usi))) | is_pow2( usi ) | wd(__bitsizeof(usi)+2, pad0(bin(usi + 13h))) | is_pow2( usi + 13h ); 69 b1 = is_pow2( usi ), b2 = is_pow2( usi + 13hh ); 70 sout | wd(__bitsizeof(usi)+2, pad0(bin(usi))) | b1 | wd(__bitsizeof(usi)+2, pad0(bin(usi + 13hh))) | b2; 62 71 } // for 63 72 sout | nl; … … 65 74 sout | "int"; 66 75 i = 0; 67 sout | wd(__bitsizeof(i)+2, pad0(bin(i))) | is_pow2( i ) | wd(__bitsizeof(i)+2, pad0(bin(i + 13))) | is_pow2( i + 13 ); 76 b1 = is_pow2( i ), b2 = is_pow2( i + 13hh ); 77 sout | wd(__bitsizeof(i)+2, pad0(bin(i))) | b1 | wd(__bitsizeof(i)+2, pad0(bin(i + 13h))) | b2; 68 78 for ( i = 1; i != 0; i <<= 1 ) { 69 sout | wd(__bitsizeof(i)+2, pad0(bin(i))) | is_pow2( i ) | wd(__bitsizeof(i)+2, pad0(bin(i + 13))) | is_pow2( i + 13 ); 79 b1 = is_pow2( i ), b2 = is_pow2( i + 13hh ); 80 sout | wd(__bitsizeof(i)+2, pad0(bin(i))) | b1 | wd(__bitsizeof(i)+2, pad0(bin(i + 13h))) | b2; 70 81 } // for 71 82 sout | nl; 72 83 sout | "unsigned int"; 73 84 ui = 0; 74 sout | wd(__bitsizeof(ui)+2, pad0(bin(ui))) | is_pow2( ui ) | wd(__bitsizeof(ui)+2, pad0(bin(ui + 13))) | is_pow2( ui + 13 ); 85 b1 = is_pow2( ui ), b2 = is_pow2( ui + 13hh ); 86 sout | wd(__bitsizeof(ui)+2, pad0(bin(ui))) | b1 | wd(__bitsizeof(ui)+2, pad0(bin(ui + 13hh))) | b2; 75 87 for ( ui = 1; ui != 0; ui <<= 1 ) { 76 sout | wd(__bitsizeof(ui)+2, pad0(bin(ui))) | is_pow2( ui ) | wd(__bitsizeof(ui)+2, pad0(bin(ui + 13))) | is_pow2( ui + 13 ); 88 b1 = is_pow2( ui ), b2 = is_pow2( ui + 13hh ); 89 sout | wd(__bitsizeof(ui)+2, pad0(bin(ui))) | b1 | wd(__bitsizeof(ui)+2, pad0(bin(ui + 13hh))) | b2; 77 90 } // for 78 91 sout | nl; … … 80 93 sout | "long int"; 81 94 li = 0; 82 sout | wd(__bitsizeof(li)+2, pad0(bin(li))) | is_pow2( li ) | wd(__bitsizeof(li)+2, pad0(bin(li + 13))) | is_pow2( li + 13 ); 95 b1 = is_pow2( li ), b2 = is_pow2( li + 13hh ); 96 sout | wd(__bitsizeof(li)+2, pad0(bin(li))) | b1 | wd(__bitsizeof(li)+2, pad0(bin(li + 13h))) | b2; 83 97 for ( li = 1; li != 0; li <<= 1 ) { 84 sout | wd(__bitsizeof(li)+2, pad0(bin(li))) | is_pow2( li ) | wd(__bitsizeof(li)+2, pad0(bin(li + 13))) | is_pow2( li + 13 ); 98 b1 = is_pow2( li ), b2 = is_pow2( li + 13hh ); 99 sout | wd(__bitsizeof(li)+2, pad0(bin(li))) | b1 | wd(__bitsizeof(li)+2, pad0(bin(li + 13h))) | b2; 85 100 } // for 86 101 sout | nl; 87 102 sout | "unsigned long int"; 88 103 uli = 0; 89 sout | wd(__bitsizeof(uli)+2, pad0(bin(uli))) | is_pow2( uli ) | wd(__bitsizeof(uli)+2, pad0(bin(uli + 13))) | is_pow2( uli + 13 ); 104 b1 = is_pow2( uli ), b2 = is_pow2( uli + 13hh ); 105 sout | wd(__bitsizeof(uli)+2, pad0(bin(uli))) | b1 | wd(__bitsizeof(uli)+2, pad0(bin(uli + 13h))) | b2; 90 106 for ( uli = 1; uli != 0; uli <<= 1 ) { 91 sout | wd(__bitsizeof(uli)+2, pad0(bin(uli))) | is_pow2( uli ) | wd(__bitsizeof(uli)+2, pad0(bin(uli + 13))) | is_pow2( uli + 13 ); 107 b1 = is_pow2( uli ), b2 = is_pow2( uli + 13hh ); 108 sout | wd(__bitsizeof(uli)+2, pad0(bin(uli))) | b1 | wd(__bitsizeof(uli)+2, pad0(bin(uli + 13h))) | b2; 92 109 } // for 93 110 sout | nl; … … 95 112 sout | "long long int"; 96 113 lli = 0; 97 sout | wd(__bitsizeof(lli)+2, pad0(bin(lli))) | is_pow2( lli ) | wd(__bitsizeof(lli)+2, pad0(bin(lli + 13hh))) | is_pow2( lli + 13hh ); 114 b1 = is_pow2( lli ), b2 = is_pow2( lli + 13hh ); 115 sout | wd(__bitsizeof(lli)+2, pad0(bin(lli))) | b1 | wd(__bitsizeof(lli)+2, pad0(bin(lli + 13h))) | b2; 98 116 for ( lli = 1; lli != 0; lli <<= 1 ) { 99 sout | wd(__bitsizeof(lli)+2, pad0(bin(lli))) | is_pow2( lli ) | wd(__bitsizeof(lli)+2, pad0(bin(lli + 13hh))) | is_pow2( lli + 13hh ); 117 b1 = is_pow2( lli ), b2 = is_pow2( lli + 13hh ); 118 sout | wd(__bitsizeof(lli)+2, pad0(bin(lli))) | b1 | wd(__bitsizeof(lli)+2, pad0(bin(lli + 13h))) | b2; 100 119 } // for 101 120 sout | nl; 102 121 sout | "unsigned long long int"; 103 122 ulli = 0; 104 sout | wd(__bitsizeof(ulli)+2, pad0(bin(ulli))) | is_pow2( ulli ) | wd(__bitsizeof(ulli)+2, pad0(bin(ulli + 13hh))) | is_pow2( ulli + 13hh ); 123 b1 = is_pow2( ulli ), b2 = is_pow2( ulli + 13hh ); 124 sout | wd(__bitsizeof(ulli)+2, pad0(bin(ulli))) | b1 | wd(__bitsizeof(ulli)+2, pad0(bin(ulli + 13h))) | b2; 105 125 for ( ulli = 1; ulli != 0; ulli <<= 1 ) { 106 sout | wd(__bitsizeof(ulli)+2, pad0(bin(ulli))) | is_pow2( ulli ) | wd(__bitsizeof(ulli)+2, pad0(bin(ulli + 13hh))) | is_pow2( ulli + 13hh ); 126 b1 = is_pow2( ulli ), b2 = is_pow2( ulli + 13hh ); 127 sout | wd(__bitsizeof(ulli)+2, pad0(bin(ulli))) | b1 | wd(__bitsizeof(ulli)+2, pad0(bin(ulli + 13h))) | b2; 107 128 } // for 108 129 sout | nl; … … 114 135 printf( "signed char\n" ); 115 136 sc = 0; 116 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, floor2( sc, sc ), sc + 2hh, sc, floor2( sc + 2hh, sc ), -sc - 2hh, sc, floor2( -sc - 2hh, sc ) ); 137 scr1 = floor2( sc, sc ), scr2 = floor2( sc + 2hh, sc ), scr3 = floor2( -sc - 2hh, sc ); 138 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 117 139 for ( sc = 1; sc != 0; sc += sc ) { 118 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, floor2( sc, sc ), sc + 2hh, sc, floor2( sc + 2hh, sc ), -sc - 2hh, sc, floor2( -sc - 2hh, sc ) ); 140 scr1 = floor2( sc, sc ); scr2 = floor2( sc + 2hh, sc ); scr3 = floor2( -sc - 2hh, sc ); 141 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 119 142 } // for 120 143 printf( "\n" ); 121 144 122 145 printf( "unsigned char\n" ); 123 usc = 0; 124 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", usc, usc, floor2( usc, usc ), usc + 2uhh, usc, floor2( usc + 2uhh, usc ), -usc - 2uhh, usc, floor2( -usc - 2uhh, usc ) ); 125 for ( usc = 1; usc != 0; usc += usc ) { 126 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", usc, usc, floor2( usc, usc ), usc + 2uhh, usc, floor2( usc + 2uhh, usc ), -usc - 2uhh, usc, floor2( -usc - 2uhh, usc ) ); 146 uc = 0; 147 ucr1 = floor2( uc, uc ), ucr2 = floor2( uc + 2hh, uc ), ucr3 = floor2( -uc - 2hh, uc ); 148 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 149 for ( uc = 1; uc != 0; uc += uc ) { 150 ucr1 = floor2( uc, uc ); ucr2 = floor2( uc + 2hh, uc ); ucr3 = floor2( -uc - 2hh, uc ); 151 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 127 152 } // for 128 153 printf( "\n" ); … … 130 155 printf( "short int\n" ); 131 156 si = 0; 132 printf( "floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd\n", si, si, floor2( si, si ), si + 2h, si, floor2( si + 2h, si ), -si - 2h, si, floor2( -si - 2h, si ) ); 157 sir1 = floor2( si, si ), sir2 = floor2( si + 2hh, si ), sir3 = floor2( -si - 2hh, si ); 158 printf( "floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 133 159 for ( si = 1; si != 0; si += si ) { 134 printf( "floor(%hd %hd) = %hd, floor(%hd %hd) = %hd, floor(%hd %hd) = %hd\n", si, si, floor2( si, si ), si + 2h, si, floor2( si + 2h, si ), -si - 2h, si, floor2( -si - 2h, si ) ); 160 sir1 = floor2( si, si ); sir2 = floor2( si + 2hh, si ); sir3 = floor2( -si - 2hh, si ); 161 printf( "floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 135 162 } // for 136 163 printf( "\n" ); … … 138 165 printf( "unsigned short int\n" ); 139 166 usi = 0; 140 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, floor2( usi, usi ), usi + 2uh, usi, floor2( usi + 2uh, usi ), -usi - 2uh, usi, floor2( -usi - 2uh, usi ) ); 167 usir1 = floor2( usi, usi ), usir2 = floor2( usi + 2hh, usi ), usir3 = floor2( -usi - 2hh, usi ); 168 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 141 169 for ( usi = 1; usi != 0; usi += usi ) { 142 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, floor2( usi, usi ), usi + 2uh, usi, floor2( usi + 2uh, usi ), -usi - 2uh, usi, floor2( -usi - 2uh, usi ) ); 170 usir1 = floor2( usi, usi ); usir2 = floor2( usi + 2hh, usi ); usir3 = floor2( -usi - 2hh, usi ); 171 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 143 172 } // for 144 173 printf( "\n" ); … … 146 175 printf( "int\n" ); 147 176 i = 0; 148 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, floor2( i, i ), i + 2h, i, floor2( i + 2h, i ), -i - 2h, i, floor2( -i - 2h, i ) ); 177 ir1 = floor2( i, i ), ir2 = floor2( i + 2hh, i ), ir3 = floor2( -i - 2hh, i ); 178 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 149 179 for ( i = 1; i != 0; i += i ) { 150 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, floor2( i, i ), i + 2h, i, floor2( i + 2h, i ), -i - 2h, i, floor2( -i - 2h, i ) ); 180 ir1 = floor2( i, i ); ir2 = floor2( i + 2hh, i ); ir3 = floor2( -i - 2hh, i ); 181 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 151 182 } // for 152 183 printf( "\n" ); … … 154 185 printf( "unsigned int\n" ); 155 186 ui = 0; 156 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, floor2( ui, ui ), ui + 2uh, ui, floor2( ui + 2uh, ui ), -ui - 2uh, ui, floor2( -ui - 2uh, ui ) ); 187 uir1 = floor2( ui, ui ), uir2 = floor2( ui + 2hh, ui ), uir3 = floor2( -ui - 2hh, ui ); 188 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 157 189 for ( ui = 1; ui != 0; ui += ui ) { 158 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, floor2( ui, ui ), ui + 2uh, ui, floor2( ui + 2uh, ui ), -ui - 2uh, ui, floor2( -ui - 2uh, ui ) ); 190 uir1 = floor2( ui, ui ); uir2 = floor2( ui + 2hh, ui ); uir3 = floor2( -ui - 2hh, ui ); 191 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 159 192 } // for 160 193 printf( "\n" ); … … 162 195 printf( "long int\n" ); 163 196 li = 0; 164 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, floor2( li, li ), li + 2h, li, floor2( li + 2h, li ), -li - 2h, li, floor2( -li - 2h, li ) ); 197 lir1 = floor2( li, li ), lir2 = floor2( li + 2hh, li ), lir3 = floor2( -li - 2hh, li ); 198 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 165 199 for ( li = 1; li != 0; li += li ) { 166 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, floor2( li, li ), li + 2h, li, floor2( li + 2h, li ), -li - 2h, li, floor2( -li - 2h, li ) ); 200 lir1 = floor2( li, li ); lir2 = floor2( li + 2hh, li ); lir3 = floor2( -li - 2hh, li ); 201 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 167 202 } // for 168 203 printf( "\n" ); … … 170 205 printf( "unsigned long int\n" ); 171 206 uli = 0; 172 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, floor2( uli, uli ), uli + 2uh, uli, floor2( uli + 2uh, uli ), -uli - 2uh, uli, floor2( -uli - 2uh, uli ) ); 207 ulir1 = floor2( uli, uli ), ulir2 = floor2( uli + 2hh, uli ), ulir3 = floor2( -uli - 2hh, uli ); 208 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 173 209 for ( uli = 1; uli != 0; uli += uli ) { 174 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, floor2( uli, uli ), uli + 2uh, uli, floor2( uli + 2uh, uli ), -uli - 2uh, uli, floor2( -uli - 2uh, uli ) ); 210 ulir1 = floor2( uli, uli ); ulir2 = floor2( uli + 2hh, uli ); ulir3 = floor2( -uli - 2hh, uli ); 211 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 175 212 } // for 176 213 printf( "\n" ); … … 178 215 printf( "long long int\n" ); 179 216 lli = 0; 180 printf( "floor(%lld %lld) = %lld, floor(%lld %lld) = %lld, floor(%lld %lld) = %lld\n", lli, lli, floor2( lli, lli ), lli + 2h, lli, floor2( lli + 2h, lli ), -lli - 2h, lli, floor2( -lli - 2h, lli ) ); 217 llir1 = floor2( lli, lli ), llir2 = floor2( lli + 2hh, lli ), llir3 = floor2( -lli - 2hh, lli ); 218 printf( "floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 181 219 for ( lli = 1; lli != 0; lli += lli ) { 182 printf( "floor(%lld %lld) = %lld, floor(%lld %lld) = %lld, floor(%lld %lld) = %lld\n", lli, lli, floor2( lli, lli ), lli + 2h, lli, floor2( lli + 2h, lli ), -lli - 2h, lli, floor2( -lli - 2h, lli ) ); 220 llir1 = floor2( lli, lli ); llir2 = floor2( lli + 2hh, lli ); llir3 = floor2( -lli - 2hh, lli ); 221 printf( "floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 183 222 } // for 184 223 printf( "\n" ); … … 186 225 printf( "unsigned long long int\n" ); 187 226 ulli = 0; 188 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, floor2( ulli, ulli ), ulli + 2uh, ulli, floor2( ulli + 2uh, ulli ), -ulli - 2uh, ulli, floor2( -ulli - 2uh, ulli ) ); 227 ullir1 = floor2( ulli, ulli ), ullir2 = floor2( ulli + 2hh, ulli ), ullir3 = floor2( -ulli - 2hh, ulli ); 228 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 189 229 for ( ulli = 1; ulli != 0; ulli += ulli ) { 190 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, floor2( ulli, ulli ), ulli + 2uh, ulli, floor2( ulli + 2uh, ulli ), -ulli - 2uh, ulli, floor2( -ulli - 2uh, ulli ) ); 230 ullir1 = floor2( ulli, ulli ); ullir2 = floor2( ulli + 2hh, ulli ); ullir3 = floor2( -ulli - 2hh, ulli ); 231 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 191 232 } // for 192 233 printf( "\n" ); … … 198 239 printf( "signed char\n" ); 199 240 for ( sc = 1; sc != 0; sc += sc ) { 200 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, floor( sc, sc ), sc + 2hh, sc, floor( sc + 2hh, sc ), -sc - 2hh, sc, floor( -sc - 2hh, sc ) ); 241 scr1 = floor( sc, sc ); scr2 = floor( sc + 2hh, sc ); scr3 = floor( -sc - 2hh, sc ); 242 printf( "floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd, floor(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 201 243 } // for 202 244 printf( "\n" ); 203 245 204 246 printf( "unsigned char\n" ); 205 for ( usc = 1; usc != 0; usc += usc ) { 206 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", usc, usc, floor( usc, usc ), usc + 2uhh, usc, floor( usc + 2uhh, usc ), -usc - 2uhh, usc, floor( -usc - 2uhh, usc ) ); 247 for ( uc = 1; uc != 0; uc += uc ) { 248 ucr1 = floor( uc, uc ); ucr2 = floor( uc + 2hh, uc ); ucr3 = floor( -uc - 2hh, uc ); 249 printf( "floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu, floor(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 207 250 } // for 208 251 printf( "\n" ); … … 210 253 printf( "short int\n" ); 211 254 for ( si = 1; si != 0; si += si ) { 212 printf( "floor(%hd, %hd) = %hu, floor(%hd, %hd) = %hu, floor(%hd, %hd) = %hu\n", si, si, floor( si, si ), si + 2h, si, floor( si + 2h, si ), -si - 2h, si, floor( -si - 2h, si ) ); 255 sir1 = floor( si, si ); sir2 = floor( si + 2hh, si ); sir3 = floor( -si - 2hh, si ); 256 printf( "floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd, floor(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 213 257 } // for 214 258 printf( "\n" ); … … 216 260 printf( "unsigned short int\n" ); 217 261 for ( usi = 1; usi != 0; usi += usi ) { 218 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, floor( usi, usi ), usi + 2uh, usi, floor( usi + 2uh, usi ), -usi - 2uh, usi, floor( -usi - 2uh, usi ) ); 262 usir1 = floor( usi, usi ); usir2 = floor( usi + 2hh, usi ); usir3 = floor( -usi - 2hh, usi ); 263 printf( "floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu, floor(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 219 264 } // for 220 265 printf( "\n" ); … … 222 267 printf( "int\n" ); 223 268 for ( i = 1; i != 0; i += i ) { 224 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, floor( i, i ), i + 2h, i, floor( i + 2h, i ), -i - 2h, i, floor( -i - 2h, i ) ); 269 ir1 = floor( i, i ); ir2 = floor( i + 2hh, i ); ir3 = floor( -i - 2hh, i ); 270 printf( "floor(%d, %d) = %d, floor(%d, %d) = %d, floor(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 225 271 } // for 226 272 printf( "\n" ); … … 228 274 printf( "unsigned int\n" ); 229 275 for ( ui = 1; ui != 0; ui += ui ) { 230 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, floor( ui, ui ), ui + 2uh, ui, floor( ui + 2uh, ui ), -ui - 2uh, ui, floor( -ui - 2uh, ui ) ); 276 uir1 = floor( ui, ui ); uir2 = floor( ui + 2hh, ui ); uir3 = floor( -ui - 2hh, ui ); 277 printf( "floor(%u, %u) = %u, floor(%u, %u) = %u, floor(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 231 278 } // for 232 279 printf( "\n" ); … … 234 281 printf( "long int\n" ); 235 282 for ( li = 1; li != 0; li += li ) { 236 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, floor( li, li ), li + 2h, li, floor( li + 2h, li ), -li - 2h, li, floor( -li - 2h, li ) ); 283 lir1 = floor( li, li ); lir2 = floor( li + 2hh, li ); lir3 = floor( -li - 2hh, li ); 284 printf( "floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld, floor(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 237 285 } // for 238 286 printf( "\n" ); … … 240 288 printf( "unsigned long int\n" ); 241 289 for ( uli = 1; uli != 0; uli += uli ) { 242 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, floor( uli, uli ), uli + 2uh, uli, floor( uli + 2uh, uli ), -uli - 2uh, uli, floor( -uli - 2uh, uli ) ); 290 ulir1 = floor( uli, uli ); ulir2 = floor( uli + 2hh, uli ); ulir3 = floor( -uli - 2hh, uli ); 291 printf( "floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu, floor(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 243 292 } // for 244 293 printf( "\n" ); … … 246 295 printf( "long long int\n" ); 247 296 for ( lli = 1; lli != 0; lli += lli ) { 248 printf( "floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld\n", lli, lli, floor( lli, lli ), lli + 2h, lli, floor( lli + 2h, lli ), -lli - 2h, lli, floor( -lli - 2h, lli ) ); 297 llir1 = floor( lli, lli ); llir2 = floor( lli + 2hh, lli ); llir3 = floor( -lli - 2hh, lli ); 298 printf( "floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld, floor(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 249 299 } // for 250 300 printf( "\n" ); … … 252 302 printf( "unsigned long long int\n" ); 253 303 for ( ulli = 1; ulli != 0; ulli += ulli ) { 254 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, floor( ulli, ulli ), ulli + 2uh, ulli, floor( ulli + 2uh, ulli ), -ulli - 2uh, ulli, floor( -ulli - 2uh, ulli ) ); 304 ullir1 = floor( ulli, ulli ); ullir2 = floor( ulli + 2hh, ulli ); ullir3 = floor( -ulli - 2hh, ulli ); 305 printf( "floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu, floor(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 255 306 } // for 256 307 printf( "\n" ); … … 262 313 printf( "signed char\n" ); 263 314 sc = 0; 264 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, ceiling2( sc, sc ), sc + 2hh, sc, ceiling2( sc + 2hh, sc ), -sc - 2hh, sc, ceiling2( -sc - 2hh, sc ) ); 315 scr1 = ceiling2( sc, sc ), scr2 = ceiling2( sc + 2hh, sc ), scr3 = ceiling2( -sc - 2hh, sc ); 316 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 265 317 for ( sc = 1; sc != 0; sc += sc ) { 266 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, ceiling2( sc, sc ), sc + 2hh, sc, ceiling2( sc + 2hh, sc ), -sc - 2hh, sc, ceiling2( -sc - 2hh, sc ) ); 318 scr1 = ceiling2( sc, sc ); scr2 = ceiling2( sc + 2hh, sc ); scr3 = ceiling2( -sc - 2hh, sc ); 319 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 267 320 } // for 268 321 printf( "\n" ); 269 322 270 323 printf( "unsigned char\n" ); 271 usc = 0; 272 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", usc, usc, ceiling2( usc, usc ), usc + 2uhh, usc, ceiling2( usc + 2uhh, usc ), -usc - 2uhh, usc, ceiling2( -usc - 2uhh, usc ) ); 273 for ( usc = 1; usc != 0; usc += usc ) { 274 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", usc, usc, ceiling2( usc, usc ), usc + 2uhh, usc, ceiling2( usc + 2uhh, usc ), -usc - 2uhh, usc, ceiling2( -usc - 2uhh, usc ) ); 324 uc = 0; 325 ucr1 = ceiling2( uc, uc ), ucr2 = ceiling2( uc + 2hh, uc ), ucr3 = ceiling2( -uc - 2hh, uc ); 326 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 327 for ( uc = 1; uc != 0; uc += uc ) { 328 ucr1 = ceiling2( uc, uc ); ucr2 = ceiling2( uc + 2hh, uc ); ucr3 = ceiling2( -uc - 2hh, uc ); 329 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 275 330 } // for 276 331 printf( "\n" ); … … 278 333 printf( "short int\n" ); 279 334 si = 0; 280 printf( "ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd\n", si, si, ceiling2( si, si ), si + 2h, si, ceiling2( si + 2h, si ), -si - 2h, si, ceiling2( -si - 2h, si ) ); 335 sir1 = ceiling2( si, si ), sir2 = ceiling2( si + 2hh, si ), sir3 = ceiling2( -si - 2hh, si ); 336 printf( "ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 281 337 for ( si = 1; si != 0; si += si ) { 282 printf( "ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd\n", si, si, ceiling2( si, si ), si + 2h, si, ceiling2( si + 2h, si ), -si - 2h, si, ceiling2( -si - 2h, si ) ); 338 sir1 = ceiling2( si, si ); sir2 = ceiling2( si + 2hh, si ); sir3 = ceiling2( -si - 2hh, si ); 339 printf( "ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 283 340 } // for 284 341 printf( "\n" ); … … 286 343 printf( "unsigned short int\n" ); 287 344 usi = 0; 288 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, ceiling2( usi, usi ), usi + 2uh, usi, ceiling2( usi + 2uh, usi ), -usi - 2uh, usi, ceiling2( -usi - 2uh, usi ) ); 345 usir1 = ceiling2( usi, usi ), usir2 = ceiling2( usi + 2hh, usi ), usir3 = ceiling2( -usi - 2hh, usi ); 346 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 289 347 for ( usi = 1; usi != 0; usi += usi ) { 290 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, ceiling2( usi, usi ), usi + 2uh, usi, ceiling2( usi + 2uh, usi ), -usi - 2uh, usi, ceiling2( -usi - 2uh, usi ) ); 348 usir1 = ceiling2( usi, usi ); usir2 = ceiling2( usi + 2hh, usi ); usir3 = ceiling2( -usi - 2hh, usi ); 349 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 291 350 } // for 292 351 printf( "\n" ); … … 294 353 printf( "int\n" ); 295 354 i = 0; 296 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ceiling2( i, i ), i + 2h, i, ceiling2( i + 2h, i ), -i - 2h, i, ceiling2( -i - 2h, i ) ); 355 ir1 = ceiling2( i, i ), ir2 = ceiling2( i + 2hh, i ), ir3 = ceiling2( -i - 2hh, i ); 356 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 297 357 for ( i = 1; i != 0; i += i ) { 298 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ceiling2( i, i ), i + 2h, i, ceiling2( i + 2h, i ), -i - 2h, i, ceiling2( -i - 2h, i ) ); 358 ir1 = ceiling2( i, i ); ir2 = ceiling2( i + 2hh, i ); ir3 = ceiling2( -i - 2hh, i ); 359 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 299 360 } // for 300 361 printf( "\n" ); … … 302 363 printf( "unsigned int\n" ); 303 364 ui = 0; 304 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, ceiling2( ui, ui ), ui + 2uh, ui, ceiling2( ui + 2uh, ui ), -ui - 2uh, ui, ceiling2( -ui - 2uh, ui ) ); 365 uir1 = ceiling2( ui, ui ), uir2 = ceiling2( ui + 2hh, ui ), uir3 = ceiling2( -ui - 2hh, ui ); 366 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 305 367 for ( ui = 1; ui != 0; ui += ui ) { 306 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, ceiling2( ui, ui ), ui + 2uh, ui, ceiling2( ui + 2uh, ui ), -ui - 2uh, ui, ceiling2( -ui - 2uh, ui ) ); 368 uir1 = ceiling2( ui, ui ); uir2 = ceiling2( ui + 2hh, ui ); uir3 = ceiling2( -ui - 2hh, ui ); 369 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 307 370 } // for 308 371 printf( "\n" ); … … 310 373 printf( "long int\n" ); 311 374 li = 0; 312 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, ceiling2( li, li ), li + 2h, li, ceiling2( li + 2h, li ), -li - 2h, li, ceiling2( -li - 2h, li ) ); 375 lir1 = ceiling2( li, li ), lir2 = ceiling2( li + 2hh, li ), lir3 = ceiling2( -li - 2hh, li ); 376 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 313 377 for ( li = 1; li != 0; li += li ) { 314 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, ceiling2( li, li ), li + 2h, li, ceiling2( li + 2h, li ), -li - 2h, li, ceiling2( -li - 2h, li ) ); 378 lir1 = ceiling2( li, li ); lir2 = ceiling2( li + 2hh, li ); lir3 = ceiling2( -li - 2hh, li ); 379 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 315 380 } // for 316 381 printf( "\n" ); … … 318 383 printf( "unsigned long int\n" ); 319 384 uli = 0; 320 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ceiling2( uli, uli ), uli + 2uh, uli, ceiling2( uli + 2uh, uli ), -uli - 2uh, uli, ceiling2( -uli - 2uh, uli ) ); 385 ulir1 = ceiling2( uli, uli ), ulir2 = ceiling2( uli + 2hh, uli ), ulir3 = ceiling2( -uli - 2hh, uli ); 386 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 321 387 for ( uli = 1; uli != 0; uli += uli ) { 322 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ceiling2( uli, uli ), uli + 2uh, uli, ceiling2( uli + 2uh, uli ), -uli - 2uh, uli, ceiling2( -uli - 2uh, uli ) ); 388 ulir1 = ceiling2( uli, uli ); ulir2 = ceiling2( uli + 2hh, uli ); ulir3 = ceiling2( -uli - 2hh, uli ); 389 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 323 390 } // for 324 391 printf( "\n" ); … … 326 393 printf( "long long int\n" ); 327 394 lli = 0; 328 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, ceiling2( lli, lli ), lli + 2h, lli, ceiling2( lli + 2h, lli ), -lli - 2h, lli, ceiling2( -lli - 2h, lli ) ); 395 llir1 = ceiling2( lli, lli ), llir2 = ceiling2( lli + 2hh, lli ), llir3 = ceiling2( -lli - 2hh, lli ); 396 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 329 397 for ( lli = 1; lli != 0; lli += lli ) { 330 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, ceiling2( lli, lli ), lli + 2h, lli, ceiling2( lli + 2h, lli ), -lli - 2h, lli, ceiling2( -lli - 2h, lli ) ); 398 llir1 = ceiling2( lli, lli ); llir2 = ceiling2( lli + 2hh, lli ); llir3 = ceiling2( -lli - 2hh, lli ); 399 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 331 400 } // for 332 401 printf( "\n" ); … … 334 403 printf( "unsigned long long int\n" ); 335 404 ulli = 0; 336 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ceiling2( ulli, ulli ), ulli + 2uh, ulli, ceiling2( ulli + 2uh, ulli ), -ulli - 2uh, ulli, ceiling2( -ulli - 2uh, ulli ) ); 405 ullir1 = ceiling2( ulli, ulli ), ullir2 = ceiling2( ulli + 2hh, ulli ), ullir3 = ceiling2( -ulli - 2hh, ulli ); 406 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 337 407 for ( ulli = 1; ulli != 0; ulli += ulli ) { 338 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ceiling2( ulli, ulli ), ulli + 2uh, ulli, ceiling2( ulli + 2uh, ulli ), -ulli - 2uh, ulli, ceiling2( -ulli - 2uh, ulli ) ); 408 ullir1 = ceiling2( ulli, ulli ); ullir2 = ceiling2( ulli + 2hh, ulli ); ullir3 = ceiling2( -ulli - 2hh, ulli ); 409 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 339 410 } // for 340 411 printf( "\n" ); … … 346 417 printf( "signed char\n" ); 347 418 for ( sc = 1; sc != 0; sc += sc ) { 348 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, ceiling( sc, sc ), sc + 2hh, sc, ceiling( sc + 2hh, sc ), -sc - 2hh, sc, ceiling( -sc - 2hh, sc ) ); 419 scr1 = ceiling( sc, sc ); scr2 = ceiling( sc + 2hh, sc ); scr3 = ceiling( -sc - 2hh, sc ); 420 printf( "ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd, ceiling(%hhd, %hhd) = %hhd\n", sc, sc, scr1, sc + 2hh, sc, scr2, -sc - 2hh, sc, scr3 ); 349 421 } // for 350 422 printf( "\n" ); 351 423 352 424 printf( "unsigned char\n" ); 353 for ( usc = 1; usc != 0; usc += usc ) { 354 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", usc, usc, ceiling( usc, usc ), usc + 2uhh, usc, ceiling( usc + 2uhh, usc ), -usc - 2uhh, usc, ceiling( -usc - 2uhh, usc ) ); 425 for ( uc = 1; uc != 0; uc += uc ) { 426 ucr1 = ceiling( uc, uc ); ucr2 = ceiling( uc + 2hh, uc ); ucr3 = ceiling( -uc - 2hh, uc ); 427 printf( "ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu, ceiling(%hhu, %hhu) = %hhu\n", uc, uc, ucr1, uc + 2uhh, uc, ucr2, -uc - 2uhh, uc, ucr3 ); 355 428 } // for 356 429 printf( "\n" ); … … 358 431 printf( "short int\n" ); 359 432 for ( si = 1; si != 0; si += si ) { 360 printf( "ceiling(%hd, %hd) = %hu, ceiling(%hd, %hd) = %hu, ceiling(%hd, %hd) = %hu\n", si, si, ceiling( si, si ), si + 2h, si, ceiling( si + 2h, si ), -si - 2h, si, ceiling( -si - 2h, si ) ); 433 sir1 = ceiling( si, si ); sir2 = ceiling( si + 2hh, si ); sir3 = ceiling( -si - 2hh, si ); 434 printf( "ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd, ceiling(%hd, %hd) = %hd\n", si, si, sir1, si + 2h, si, sir2, -si - 2h, si, sir3 ); 361 435 } // for 362 436 printf( "\n" ); … … 364 438 printf( "unsigned short int\n" ); 365 439 for ( usi = 1; usi != 0; usi += usi ) { 366 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, ceiling( usi, usi ), usi + 2uh, usi, ceiling( usi + 2uh, usi ), -usi - 2uh, usi, ceiling( -usi - 2uh, usi ) ); 440 usir1 = ceiling( usi, usi ); usir2 = ceiling( usi + 2hh, usi ); usir3 = ceiling( -usi - 2hh, usi ); 441 printf( "ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu, ceiling(%hu, %hu) = %hu\n", usi, usi, usir1, usi + 2uh, usi, usir2, -usi - 2uh, usi, usir3 ); 367 442 } // for 368 443 printf( "\n" ); … … 370 445 printf( "int\n" ); 371 446 for ( i = 1; i != 0; i += i ) { 372 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ceiling( i, i ), i + 2h, i, ceiling( i + 2h, i ), -i - 2h, i, ceiling( -i - 2h, i ) ); 447 ir1 = ceiling( i, i ); ir2 = ceiling( i + 2hh, i ); ir3 = ceiling( -i - 2hh, i ); 448 printf( "ceiling(%d, %d) = %d, ceiling(%d, %d) = %d, ceiling(%d, %d) = %d\n", i, i, ir1, i + 2h, i, ir2, -i - 2h, i, ir3 ); 373 449 } // for 374 450 printf( "\n" ); … … 376 452 printf( "unsigned int\n" ); 377 453 for ( ui = 1; ui != 0; ui += ui ) { 378 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, ceiling( ui, ui ), ui + 2uh, ui, ceiling( ui + 2uh, ui ), -ui - 2uh, ui, ceiling( -ui - 2uh, ui ) ); 454 uir1 = ceiling( ui, ui ); uir2 = ceiling( ui + 2hh, ui ); uir3 = ceiling( -ui - 2hh, ui ); 455 printf( "ceiling(%u, %u) = %u, ceiling(%u, %u) = %u, ceiling(%u, %u) = %u\n", ui, ui, uir1, ui + 2h, ui, uir2, -ui - 2h, ui, uir3 ); 379 456 } // for 380 457 printf( "\n" ); … … 382 459 printf( "long int\n" ); 383 460 for ( li = 1; li != 0; li += li ) { 384 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, ceiling( li, li ), li + 2h, li, ceiling( li + 2h, li ), -li - 2h, li, ceiling( -li - 2h, li ) ); 461 lir1 = ceiling( li, li ); lir2 = ceiling( li + 2hh, li ); lir3 = ceiling( -li - 2hh, li ); 462 printf( "ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld, ceiling(%ld, %ld) = %ld\n", li, li, lir1, li + 2h, li, lir2, -li - 2h, li, lir3 ); 385 463 } // for 386 464 printf( "\n" ); … … 388 466 printf( "unsigned long int\n" ); 389 467 for ( uli = 1; uli != 0; uli += uli ) { 390 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ceiling( uli, uli ), uli + 2uh, uli, ceiling( uli + 2uh, uli ), -uli - 2uh, uli, ceiling( -uli - 2uh, uli ) ); 468 ulir1 = ceiling( uli, uli ); ulir2 = ceiling( uli + 2hh, uli ); ulir3 = ceiling( -uli - 2hh, uli ); 469 printf( "ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu, ceiling(%lu, %lu) = %lu\n", uli, uli, ulir1, uli + 2h, uli, ulir2, -uli - 2h, uli, ulir3 ); 391 470 } // for 392 471 printf( "\n" ); … … 394 473 printf( "long long int\n" ); 395 474 for ( lli = 1; lli != 0; lli += lli ) { 396 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, ceiling( lli, lli ), lli + 2h, lli, ceiling( lli + 2h, lli ), -lli - 2h, lli, ceiling( -lli - 2h, lli ) ); 475 llir1 = ceiling( lli, lli ); llir2 = ceiling( lli + 2hh, lli ); llir3 = ceiling( -lli - 2hh, lli ); 476 printf( "ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld, ceiling(%lld, %lld) = %lld\n", lli, lli, llir1, lli + 2h, lli, llir2, -lli - 2h, lli, llir3 ); 397 477 } // for 398 478 printf( "\n" ); … … 400 480 printf( "unsigned long long int\n" ); 401 481 for ( ulli = 1; ulli != 0; ulli += ulli ) { 402 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ceiling( ulli, ulli ), ulli + 2uh, ulli, ceiling( ulli + 2uh, ulli ), -ulli - 2uh, ulli, ceiling( -ulli - 2uh, ulli ) ); 482 ullir1 = ceiling( ulli, ulli ); ullir2 = ceiling( ulli + 2hh, ulli ); ullir3 = ceiling( -ulli - 2hh, ulli ); 483 printf( "ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu, ceiling(%llu, %llu) = %llu\n", ulli, ulli, ullir1, ulli + 2h, ulli, ullir2, -ulli - 2h, ulli, ullir3 ); 403 484 } // for 404 485 printf( "\n" );
Note: See TracChangeset
for help on using the changeset viewer.