You are here: Symbol Reference > Math387 Namespace > Functions > Math387.LargestExp2 Function
MtxVec VCL
ContentsIndex
PreviousUpNext
Math387.LargestExp2 Function

Returns first number being power of two that is equal or greater than n.

Pascal
function LargestExp2(n: integer): integer; overload;

the first number being power of two that is equal or greater than n.

It is much faster than the call of: 

Exp2(Ceil(Log2(n))) 

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!