Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Rentonn - Airbnb clone 1.0
VisualNEO for Windows 18.08.31.0
SentiVeillance SDK Trial 7.0.191272
dbForge SQL Complete 6.1
Uber for E-Scooters 1.0
ODBC Driver for MySQL 2.4
dbForge Schema Compare for MySQL 4.4
dbForge Studio for MySQL 8.1
dbForge Query Builder for MySQL 4.4
dbForge Data Compare for MySQL 5.5
Aqua Data Studio 19.5
ConyEdit for Windows 1.1.1
GetOrgChart 2.5.3.0
Database Workbench Pro 5.6.0
.Net VCL for Delphi 1.0.0.0
Top Code
MCU 8051 IDE 1.4.7
C/C++ GRAPHICAL LIBRARY NE 1.0
Faculty Evaluation System 1.1
jClientUpload 1.0
heap sort
Azizi search engine script PHP 4.1.10
Simulation of MUSIC (DOA ESTIMATION) - GUI 1.0
PHP Product Order Form 1.0
PHP MLM Software 2.0.1
MLM Binary Plan Script – i-Netsolution 1.0.2
Restaurant Table Booking System 2.0
Cuckoo Optimization Algorithm 1.0
Ant Colony Optimization (ACO) 1.0
deploypcode - recursively pcode files with help attached 1.0
C/C++ Coding Standards Analysis 1.0
Top Rated
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
Chek if a number is a power of two 
File ID: 64512






Chek if a number is a power of two 
Download Chek if a number is a power of two http://code.activestate.com/recipes/577514-chek-if-a-number-is-a-power-of-two/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 26
Submit Rating:
Chek if a number is a power of two  Description
Description: Pretty good way to check if a number is a power of two or not.

License: Freeware

Related: Check, Number, Power, Python

O/S:Windows

Downloads: 26



More Similar Code

Functions that checks if a number is odd or even.

(This is a little bit more complicated than using "mod(x, 2)" if you want error handling for certain cases.)

The function can handle double, single, and integer classes, as well as arrays of these.

* An error is raised if a floating point number is too large so that it is not possible to determine if it is even or odd.
* An error is raised if a...



Pads any amount of images each to power-of-two dimensions, useful for OpenGL programming.



Determines if a number is odd or even by dividing the number by two an seeing if the number is an integer.



Simple function that tells if a point is inside of a mesh, be it concave or convex
The algorithm just finds the intersection points between the facets and a vertical line that passes through the original point. Depending on the relative...



As the power needed to transmit a certain number of bits in
a subcarrier is independent of the numbers of bits allocated to
other subcarriers, it turns out that a greedy approach is optimal.
A greedy algorithm assigns bits to the...



any floating point number is separated into two parts i) integer ii)floating point
for ex if x=-12.93 the program gives -12 and .93 as the two outputs
format:[p,q]=truncate(x);
where x is a floating point number



Fligner-Policello is a non-parametric test of two combined random variables with continuous cumulative distribution. It is a robust rank-order test of treatment effects for populations which assumes neither normality nor equal variances...



The input of the filter is a armonic signal which is sum of two sinusoidal component. The frequency behavior of the filter is chose to attenuate the high spectral component of the input signal with 20 dB.



The function creates a modal dialog consisting of two listboxes. Items can be chosen from one box and transferred or copied to the other. The order of picking is obtained (normal listbox only results in sorted order).

Adoption of the...



If a comment is held for moderation an email message is sent to the comment author with a link to verify the comment author's email address. When the comment author clicks on that link the comment gets approved immediately. This makes discussions...

User Review for Chek if a number is a power of two
- required fields
     

Please enter text on the image