root / pobysoPythonSage / src / sageSLZ / sageNumericalOperations.sage @ 175
Historique | Voir | Annoter | Télécharger (392 octet)
| 1 |
print "sageNumericalOperations: loading..." |
|---|---|
| 2 |
|
| 3 |
def sno_abs_is_power_of_two(number): |
| 4 |
""" |
| 5 |
Check if the absolute value of a number is power of 2. |
| 6 |
The built-in is_power_of_two, works with many kinds of numbers but |
| 7 |
returns false for negative ones. |
| 8 |
""" |
| 9 |
return is_power_of_two(abs(number)) |
| 10 |
# End sno_abs_is_power_of_two(number): |
| 11 |
|
| 12 |
print "\t...sageNumericalOperations loaded." |