exp2

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the exp2 of <number>
exp2(<number>)
Summary

Returns the binary exponential of a number.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
number

A real number, or an expression that evaluates to a number.

Example
exp2(8) -- returns 256
exp2(the screenDepth) -- returns number of colors available
Values
NameTypeDescription
return

The exp2 function returns a positive number.

RelatedFunction: exp
Glossary: binary, return, math operation
Description

Use the exp2 function to obtain a power of 2.

The expression exp2(number) is equal to 2^number.

If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.

Tagsmath