@@ -107,8 +107,8 @@ internal external fun fromBits(bits: Int): Float
107
107
/* *
108
108
* Counts the number of set bits in the binary representation of this [Int] number.
109
109
*/
110
- @SinceKotlin(" 1.3 " )
111
- @ExperimentalStdlibApi
110
+ @SinceKotlin(" 1.4 " )
111
+ @WasExperimental( ExperimentalStdlibApi :: class )
112
112
@SymbolName(" Kotlin_Int_countOneBits" )
113
113
public actual external fun Int.countOneBits (): Int
114
114
@@ -122,8 +122,8 @@ private external fun countLeadingZeroBits(value: Int): Int
122
122
/* *
123
123
* Counts the number of consecutive most significant bits that are zero in the binary representation of this [Int] number.
124
124
*/
125
- @SinceKotlin(" 1.3 " )
126
- @ExperimentalStdlibApi
125
+ @SinceKotlin(" 1.4 " )
126
+ @WasExperimental( ExperimentalStdlibApi :: class )
127
127
public actual fun Int.countLeadingZeroBits (): Int =
128
128
if (this == 0 ) 32 else countLeadingZeroBits(this )
129
129
@@ -137,26 +137,26 @@ private external fun countTrailingZeroBits(value: Int): Int
137
137
/* *
138
138
* Counts the number of consecutive least significant bits that are zero in the binary representation of this [Int] number.
139
139
*/
140
- @SinceKotlin(" 1.3 " )
141
- @ExperimentalStdlibApi
140
+ @SinceKotlin(" 1.4 " )
141
+ @WasExperimental( ExperimentalStdlibApi :: class )
142
142
public actual fun Int.countTrailingZeroBits (): Int =
143
143
if (this == 0 ) 32 else countTrailingZeroBits(this )
144
144
145
145
/* *
146
146
* Returns a number having a single bit set in the position of the most significant set bit of this [Int] number,
147
147
* or zero, if this number is zero.
148
148
*/
149
- @SinceKotlin(" 1.3 " )
150
- @ExperimentalStdlibApi
149
+ @SinceKotlin(" 1.4 " )
150
+ @WasExperimental( ExperimentalStdlibApi :: class )
151
151
public actual fun Int.takeHighestOneBit (): Int =
152
152
if (this == 0 ) 0 else 1 .shl(32 - 1 - countLeadingZeroBits(this ))
153
153
154
154
/* *
155
155
* Returns a number having a single bit set in the position of the least significant set bit of this [Int] number,
156
156
* or zero, if this number is zero.
157
157
*/
158
- @SinceKotlin(" 1.3 " )
159
- @ExperimentalStdlibApi
158
+ @SinceKotlin(" 1.4 " )
159
+ @WasExperimental( ExperimentalStdlibApi :: class )
160
160
public actual fun Int.takeLowestOneBit (): Int =
161
161
this and - this
162
162
@@ -195,8 +195,8 @@ public actual fun Int.rotateRight(bitCount: Int): Int =
195
195
/* *
196
196
* Counts the number of set bits in the binary representation of this [Long] number.
197
197
*/
198
- @SinceKotlin(" 1.3 " )
199
- @ExperimentalStdlibApi
198
+ @SinceKotlin(" 1.4 " )
199
+ @WasExperimental( ExperimentalStdlibApi :: class )
200
200
@SymbolName(" Kotlin_Long_countOneBits" )
201
201
public actual external fun Long.countOneBits (): Int
202
202
@@ -210,8 +210,8 @@ private external fun countLeadingZeroBits(value: Long): Int
210
210
/* *
211
211
* Counts the number of consecutive most significant bits that are zero in the binary representation of this [Long] number.
212
212
*/
213
- @SinceKotlin(" 1.3 " )
214
- @ExperimentalStdlibApi
213
+ @SinceKotlin(" 1.4 " )
214
+ @WasExperimental( ExperimentalStdlibApi :: class )
215
215
public actual fun Long.countLeadingZeroBits (): Int =
216
216
if (this == 0L ) 64 else countLeadingZeroBits(this )
217
217
@@ -225,26 +225,26 @@ private external fun countTrailingZeroBits(value: Long): Int
225
225
/* *
226
226
* Counts the number of consecutive least significant bits that are zero in the binary representation of this [Long] number.
227
227
*/
228
- @SinceKotlin(" 1.3 " )
229
- @ExperimentalStdlibApi
228
+ @SinceKotlin(" 1.4 " )
229
+ @WasExperimental( ExperimentalStdlibApi :: class )
230
230
public actual fun Long.countTrailingZeroBits (): Int =
231
231
if (this == 0L ) 64 else countTrailingZeroBits(this )
232
232
233
233
/* *
234
234
* Returns a number having a single bit set in the position of the most significant set bit of this [Long] number,
235
235
* or zero, if this number is zero.
236
236
*/
237
- @SinceKotlin(" 1.3 " )
238
- @ExperimentalStdlibApi
237
+ @SinceKotlin(" 1.4 " )
238
+ @WasExperimental( ExperimentalStdlibApi :: class )
239
239
public actual fun Long.takeHighestOneBit (): Long =
240
240
if (this == 0L ) 0L else 1L .shl(64 - 1 - countLeadingZeroBits(this ))
241
241
242
242
/* *
243
243
* Returns a number having a single bit set in the position of the least significant set bit of this [Long] number,
244
244
* or zero, if this number is zero.
245
245
*/
246
- @SinceKotlin(" 1.3 " )
247
- @ExperimentalStdlibApi
246
+ @SinceKotlin(" 1.4 " )
247
+ @WasExperimental( ExperimentalStdlibApi :: class )
248
248
public actual fun Long.takeLowestOneBit (): Long =
249
249
this and - this
250
250
0 commit comments